-
-
Notifications
You must be signed in to change notification settings - Fork 37
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undefined attribute level operator <col> when trying to export relations #69
Comments
Hi @salmanm, Thanks for opening this issue. Let me start by saying the relation syncing is an undocumented and unstable feature that only works if you take the right precautions. If you are willing to share the PS: |
Thanks @boazpoolman, I've put together an example repo here. If you run it as is, and go to the tool page you'll get an error just loading it. and this is the stacktrace (I increased the limit to capture all of it)
I've pushed the config that causes this bug in the last commit chore: add config that causes bug so if you just revert that change, everything will work fine. This should provide you with enough details to investigate the issue but let me know if I can help in any way. |
Hi @salmanm, I haven't tried starting the example instance you provided just yet. This related CT must have a field that holds the parent. Otherwise the feature doesn't work. |
I've tried adding |
Update: After adding Also, I feel there should not be the need to define the reverse relation and we should still be able to export. There may be cases where it doesn't make sense to see all parent items in a child entity. |
Here's a PR that fixes my issue #70. Thoughts? I'm looking to see if there are any side-effects of this change. Update: PR 70 works perfect for my case. |
Thanks for putting up a PR. |
Hi @salmanm, Just wanted to thank you for putting up a PR to fix this issue and at the same time appologize as I have not been able to review your work. I noticed you closed the PR. Did that have a reason other than me being unresponsive? That's all for now. Hope you made the plugin work for you're usecase :) |
I realized that my PR solved one issue but probably created another one and I didn't have enough time to resolve that. I was hoping to get some direction on how to go about it. No I couldn't make the plugin work for my use case. Although it's great for config sync as it claims to do, but for custom content types it has some things to iron out. Basically I was looking for something to allow me to auto import seed data from a JSON file, and keep it in sync. |
Got it. EDIT: |
I'm disappointed to see you say that the "relation syncing is an undocumented and unstable feature", given that is part of the documentation and nowhere does it say that it is unstable. I too am getting this error when trying to include a relations array in a customType object. If the relations feature is not supported, please remove it from your documentation or mark it as unstable. |
The comment you quote is from a long time ago. Since then major changes have been made to the relations feature, including the contribution of PhilippPaoli which allows for components syncing. I wouldn't call this feature unstable anymore, though I agree that this issue needs to be fixed. Though I would much rather see a PR to fix this issue a a whole. |
Bug report
Describe the bug
I have this in
customTypes
and when I visit the tool page in Settings, I get an error.
I tried to debug it a lot but haven't gotten anywhere with the root cause. I'd be happy to PR a fix (if it's a bug) when pointed in the right direction.
Steps to reproduce the behavior
Expected behavior
Similar to how exporting relations work for users-permissions plugin, it should work for any model.
The text was updated successfully, but these errors were encountered: