Closed (fixed)
Project:
TFA Migration
Version:
1.x-dev
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Jan 2025 at 14:11 UTC
Updated:
31 Jan 2025 at 06:29 UTC
Jump to comment: Most recent
When migrating tfa user settings, the following warnings are displayed :
[warning] Attempt to read property "sms" on array MigrateTfaUserSettings.php:98
[warning] Attempt to read property "plugins" on array MigrateTfaUserSettings.php:104
Note : i didn't use SMS on my previous instance.
drush migrate:import tfa_migration_user_settings (or drush migrate:import tfa_migration_user_settings --upgrade)
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:
Comments
Comment #2
bhanu951 commentedHi @jibus, Thanks for reporting the issue.
I observed that warning only for one of my records that are being migrated which doesn't have sms plugin value and for other records it migrated with out warning.
Are you seeing it for multiple records ?
Even though there is a warning I believe TFA is working as expected on newer system?
Did you test TFA on newer system?
Can you ping me on Drupal slack @bhanu951, we can discuss it over there.
Comment #3
bhanu951 commentedI believe we should add empty variable $decoded_data check at this line.
Can you add that check and confirm if it fixes the notice.
https://git.drupalcode.org/project/tfa_migration/-/blob/1.x/src/Plugin/m...
Comment #4
jibus commented$data_sms = (isset($decoded_data->sms)) ? boolval($decoded_data->sms) : FALSE;fix the warning "[warning] Attempt to read property "sms" on array MigrateTfaUserSettings.php:98"
fix the warning : "[warning] Attempt to read property "plugins" on array MigrateTfaUserSettings.php:104"
Comment #6
bhanu951 commentedComment #7
bhanu951 commented@jibus : I made code changes to fix the warnings.
Can you apply the patch - 3499387-MR12 and check if the issue is resolved and the change status to RTBC.
Comment #8
jibus commentedThank you, patch #7 fix the warning.
Comment #9
bhanu951 commentedComment #11
bhanu951 commented