Problem/Motivation
This is a child issue of #2829966: Support for Revisions on groups to make the issue easier to review by splitting it.
Proposed resolution
This patch only contains the code to make group entity type revisionable, but the full functionality will be combined on the parent issue.
| Comment | File | Size | Author |
|---|---|---|---|
| #23 | group-3029907-23.patch | 28.53 KB | kristiaanvandeneynde |
Comments
Comment #2
jidrone commentedComment #3
jidrone commentedComment #4
jidrone commentedComment #6
jidrone commentedChanged to Needs review because is expected the tests failed, it only works combined with #2873212: Add a status to the group (Publish/Unpublish).
Comment #7
lobsterr commented@jidrone I applied your latest patch from Add status, then the current the current patch can't be applied. Can you please update it?
Comment #8
heddnComment #9
jidrone commentedHi everyone, to test group revisionable you need to apply the parent patch #2829966: Support for Revisions on groups, this patch is only intended to make code review easier.
Comment #10
jidrone commentedChanged the status to "Needs review" because this ticket is only for code review.
Comment #11
jwilson3Patch no longer applies to latest 8.x-1.x
Comment #12
jwilson3Comment #13
jwilson3The patch in #3 applied to 8.x-1.0-rc4 but not 8.x-1.0-rc5 nor 8.x-1.x branch so I've uploaded two re-rolls, one for each in case someone needs.
These are automated re-rolls based on git rebase, there was only one very minor merge conflict between rc4 and rc5, and there were no merge conflicts between rc5 and 1.x branch.
Comment #15
jwilson3This patch brings down a few additions from the parent ticket's latest patch #2829966-47: Support for Revisions on groups.
See interdiff to identify the changes. A few alphabetical order of use statements and added some tests.
Comment #17
kristiaanvandeneyndeLooking into this as part of sponsored work by Global Game Jam
Comment #18
kristiaanvandeneyndeStraight reroll, no reviews yet.
Comment #19
kristiaanvandeneyndeFinished my code review, need to review tests now.
Keep in mind that since the last patch, core fixed an update problem in taxonomy and menu related to code borrowed in this patch. I've left out said code for now, but for posterity, the issues are:
It would need a hook_requirement and an adjustment to the post_update hook to mimic core properly. I could not find any corrupt group entities on my test install, but who knows how people managed to mess up their databases :P
That said, attached patch has the revised code. Mainly dropped deprecated code that slipped in from copy-pasting core code and overhauled the route access check to be more alterable as per #2943471: LatestRevisionCheck overrules any other node access module
Next up: Test coverage.
Comment #20
kristiaanvandeneyndeWhoops, access check was using AccessResult rather than GroupAccessResult. Copy-pasting is bad m'kay?
Also, the fact that above patch goes green shows why we need more tests.
Comment #21
kristiaanvandeneyndeMisclicked in SourceTree... :)
Comment #22
kristiaanvandeneyndeOkay I've asked core maintainers and they recommend adding in the aforementioned safety checks because people somehow get their DBs in bad shape.
That said, our sponsor should not pay for this, given how I would also need to write the update hook tests and all and therefore I suggest we move forward assuming no-one messed up their DB somehow. If we do get reports of people not being able to update, we can have the community come up with a patch by copy-pasting the work done in the two linked core issues.
Focusing on the tests for this issue again.
Comment #23
kristiaanvandeneyndeWow, writing tests for revisions is so painful. But, after many hours of debugging, here we go.
Comment #25
kristiaanvandeneyndeChanged a small base field typo and pushed. Thanks all!