"Generate automatic URL alias" is always unchecked (even if the last revision had it enabled).
Then, after checking it, changing the title, and saving the new draft, the path auto isn't updated based on the draft revision's title but the published revision's title (resulting in no change in the path alias).
If you manually modify the alias, everything works as expected.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | workbench_path_revision-pathauto_generate_2570467-2.patch | 3.6 KB | alauzon |
| #2 | workbench_path_revision-pathauto_generate-2570467-1.patch | 3.79 KB | moonray |
Comments
Comment #2
moonray commentedAttached patch makes the pathauto alias generation work without creating an actual alias upon draft save.
Comment #4
dgtlmoon commentedDo you need to recreate _workbench_path_revision_generate_path ? Looks awfully similar to the built in Drupal function call?
Comment #5
moonray commentedThe problem with the built-in path is that it actually creates an alias and stores it in DB. We just need to generate the path from pattern, but don't want it stored in DB.
Comment #6
dgtlmoon commentedAh ok, nice, so perhaps in the patch modify it to include that comment (that the function is essentially the same), also, whats up with the tests? state_machine doesnt load? strange
Comment #11
alauzon commentedI've had problems just testing the setup with dev versions of all the implied modules :
I could not enable Workbench Path Revision because it depended on Workbench Moderation (2.x) and since dependencies cannot work on a 2.x branch where only a 2.x-dev is available I had to put the dependency in Workbench Path Revision towards Workbench Moderation from (2.x) to (>=1.99). See https://www.drupal.org/node/1304490#comment-5105104 for reference.
I am asking myself if that's the problem with patch #2. So I have created a new patch with that change included. I'm pretty new to patching so let me know if mine is OK.
Comment #12
alauzon commentedComment #13
alauzon commentedComment #15
moonray commentedThe latest version of pathauto seems to have updated code that lets you generate an alias without actually creating it. This patch needs an update. It will allow us to not duplicate as much code from pathauto.
Comment #16
acy76 commentedIf you begin development against pathauto 1.3, I suggest patching workbench_moderation per this issue. Incidentally, updating pathauto and patching workbench_moderation seems to have solved the problem that led me to your module in the first place, namely saving drafts would automatically update the alias of the published node (see my comment in the link above).