Closed (fixed)
Project:
Pathauto
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
7 Aug 2010 at 22:19 UTC
Updated:
22 Jun 2011 at 04:11 UTC
Jump to comment: Most recent file
Ugh, if I change a node type or vocabulary machine name, the pathauto variables are not renamed, and will result in a loss of functionality. We're also blocked by another core issue: #876762: Modules have no way of knowing if vocabulary machine names are changed.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 876768-pathauto-handle-bundle-rename-delete.patch | 9.68 KB | dave reid |
| #3 | 876768-pathauto-handle-bundle-rename-delete.patch | 8.11 KB | dave reid |
Comments
Comment #1
gregglesPerhaps until that core issue gets fixed we should roll back the change from vid to machine name?
Comment #2
dave reidWe could but we would still have to address the issue of node type machine names being changed. Plus, the issue linked above is already RTBC. It's also an easy work-around by implementing a hook_taxonomy_vocabulary_presave().
Comment #3
dave reidAttached patch for review that:
1. Implements hook_field_attach_rename_bundle() to account for when entity bundles have their machine name changed.
2. Implements hook_field_attach_delete_bundle() to account for when entity bundles are removed and Pathauto should cleanup its variables.
3. Adds tests to ensure #1 and #2 work as desired.
4. Renames the variables 'pathauto_taxonomy_*' to 'pathauto_taxonomy_term_*' to match the 'taxonomy_term' entity type.
Comment #4
dave reidAnd second time, fixing the one test failure to account for latest Token module element validation.
Comment #5
dave reidCommitted #4 to CVS
http://drupal.org/cvs?commit=467242
Comment #6
dave reid6.x-2.x and 6.x-1.x will still need to handle checking if node types are changed.
Comment #7
dave reidCommitted to 6.x-2.x: http://drupalcode.org/project/pathauto.git/commit/c3032d9
Comment #8
dave reidCommitted to 6.x-1.x: http://drupalcode.org/project/pathauto.git/commit/f19d683
Comment #9
dave reid