- Merge request !1Issue #3194008: Allow multiple ip ranges per user → (Merged) created by Unnamed author
- 🇷🇴Romania amateescu
This needs an upgrade path for sites that are using the current version of the module.
- First commit to issue fork.
- 🇦🇺Australia akoepke
Can a maintainer please review this merge request and push out a new release of the module.
At the moment, upgrading a site from D7 to D10 while maintaining the IP login functionality isn't really possible.
- 🇷🇴Romania amateescu
I tested the upgrade path on a test site with existing data and sadly it doesn't work. The entity api can't create the database tables for a field if that field name is already "installed", so I'm afraid we'll have to add a new field instead. Something like
ip_login_data
orip_login_range
? - 🇷🇴Romania amateescu
Also, I've committed 💬 How to logout? Active so it can be reverted from this MR.
- 🇦🇺Australia akoepke
I have changed the field to ip_login_data and updated the database update hooks and SQL in the controller. I also added another database update to remove the ip_login field.
I was testing the upgrade path from the current 4.0.0-alpha2, is this the same version you were testing? I just did a clean install of the current release and then replaced it with this code and the upgrade went through without any issues.
- First commit to issue fork.
- 🇦🇺Australia realityloop
does not currently apply to dev branch, I've just updated the MR, apologies for losing individual commits, I exported patches for each of them before rebasing dev in attached archive
- 🇦🇺Australia realityloop
perhaps becauuse my DB is already converted:
drush updb -y ---------- ----------- --------------- --------------------------------------------------------------- Module Update ID Type Description ---------- ----------- --------------- --------------------------------------------------------------- ip_login 9002 hook_update_n 9002 - Migrate ip address values from old field to new table. ip_login 9003 hook_update_n 9003 - Remove single value IP Login field from User entity. ---------- ----------- --------------- --------------------------------------------------------------- // Do you wish to run the specified pending updates?: yes. > [notice] Update started: ip_login_update_9002 > [error] SQLSTATE[42S22]: Column not found: 1054 Unknown column 'ip_login__ip_start' in 'field list': SELECT uid, ip_login__ip_start, ip_login__ip_end > FROM users_field_data > WHERE ip_login__ip_start IS NOT NULL; Array > ( > ) > > [error] Update failed: ip_login_update_9002 [error] Update aborted by: ip_login_update_9002 [error] Finished performing updates.
- 🇦🇺Australia realityloop
I've just added a check that the columns exist in the ip_login_update_9002() install hook
-
amateescu →
committed e258246d on 4.x authored by
erik frèrejean →
Issue #3194008 by akoepke, erik frèrejean: Allow multiple ip ranges per...
-
amateescu →
committed e258246d on 4.x authored by
erik frèrejean →
- 🇷🇴Romania amateescu
Cleaned up the update functions a bit and merged into 4.x, thanks!
Automatically closed - issue fixed for 2 weeks with no activity.