You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a data object of your newly created class, add some data to the field
Change the data component to advanced-many-to-many-object
Open the penultimate version of the data object, you'll see an error
Actual Behavior
You will see an error:
An exception has been thrown during the rendering of a template ("Call to undefined method getElement in class <fqcn of data object you added in the relation field>").
Preferably that it shows the already existing objects (and the rest of the data in that version). If that's not possible just show the rest of that version with no data anymore for that data component.
The text was updated successfully, but these errors were encountered:
Adding a check to see if the method exists is easy enough. But as far as I understand changing the code so that the objects are still visible shouldn't be too hard either.
On second thought, it's perhaps a bit weird to add exceptions in the code base of AdvancedManyToManyRelation. I get a lot of hits when I search for 'getPreviewData', but as far as I can see we can also fix this issue with an extra definition is instanceof(...) check in previewVersion.html.twig
Thanks a lot for reporting the issue. We did not consider the issue as "Pimcore:Priority", "Pimcore:ToDo" or "Pimcore:Backlog", so we're not going to work on that anytime soon. Please create a pull request to fix the issue if this is a bug report. We'll then review it as quickly as possible. If you're interested in contributing a feature, please contact us first here before creating a pull request. We'll then decide whether we'd accept it or not. Thanks for your understanding.
Pimcore version
tested on 10.5.22, but possibly all?
Steps to reproduce
Actual Behavior
You will see an error:
This is caused by [line 412 in models/DataObject/ClassDefinition/Data/AdvancedManyToManyRelation.php#L412]
Expected Behavior
Preferably that it shows the already existing objects (and the rest of the data in that version). If that's not possible just show the rest of that version with no data anymore for that data component.
The text was updated successfully, but these errors were encountered: