Drupal 10, the latest version of the open-source digital experience platform with even more features, is here.Using Aegir 7.x-3.x, cloning/migrating a site with views/triggers (CiviCRM) fails because of the regexes that are run on the sql dump. This seems linked to #1324466: provision-migrate fails because provision-backup creates a useless dump and commit a49295c0d32837443c07e6262e74094a61d222f2.
The error shown by the front-end is: Database import failed: ERROR at line 15316: Unknown command '\*'.
Looking at the database.sql, line 15316 has:
/*!50001 SET collation_connection = utf8_general_ci */;
/\*!50001 CREATE \*/
/*!50001 VIEW `civicrm_batch_en_US` AS select `civicrm [...]










Comments
Comment #1
bgm CreditAttribution: bgm commentedTo be more precise, reverting patch 764fcb8cd6e198ac8b0b7cdf2dd14afb5782092e solves the problem.
Comment #2
omega8cc CreditAttribution: omega8cc commentedThe patch you have referenced did two things: it removed anchors because they have caused problems reported previously *and* modified escapes in the regexes.
This change didn't cause any problems in our tests with blank CiviCRM sites on BOA, so it seems that some extra CiviCRM features, when enabled, may trigger this problem.
Reverting it may fix something and break (again) something else, so we need to be careful and test what exactly (and why) breaks things here: removed double escaping or removed anchors?
Comment #3
ergonlogicI'd suggest using our new hook,
hook_provision_mysql_regex_alter(&$regexes)to test/fix this. I've just clarifies the API docs to read:That said, I'm happy to fix the defaults to work with CiviCRM. So let me know what's causing the issue, and you're suggested fix.
Comment #4
bgm CreditAttribution: bgm commentedThanks for the responses. I will do more testing. For reference, I am using multi-lingual CiviCRM, so there are mysql views in the sql dump (by default, CiviCRM does not use mysql views).
Comment #5
omega8cc CreditAttribution: omega8cc commentedWe have identified the problem. The replacement string in the third line needs to be literal (replacement in preg_replace() is not regex!), thus it should *not* use any escapes -- then it works:
Comment #7
omega8cc CreditAttribution: omega8cc commentedThis has been fixed in e1502d7aafcf5d1d15e4395beac5416d4ff31ada
Comment #8
bgm CreditAttribution: bgm commentedThanks!