Account created on 13 June 2008, over 16 years ago
#

Merge Requests

Recent comments

🇫🇷France aurm

Hi everyone,

The original problem is as follows:
The hook_entity_base_field_info which brings the metadata of the field authorization_drupal_roles_roles is deleted.
At the same time, the authorization_drupal_roles_update_8004() method uses the following code to migrate the data :

    $user = $user_storage->load($user_id);
    $drupal_roles = $user->get(‘authorization_drupal_roles_roles’);

The $user->get('authorization_drupal_roles_roles') cannot work properly because the metadata for the authorization_drupal_roles_roles field is no longer available due to the deletion of the hook_entity_base_field_info. This causes the update to fail with the error 'Field authorization_drupal_roles_roles is unknown.'

@sunlix suggests re-adding the hook_entity_base_field_info in order to play authorization_drupal_roles_update_8004().

This works for data migration. However, authorization_drupal_roles_update_8004() uninstalls the storage of the authorization_drupal_roles_roles field so, at the end of the process, we have an inconsistency authorization_drupal_roles_roles field defintion:
- the field's metadata are present because the hook_entity_base_field_info is present.
- the field storage no longer exists because the update authorization_drupal_roles_update_8004() has deleted it.

To ensure that data migration works properly and that the authorization_drupal_roles_roles field is completely deleted, we propose to modify the way to retrieved original data in authorization_drupal_roles_update_8004() : we use a "direct database query" instead of the user object loaded.

This isn't very conventional, but it seems to solve all the problems.

What do you think?

Aurélien.

🇫🇷France aurm

aurm made their first commit to this issue’s fork.

🇫🇷France aurm

Hi smustgrave,

Many thanks for your review !

🇫🇷France aurm

Hi Vishal,

Thank you for your quick feedback.

1. Fix phpcs issues.

All errors detected by phpsc are fixed.

2. FILE: event_log_track_encrypt.module

Description for a .module file is updated.

3. FILE: src/Commands/EventLogTrackDecryptCommands.php

Documentation comment for constructors is updated.

Please review.

🇫🇷France aurm

Hi everyone,

After some thought, I think it's better to make a separate module rather than a sub-module of Events Log Track to support encryption.
Encryption feature brings new dependencies to the Encrypt and Key modules which are not useful for the majority of ELT users.
So I initialized the Event Log Track Encrypt module instead of this Merge Request.
All comments and suggestions are welcome.

Best regards.

Aurélien.

🇫🇷France aurm

aurm changed the visibility of the branch 3449334-add-support-for to hidden.

Production build 0.71.5 2024