Closed (fixed)
Project:
Pathauto
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
14 Mar 2018 at 18:18 UTC
Updated:
17 Apr 2019 at 18:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
juampynr commentedHere it is. This patch migrates module settings and patterns. I have seen some custom patterns that cannot be migrated automatically but this covers all of what comes with core such as content, users, and taxonomy patterns.
Comment #3
heddnI would really like to see this move into a source plugin. Could we extend the variable source plugin and do it all in a single class? Instead of spread across two places?
Comment #4
jcnventura@heddn I don't think this can be in a single class, since all the settings are config, but the patterns are entities.
In any case, regarding #3, it doesn't need to be in a source plugin, as it is simply a long list of variables going into a single config array. The new patch makes that without requiring a prepareRow() function.
Comment #5
heddnThanks for cleaning up the prepare row. This looks much more clean implementation.
This could at least use a unit test. See core/modules/color/tests/src/Kernel/Plugin/migrate/source/d7/ColorTest.php as an example to model.
Comment #6
jcnventuraAlso, the migration yml files should be prefixed with d7_.
Even if the Drupal 6 migration is the same, the yml files should be cloned, as the current ones are tagged 'Drupal 7'.
Comment #7
jcnventuraAlso, make this depend optionally on d7_node_type. If the pathauto migration is run before the d?_node_type, those paths depending on node type don't get imported.
Comment #8
jcnventuraNew patch, addressing my comments on #6 and #7.
Comment #9
juampynr commentedHere is a bug that I found while reviewing patterns. It was causing non-content patterns to contain invalid configuration.
Comment #10
damienmckennaTested this out on the Contrib Half Hour meeting this week and it worked as expected - the patterns were copied over from the D7 site and they worked as expected on new entities.
Comment #11
heddnWe could always use tests. But the basic code on here seems fine. No nits found. Actually just found 2. Bumping back to NW and tagging novice.
Label spelling.
Label spelling.
Comment #12
slv_ commentedRe-rolled patch to fix the label spelling.
Comment #14
berdirThanks, looks like this has been sufficiently tested and reviewed, Tests would be nice, but I don't really see anyone going to do that.
I think this is just D7, so adjusting the title accordingly.
Comment #15
damienmckennaI created follow-up issues for related items: #3045639: Migrate Pathauto configuration from Drupal 6 and #3045638: Add test coverage for Pathauto - Drupal 7 migration