Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bojanz created an issue. See original summary.

daggerhart’s picture

+1 this. I need to track which user modified the profile as well as accept log messages about the modification.

jsacksick’s picture

Status: Active » Needs review
FileSize
8.79 KB

I'm not sure about the deprecation format for getRevisionAuthor() and setRevisionAuthorId().

amateescu’s picture

+++ b/profile.install
@@ -160,3 +160,51 @@ function profile_update_8008() {
+  // Use the "changed" timestamp as the initial revision_created.
+  $database = \Drupal::database();
+  $database->update($entity_type->getRevisionTable())
+    ->expression('revision_created', 'changed')
+    ->execute();

There's no need for this, you can use ->setInitialValutFromField() on the field storage definition before installing it :)

jsacksick’s picture

Not really, that's what happened when I tried that:

Failed: Illegal initial value definition on revision_created: The field types do not match.

I could set it the initialValue to "created", but then the initial value would be "wrong".

amateescu’s picture

Right, don't mind me :D

jsacksick’s picture

Status: Needs review » Needs work

Even if this task isn't about the UI, we need to make sure the revision_log field isn't shown by default on the user register form...
And this will be causing issues for the profile form in checkout as well.

jsacksick’s picture

Status: Needs work » Needs review
FileSize
11.26 KB
2.42 KB
steveoriol’s picture

Patch works for me, no more error entities définition" on the "admin/reports/status" page.
but, after the patch apply, the module was not install? ...
and to reinstall it, I needed to remove the 4 following configuation (drush config-delete xxxx):

  • system.action.profile_delete_action
  • system.action.profile_publish_action
  • system.action.profile_unpublish_action
  • views.view.profiles

Fortunately, all my user profiles have remained in place ;-)

jsacksick’s picture

FileSize
19.37 KB
11.68 KB

Status: Needs review » Needs work

The last submitted patch, 10: profile_2844963-10.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

jsacksick’s picture

Status: Needs work » Needs review
FileSize
20.54 KB
1.16 KB
bojanz’s picture

Title: Use core's revision log interface & trait » Complete the revision implementation

The patch is a lot more ambitious than what we initially discussed, so let's give the issue a better title.

bojanz’s picture

bojanz’s picture

Status: Needs review » Fixed

Had to add EntityOwnerInterface to profile because it only exists in Drupal 8.7.x while we still support 8.6.x.

Tested the upgrade path manually, all is well.

Thanks, jsacksick!

  • bojanz committed 15533b9 on 8.x-1.x authored by jsacksick
    Issue #2844963 by jsacksick, bojanz: Complete the revision...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.