As a follow up for #1571632 we need to migrate date format settings to the new CMI implementation. We also need to clean up the tables we are no longer using after the migration.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Berdir’s picture

Priority: Normal » Critical

I think missing upgrade path is critical?

catch’s picture

Component: other » base system
Issue tags: +D8 upgrade path

I wouldn't necessarily delete the old tables, we can open a 9.x issue to do that now, like #1860986: Drop left-over tables from 8.x.

Berdir’s picture

Fine with keeping the tables. But there's no need to keep them in system_schema() and there they still are :)

tayzlor’s picture

Status: Active » Needs work
FileSize
8.5 KB

I tried to make a bit of a start on this. Posting up patch of progress so far, incase anyone else is interested in taking up.
Setting to needs work, as there is still some things to do.

I haven't looked into what is involved with any of the date_locale stuff yet.

Berdir’s picture

Status: Needs work » Needs review

Thanks for working on this!

+++ b/core/modules/system/lib/Drupal/system/Tests/Upgrade/DateUpgradePathTest.phpundefined
@@ -0,0 +1,76 @@
+ * Definition of Drupal\system\Tests\Upgrade\DateUpgradePathTest.

Should be Contains...

+++ b/core/modules/system/lib/Drupal/system/Tests/Upgrade/DateUpgradePathTest.phpundefined
@@ -0,0 +1,76 @@
+
+    // Verify standard date formats
...
+    // Verify custom date format

Missing . at the end.

+++ b/core/modules/system/system.installundefined
@@ -2331,6 +2242,39 @@ function system_update_8041() {
+        db_delete('variable')->condition('name', $variable_name, '=')->execute();

You can use update_variable_del() here.

+++ b/core/modules/system/tests/upgrade/drupal-7.date.database.phpundefined
@@ -0,0 +1,61 @@
+ */
+// Add default format for standard date formats
+db_insert('variable')->fields(array(

->fields.. should be on a new, separate line.

+++ b/core/modules/system/tests/upgrade/drupal-7.date.database.phpundefined
@@ -0,0 +1,61 @@
+// Add image effects.

Wrong comment.

I'm not 100% sure, but I think localized date formats is a new feature in 8.x and we don't need to provide a 8.x -> 8.x upgrade path. So we can probably ignore this.

Setting to needs review to check if this passes. Setting to needs work doesn't make much sense, all patches will be sent to the testbot when the issue is set to needs review. If you really don't want to have something tested, use -do-not-test.patch.

Status: Needs review » Needs work

The last submitted patch, 1860778-date-upgrade.patch, failed testing.

Berdir’s picture

Assigned: Unassigned » Berdir

Working a bit on this.

Berdir’s picture

Assigned: Berdir » Unassigned
Status: Needs work » Needs review
FileSize
8.87 KB
11.82 KB

Fixed the things pointed out in my review, added locale date format (they exist in D7 :) ) upgrade path and tests for it.

Something missing?

plach’s picture

Here is a reroll + a test-only patch.

plach’s picture

I added the leftover tables to #1860986: Drop left-over tables from 8.x.

plach’s picture

Updated the update function number :)

plach’s picture

Status: Needs review » Reviewed & tested by the community

I manually tested the upgrade path and it seems to be working well. Overall the date format localization code looks pretty broken in HEAD, AAMOF it seems localized formats are not being picked up but the data is being migrated correctly, which is all we need for what this patch is concerned.

The patch looks good and the tests capture the bug. Since I just rerolled it I feel ok to RTBC it.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Lovely!

Committed and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

xjm’s picture