Closed (fixed)
Project:
Drupal core
Version:
8.7.x-dev
Component:
migration system
Priority:
Major
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
23 Sep 2018 at 11:51 UTC
Updated:
15 Nov 2018 at 21:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
quietone commentedMaking a start.
This has a new source plugin and test and a migration test.
Found out that the d7 i18n string table has a different name than in D6. So there needs to be a new version of i18nQueryTrait and instead of making a D7 version I added a common one. Though that work is not complete as the D6 source plugins need to add a property.
Also, the d6 version include testing of translations of the body of the block but I didn't see how to translate the body, so that still needs to be looked into.
Comment #4
quietone commentedWrong table name in the test
Comment #5
quietone commentedOops, that was to be NR not fixed
Comment #6
quietone commentedStill needs work to translation the body of the block and to remove d6/i18nQuery.
Comment #7
quietone commentedAdd a translation of the body field and test that.
Comment #8
quietone commentedThe d6 and d7 box/custom block source plugins are identical expect for using different tables names. This makes a common source plugin that they both use.
And changes the use of REQUEST_TIME to \Drupal::time()->getRequestTime().
Comment #10
jofitzI suggest that d6_box_translation should not be deprecated (at least not while d7_block_custom_translation is created in exactly the same manner)
Comment #11
masipila commentedI read the patch and found a couple of nits.
1.
Class descriptions should start with a third person verb.
2.
Can we improve the inline comments a bit, for example like this: "Drupal 6 and 7 used stored the data in different tables. Determine which table names to use."
3.
Build a query based on blockCustomTable, not i18n_string table.
4.
... to match the property name in i18nStringTable.
5.
Class descriptions should start with a third person verb.
6.
Method descriptions should start with a third person verb as well. And were are referring to i18n_string table here like in the previous comments.
7. @quietone, could you please comment on the deprecation comment by Jo Fitzgerald in #10?
Cheers,
Markus
Comment #12
quietone commented1-6 Fixed.
7. Yes, Jo Fitzgerald is right to remove the deprecation. And the plugins have different source_modules too so probably better to not do a deprecation at all. At least that is what I am thinking at this late hour.
Comment #14
quietone commentedThe patch passed tests, it is just that sued the extension 'patch' on the interdiff. So this is really NR.
Comment #15
masipila commentedQueued for PostgreSQL and SQLite
Comment #16
heddnNW for a duplicate I18nQueryTrait and sqlite failures.
Comment #17
quietone commentedRemove the duplicate I18nQueryTrait resulting in a deprecated d6 version and the new one.
Looking at the times, although this is copied from the D6 version of this test, this looks wrong. The block changed time should not be >= the request time. Instead the request time should be >= the block changed time. Or am I wrong?
Comment #19
quietone commentedThe menu link test needs to set the name of the i18n string table. Plus remove the deprecation as it is only used for tests.
Comment #20
quietone commentedAdded tests for PostgreSQL and SQLite
Comment #21
quietone commentedRight, this is ready for review.
That suggests that the assertion mentioned in #17 does need to change, which means the D6 test should change.
Will someone confirm that, and if confirmed, should we do that here or in a separate issue?
edit: fix link to comment
Comment #22
heddnInstead of having a single base class, can we use one each for d6 and d7 and use a static constant that has the table names?
maybe move the bulk of the code into the d7 plugin and have the d6 plugin extend that with a new static member. then d6 can just be pulled into contrib later (if we want to).
I'm mildly interested why casting to CHAR(255), we picked 255. Does that mean we don't let more than 255 characters? Do we have any values stored in our test cases that are longer than 255?
Comment #23
quietone commented1. Fixed.
2. The source property objectid is defined with a length of 255, so no there is nothing longer than that in the source.
Comment #24
heddnPerfect. Onward and upward.
Comment #25
quietone commented#3008028: Migrate D7 i18n menu links needs the changes to i18nQuery that are made here, so tagging as a blocker.
Comment #26
gábor hojtsyYay great! Looks good except this one:
Why does D6 menu translation class has this code for D7? That looks confusing.
IMHO same CONST solution could apply as for the block translation class suggested above by @heddn.
Comment #27
quietone commentedYes, missed that one. Hopefully this will fix it.
Comment #28
mikelutzFeedback addressed, tests green. Back to rtbc.
Comment #29
gábor hojtsyAttempted to commit but phpsniff found these:
Comment #30
quietone commentedSorry about that. Fixed and improved the class summary line while I was there.
Comment #31
mikelutzPer interdiff, style issues have been addressed, RTBC for me again, pending passing tests.
Comment #33
gábor hojtsySuperb, thanks!