Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Bug: Expanding a record with multi-step many-to-many relationships throws an error #6020

Closed
1 task done
mcalder-ccs opened this issue Jul 6, 2023 · 6 comments
Closed
1 task done
Assignees
Labels
馃攷 Status: More Info Needed More information is required to figure out the root cause.

Comments

@mcalder-ccs
Copy link

Please confirm if bug report does NOT exists already ?

  • I confirm there is no existing issue for this

Steps to reproduce ?

Create 3 tables
Create a many-to-many relationship between table 1 and table 2
Create a many-to-many relationship between table 2 and table 3
Enter data into all three tables so that you can see data from table 3 in table 1's grid view.
Select a row in table 1 and hit the expand button.
Form is displayed with data from table 1 and 2, but not table 3, and error message is displayed.
The same behavior happens if you select a row in table 3 and try to expand it.
Selecting and expanding a row in table 2 does not cause a problem.

Error message on screen is:
Failed to load children list: Cannot GET /api/v1/db/data/noco/p_udhakebtt9o8c5/md_g37ezmtf72so3o//mm/cl_cwlq2u00ph4kso?limit=10&offset=0&where=

Here is a snippet from the nocodb log from when the error occurred:

2023-07-06 14:07:09 [Nest] 9  - 07/06/2023, 6:07:09 PM   ERROR [i] Cannot GET /api/v1/db/data/noco/p_udhakebtt9o8c5/md_g37ezmtf72so3o//mm/cl_cwlq2u00ph4kso?limit=10&offset=0&where=
2023-07-06 14:07:09 NotFoundException: Cannot GET /api/v1/db/data/noco/p_udhakebtt9o8c5/md_g37ezmtf72so3o//mm/cl_cwlq2u00ph4kso?limit=10&offset=0&where=
2023-07-06 14:07:09     at callback (/usr/src/app/node_modules/@nestjs/core/router/routes-resolver.js:77:19)
2023-07-06 14:07:09     at /usr/src/app/node_modules/@nestjs/core/router/router-proxy.js:9:23
2023-07-06 14:07:09     at Layer.handle [as handle_request] (/usr/src/app/node_modules/express/lib/router/layer.js:95:5)
2023-07-06 14:07:09     at trim_prefix (/usr/src/app/node_modules/express/lib/router/index.js:328:13)
2023-07-06 14:07:09     at /usr/src/app/node_modules/express/lib/router/index.js:286:9
2023-07-06 14:07:09     at Function.process_params (/usr/src/app/node_modules/express/lib/router/index.js:346:12)
2023-07-06 14:07:09     at next (/usr/src/app/node_modules/express/lib/router/index.js:280:10)
2023-07-06 14:07:09     at next (/usr/src/app/node_modules/express/lib/router/route.js:136:14)
2023-07-06 14:07:09     at next (/usr/src/app/node_modules/express/lib/router/route.js:140:7)
2023-07-06 14:07:09     at next (/usr/src/app/node_modules/express/lib/router/route.js:140:7)

Desired Behavior

The records from all three tables should be displayed in the pop-up form.

Project Details

Node: v16.20.0
Arch: arm64
Platform: linux
Docker: true
RootDB: pg
PackageVersion: 0.109.2

Attachments

No response

@o1lab o1lab assigned pranavxc and unassigned o1lab Jul 6, 2023
@pranavxc
Copy link
Member

The relationship between table1 and table2 is a Many-to-Many relationship, which means it will be displayed in the expanded form. However, there is no direct relationship between table1 and table3, so it will not be displayed in the expanded form.

@mcalder-ccs
Copy link
Author

There is an indirect relationship between table1 and table3, and table3's data shows up in the grid view of table1 (it's just truncated due to space limitations).
Also, if this was intended behaviour, then it shouldn't throw an error in the UI.

@pranavxc
Copy link
Member

pranavxc commented Jul 10, 2023

There is an indirect relationship between table1 and table3, and table3's data shows up in the grid view of table1 (it's just truncated due to space limitations).

I hope it's a Lookup column and at the moment we don't have an expand option for it.

Also, if this was intended behaviour, then it shouldn't throw an error in the UI.

The error looks like the row id is missing in the API call, will look into that. And just to confirm, hope all of the tables have primary key columns.

/api/v1/db/data/noco/p_udhakebtt9o8c5/md_g37ezmtf72so3o//mm/cl_cwlq2u00ph4kso
// ---------------------------------------------------^^^---------------------

@mcalder-ccs
Copy link
Author

Ah yes. It's a lookup column. And yes, all tables have primary keys.

@pranavxc
Copy link
Member

pranavxc commented Jul 10, 2023

It would be really helpful if you could provide a screen recording of the problem, as we haven't been able to reproduce it. Additionally, sharing detailed steps to reproduce the issue would greatly assist us in understanding and resolving it.

@pranavxc pranavxc added the 馃攷 Status: More Info Needed More information is required to figure out the root cause. label Jul 22, 2023
@dstala
Copy link
Member

dstala commented Oct 27, 2023

@mcalder-ccs if you are still facing this issue with our latest release v0.202.5, please reopen this thread

@dstala dstala closed this as completed Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
馃攷 Status: More Info Needed More information is required to figure out the root cause.
Projects
None yet
Development

No branches or pull requests

4 participants