#14673·nocodb

Bug: Base-level "Resend invite" fails with "column fk_workspace_id does not exist" (email plugin looked up with base scope)

Author: AsifMahsudCreated Sep 28, 2026Updated Sep 28, 2026

Please confirm that the bug report does not already exist

  • I confirm there is no existing issue for this bug.

Steps to reproduce

  1. Self-hosted NocoDB CE (2026.09.0, PostgreSQL meta DB, SMTP configured via NC_SMTP_*, so the email plugin is active).
  2. Invite a new email address to a base (Share → invite). The user is created and the invite email goes out.
  3. Try to resend that invite at base level, either from the base members UI or directly:
POST /api/v2/meta/bases/{baseId}/users/{userId}/resend-invite

Actual

HTTP 400
{"error":"ERR_DATABASE_OP_FAILED","message":"The column 'fk_workspace_id' does not exist.","code":"42703","details":{"column":"fk_workspace_id"}}

The same call at org level (POST /api/v1/users/{userId}/resend-invite, Account → Users → Resend invite) works, so this is specific to the base-level endpoint.

Cause

BaseUsersService.baseUserInviteResend looks up the active email plugin with the request's workspace/base context:

https://github.com/nocodb/nocodb/blob/e6817c2c9573f6d5076b8cf388920f9311522db8/packages/nocodb/src/services/base-users/base-users.service.ts#L863-L871

nc_plugins_v2 is a root-scoped table (RootScopeTables[RootScopes.ROOT] in packages/nocodb/src/utils/globals.ts) and has no fk_workspace_id / base_id columns, so contextCondition adds a where fk_workspace_id = … filter that PostgreSQL rejects. Every other plugin lookup passes RootScopes.ROOT, RootScopes.ROOT, including the org-level resend:

https://github.com/nocodb/nocodb/blob/e6817c2c9573f6d5076b8cf388920f9311522db8/packages/nocodb/src/services/org-users.service.ts#L358-L366

The lines date from the query-isolation change (#8666). Now that CE always has a real default workspace in the context, the scoped filter is always applied and the endpoint always fails.

Desired Behavior

baseUserInviteResend should look up the email plugin with the root scope like the org-level resend does, so the base-level resend either sends the email or returns the existing "No Email Plugin is found" message when SMTP is not configured.

I have the one-line fix ready and can open a PR against develop.

Project Details

NocoDB used as docker : true
NocoDB version : 2026.09.0 (also present on develop @ e6817c2)
Database used in NC_DB URL  : pg
Project was created  by clicking : New Project
Database on which spreadsheet is created : pg
OS on which NocoDB is running : Linux (Docker, nocodb/nocodb image)
Node.js version if running as node : n/a (docker image)
Database version : PostgreSQL (Cloud SQL)

Attachments

No response