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
[Reverse relation] Support configuration of visible fields #13569
[Reverse relation] Support configuration of visible fields #13569
Conversation
Review Checklist
|
@BlackbitDevs could you please resolve the conflicts? :) thanks |
@Corepex Done. |
@BlackbitDevs, could you also please merge the 11.x branch into your branch again - this should fix the test errors - thanks |
@Corepex Done. |
@BlackbitDevs could you please fix the tests 😺 |
@BlackbitDevs 🏓😉 Just a quick reminder - Thanks! |
@BlackbitDevs, thanks for this really cool PR. I really like the idea of customizing the columns of the reverse relation. One weird thing I found is that if I save the class multiple times (10 - 20 times), I sometimes get the following error: Seems like this is called in |
@Corepex Is fixed. It was caused by wrong property type in
When this shall be initialized with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should init it with null otherwise it will occure a error when you read it without writing
models/DataObject/ClassDefinition/Data/ReverseObjectRelation.php
Outdated
Show resolved
Hide resolved
models/DataObject/ClassDefinition/Data/ReverseObjectRelation.php
Outdated
Show resolved
Hide resolved
@BlackbitDevs is that PR ready for testing again? |
@Corepex Yes |
@BlackbitDevs now i get another error when saving the class multiple times. The following error message gets displayed: It seems that the |
@BlackbitDevs friendly reminder ⏰ 🍭 |
Ok, wrapped another if condition. Can you please try again, @Corepex? |
@BlackbitDevs, this error doesn't seem to be fixed - the |
@BlackbitDevs final reminder. ⏰ |
@Corepex Please check again. I cannot reproduce the issue. I clicked multiple times on save - with set owner class as well as without. Everything works as expected. |
@BlackbitDevs I just set up a new pimcore 11.x instance. The Sadly I found some new bugs that need to be fixed.
I used the
|
@Corepex Fixed loading the visible field data after adding via drag & drop or search window. The height issue was caused by pimcore/bundles/AdminBundle/public/js/pimcore/object/tags/manyToManyObjectRelation.js Lines 963 to 967 in 24d8ca4
This was introduced in #5378 (after I suggested a similar solution in #4337) For fields which do not use optimizedAdminLoading , the field data already gets fetched by loadObjectData , for example in pimcore/bundles/AdminBundle/public/js/pimcore/object/tags/manyToManyObjectRelation.js Line 618 in 24d8ca4
For those fields fields stays empty in pimcore/bundles/AdminBundle/public/js/pimcore/object/tags/manyToManyObjectRelation.js Lines 921 to 934 in 24d8ca4
and thus pimcore/bundles/AdminBundle/public/js/pimcore/object/tags/manyToManyObjectRelation.js Line 937 in 24d8ca4
nicePathRequested = undefined and thus we did not get to pimcore/bundles/AdminBundle/public/js/pimcore/object/tags/manyToManyObjectRelation.js Lines 963 to 968 in 24d8ca4
And for this reason the height was not adjusted. The same problem existed for normal many-to-many object relations with a visible image field: After adding something via drag & drop, the image is cut off.
Now it should work. |
@BlackbitDevs Could you please resolve the conflicts? Thanks |
f1100c7
to
939edb7
Compare
@robertSt7 As the JS files are now part of https://github.com/pimcore/admin-ui-classic-bundle I have splitted this PR into 2. This one contains the core changes and pimcore/admin-ui-classic-bundle#290 contains the UI changes. |
models/DataObject/ClassDefinition/Data/ReverseObjectRelation.php
Outdated
Show resolved
Hide resolved
Co-authored-by: Divesh Pahuja <divesh.pahuja@pimcore.com>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
@robertSt7 ready for merge? |
@BlackbitDevs Thanks for the PR |
For (advanced) many-to-many object relations you can configure the fields to be shown for the relation field grid in the editing panel.
This PR adds the same for reverse relations: