Description
Global aliases aren't restored when migrating url aliases in 4.0.1rc2.
Steps to reproduce
1. I installed eZP 4.0.0, in the setup wizard I selected English-UK and Website Interface, then agreed to create French language as well when asked.
2. Since there seemed to be bogus entries in "ezurlalias_ml" (see #013470), I trancated the table and ran "bin/php/updateniceurls.php".
3. I created ten manual URL aliases as shown in the attached screenshot.
4. I upgraded the distribution files, then upgraded the database, activated the "ezurlaliasmigration" extension, inserted the migration table into the database.
5. Tried running extension/ezurlaliasmigration/scripts/migrate.php without parameters, it displayed the number of custom aliases - 10, history entries - 0.
6. Ran the "migrate.php" script with the "--migrate" parameter, everything is okay, 10 rows added to the "ezurlalias_ml_migrate" table, with zeros in the "is_restored" and "lang_mask_adjusted" fields.
7. Truncated "ezurlalias_ml" and ran "bin/php/updateniceurls.php".
8. Ran the "migrate.php" script with the "--restore" parameter, this is where things went wrong:
$ php extension/ezurlaliasmigration/scripts/migrate.php --restore Restoring migrated url aliases .FFF.FFF.. 100.00% Restoring migrated url history entries
Result of restoring manual aliases: global aliases are lost. (Node aliases are restored correctly, even those with fake/virtual parents in the url)
If we look at the migration table now:
mysql> select id, lang_mask, text, action, is_restored, lang_mask_adjusted from ezurlalias_ml_migrate group by text; +-----+-----------+----------------+----------------------+-------------+--------------------+ | id | lang_mask | text | action | is_restored | lang_mask_adjusted | +-----+-----------+----------------+----------------------+-------------+--------------------+ | 126 | 4 | Course | eznode:88 | 1 | 0 | | 117 | 3 | EngAllLogin | module:user/login | 0 | 0 | | 115 | 2 | EngLogin | module:user/login | 0 | 0 | | 118 | 2 | EngRegister | module:user/register | 0 | 0 | | 113 | 2 | EngStart | eznode:158 | 1 | 0 | | 120 | 5 | FreAllRegister | module:user/register | 0 | 0 | | 116 | 4 | FreLogin | module:user/login | 0 | 0 | | 119 | 4 | FreRegister | module:user/register | 0 | 0 | | 114 | 4 | FreStart | eznode:158 | 1 | 0 | | 123 | 2 | Workshop | eznode:88 | 1 | 0 | +-----+-----------+----------------+----------------------+-------------+--------------------+ 10 rows in set (0,15 sec)