Problem/Motivation
This issue occurs when conflict module (8.x-2.0-alpha2) is enabled (on Drupal 9.1.14). When a poll has been translated, trying to edit and save the poll gives an error:
Error: Call to undefined method Drupal\poll\Entity\Poll::getChangedTime() in Drupal\conflict\Entity\ContentEntityConflictHandler->autoMergeNonEditedTranslations() (line 399 of /nrc/apps/www/myzone/web/modules/contrib/conflict/src/Entity/ContentEntityConflictHandler.php)
Steps to reproduce
Enable conflict module.
Create a poll.
Translate the poll.
Edit the original poll (or its translation).
Make a change and attempt to save.
Proposed resolution
Poll entity class needs updating to support and/or not break when conflict code runs.
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | poll-error-translation-conflict-3250729-2.diff | 1.34 KB | classiccut |
Issue fork poll-3250729
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3250729-created
changes, plain diff MR !87
- 3250729-error-saving-polls
changes, plain diff MR !79
Comments
Comment #2
classiccut commentedComment #3
idebr commentedComment #4
berdirWhile adding those fields is an option, it's conflict module that needs to check if an entity has that method/field before calling it. There is no requirement to have a changed field.
Adding this would require an update function as well.
Comment #5
ivnishIs this still relevant? How many poll users use also "conflict" module?
Comment #6
bramdriesenComment #9
immaculatexavier commentedComment #10
bramdriesenThe MR is a blind re-roll without reading through the issue what needs to be actually done.
I'm also still not sure if we need this, maybe it has already been fixed? I guess this can be manually tested (without the patch) to see if there is a conflict with the conflict module.
Comment #13
ivnishComment #15
bramdriesen