Remove object link if user removes a related object in the objectrelationlist datatype attribute.#31
Remove object link if user removes a related object in the objectrelationlist datatype attribute.#31
Conversation
…tionlist datatype attribute.
|
Would the effect of this bug be that "related_objects" fetches return bad data? I'm surprised that this would have been an issue all these years. I cannot reproduce this problem (without the patch) on a 5.4 install (Mugo.ca staging). To test, I edited a blog post and removed relations in both the Categories (which is a list of checkboxes) and Related Blog Posts (which is the default "browse mode"). The listing in the Relations tab was properly updated both times. Is this potentially a problem only in specific types of object relation list displays? Or with a specific template override? |
|
I agree: It seems like this always used to work and that we are seeing
this problem come up only recently.
…On 11/28/2016 10:35 AM, Peter Keung wrote:
Would the effect of this bug be that "related_objects" fetches return
bad data? I'm surprised that this would have been an issue all these
years.
I cannot reproduce this problem (without the patch) on a 5.4 install
(Mugo.ca staging). To test, I edited a blog post and removed relations
in both the Categories (which is a list of checkboxes) and Related
Blog Posts (which is the default "browse mode"). The listing in the
Relations tab was properly updated both times.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#31 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABKZv_TTs1fDj_1BndtZvsEVDWsTyJQyks5rCx7xgaJpZM4K-DJS>.
|
|
I think following pull request broke that functionality: on mugo.ca stage I applied the patch and I can now reproduce the issue. In any case, it probably needs to be fixed differently - so this pull request is probably invalid. |
|
More details: The commit from my previous comment was supposed to fix: Issue summary: Looks like the relation tab in the admin UI is only showing the object relations of the most current version - in a multi-language setup it is not showing all object relations. So basically we see a regression issue due to that fix in 2015. I think we can come up with a different fix, allowing us to still remove object relations which then get properly removed in ezcontentobject_link. |
|
== IMPLEMENTATION DETAILS == My new approach is different. When an objectrelationlist attribute gets stored, it will update the entire list of object relations. Then it checks the attribute in all translation and builds a distinct list of object relations. So in case of storing a draft it will check all translation of the published version but for the current draft language, it takes the attribute value from the draft version. Please note:
|
|
This should be submitted to the eZ repo as well |
|
I've created an enterprise support ticket with eZ so they can review this issue. |
|
Response from eZ:
Sounds like it was probably fixed in https://jira.ez.no/browse/EZP-25396, although there is no commit there. |
|
I can easily reproduce the issue with what there is in the master branch. If I remember correctly, CSM is affected (fairly old ezp version) I'm happy to show you the issue on a screenshare. |
|
Closed in favour of: |
== TESTING INSTRUCTIONS ==
Without this pull request, you would still see the object relation listed in the relation tab.