We should be able to see the list of revisions for a profile, etc.
This is functionality that the new Entity API module will try to provide, so let's postpone this task until that happens.
| Comment | File | Size | Author |
|---|---|---|---|
| #27 | interdiff-2599014-25-27.txt | 325 bytes | johnjw59 |
| #27 | 2599014-27.patch | 2.8 KB | johnjw59 |
| #25 | 2599014-25.patch | 2.78 KB | casey |
| #16 | interdiff-2599014-15-16.txt | 1.29 KB | jwilson3 |
| #16 | profile-revisions-ui-2599014-16.patch | 2.81 KB | jwilson3 |
Comments
Comment #2
skyredwang#2625122: [Meta] Implement a generic revision UI
Comment #3
andreasderijckeIn preparation for this, profile entities should use RevisionableContentEntityBase.
This also makes getRevisionAuthor() and setRevisionAuthorId() obsolete, as getRevisionUser() and setRevisionUser() will be available.
Using RevisionableContentEntityBase will solve a lot of issues when trying to use diff module to compare revisions.
Comment #4
marthinal commentedI've been working on it. This is the result:
I found this problem with entity module #2951528: Empty results for revisions of entities without langcode
So for the moment we can apply that patch.
Thanks!
Comment #5
marthinal commentedIf we already have revisions on our site then we need to update the new fields to avoid errors.
Comment #6
andriy khomych commentedHi, this patch doesn't work on official RC1 release.
Comment #7
andriy khomych commentedHere is a patch for RC1.
Comment #9
loziju commentedRerolled for rc4. Also added the reference to #2951528: Empty results for revisions of entities without langcode as highlighted in #2599014-4: Create the revision UI for profiles above.
Please note that this patch still fails against 1.x-dev. Seems like lots of changes in dev compared to rc4. Would require @bojanz / @mglaman review.
Comment #10
jsacksick commentedHere's my first attempt at this.
Wondering if adding the "Revisions" operation is a good idea, Node provides a "Revisions" tab for instance.
Comment #11
bojanz commentedNote that the prep work from previous patches was done in #2844963: Complete the revision implementation.
It does sound sensible to have a Revisions tab.
I think we're not handling permissions at all right now.
The routes generated by Entity API use EntityRevisionRouteAccessChecker, which assumes the existence of a bunch of permissions, but they're not actually generated (there's no permission provider for them).
Comment #12
chandeepkhosa commentedThanks for the work done so far everyone, I really appreciate it.
I tried applying the patch in #10 with composer-patches and got an error when running `composer install` of `Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2019-06-06/profile_2599014-10.patch`
From the following, it says that src/ProfileListBuilder.php was unsuccessful in being patched on L138, so it probably needs a re-roll.
I'm running Drupal 8.8.1, and Profile 1.0.0
When running it with verbose, I got the following
Comment #13
justinmello32 commentedGetting same patch error when trying to apply, #12.
Comment #14
mygumbo commentedDoes anyone have a working patch for 8.8 and 1.1? Thank you!
Comment #15
jwilson3I applied patch in #10 to 8.x-1.0-rc5 then rebased it to 8.x-1.x and manually resolved the merge conflict where ProfileListBuilder::getOperations() function was renamed to getDefaultOperations(). The rest rebased cleanly. No way to cleanly create an interdiff (that i know of) with a rebase like this, so I'll just include the relevant merge conflict and you can look at the patch itself to see how it was resolved.
Comment #16
jwilson3I'm getting a merge conflict when applying patch in #15 and #2900573-50: Make profile label able to be saved and so work with Auto Entity Label or other alterations that work on save to a site, so the solution is to simply move the Profile::urlRouteParameters() method added by this patch down a little further in the code instead of at the very top of the class.
Comment #17
justinmello32 commentedHi all
This request might be better fitting on a new feature request but I do feel that it relates to revisions. In the past, profile 2 was able to leverage the Diff Module to not only interact with revisions but to show the differences between them. This functionality is incredibly useful for our content editors in which content needs to be reviewed and the editor can quickly see the diff to approve/disapprove changes. I'm incredibly happy that profile revisioning is actively being worked on but was curious if there were any plans to integrate diff into profile revisions as well?
Thanks for the work!
Justin
Comment #18
kylemac commentedHey everyone,
Has anyone gotten diff's working on revisions?
Thanks!
Comment #19
kylemac commentedChecking back a few months later to see if there's anyone out there who has diff's working, thanks!
Comment #20
ludo.rPatch #16 applies cleanly on 8.x-1.7.
Works as expected!
Comment #21
simePatch works for me, but regarding diffs and #19, someone would need to write the integration how https://www.drupal.org/project/entity_diff_ui does it for block/taxonomy/media.
Comment #22
simeJust for #18 and #19 I've attached code for Diff UI support on #3409345: Add support Profile Diff UI.
Comment #23
simeThe `revision_created` field is never updated.
Comment #24
simeComment #25
casey commentedReroll of patch #16
Comment #26
drupalfan2 commentedThank you for patch #25.
I am using patch #16 for a few years and I have changed to patch #25 (after updating the profile module) now, but both versions have the following problem:
When profiles are updated a new revision is only generated when the logged in user is the admin. For other users no new revisions are created when they log in and update/change their profiles.
The checkbox for "Allow profiles of this type to be revisioned" is checked.
How can I solve this problem? I want to achieve that on any profile change a new revision is generated (also for non admin users).
Thanks.
Comment #27
johnjw59 commentedVery small tweak to the patch attached. Just adjusted the weight of the new "Revisions" operations link so it's not the default option (default should remain "Edit").