geerlingguy / jeffgeerling-com

Drupal Codebase for JeffGeerling.com
https://www.jeffgeerling.com
GNU General Public License v2.0
39 stars 2 forks source link

Blog node links are being generated at migrate time instead of migrated from existing content #74

Closed geerlingguy closed 4 years ago

geerlingguy commented 4 years ago

Eek!

Content like: https://www.jeffgeerling.com/blog/2010/my-workstation-work

Is being imported to the path: http://localhost/blog/2020/my-workstation-work

And there is no redirect added. Not only is that wrong, it's sad.

Need to fix that, maybe by disabling pathauto during migrations? I remember having to do that before, during a migration, so the paths could be migrated with the content and not regenerated based on the current date. Also, maybe make sure the pathauto setting is set to use the content's last update date or maybe original publishing date?

geerlingguy commented 4 years ago

It looks like it might be as simple as adding the following in each of the content type migrations:

process:
  [...]
  path/pathauto:
      plugin: default_value
      default_value: 0

(in the process: section). See: https://drupal.stackexchange.com/a/261366/26