"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.

Comments

moonray created an issue. See original summary.

moonray’s picture

Status: Active » Needs review
StatusFileSize
new3.79 KB

Attached patch makes the pathauto alias generation work without creating an actual alias upon draft save.

Status: Needs review » Needs work

The last submitted patch, 2: workbench_path_revision-pathauto_generate-2570467-1.patch, failed testing.

dgtlmoon’s picture

Do you need to recreate _workbench_path_revision_generate_path ? Looks awfully similar to the built in Drupal function call?

moonray’s picture

The 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.

dgtlmoon’s picture

Ah 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

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: workbench_path_revision-pathauto_generate-2570467-1.patch, failed testing.

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: workbench_path_revision-pathauto_generate-2570467-1.patch, failed testing.

alauzon’s picture

I've had problems just testing the setup with dev versions of all the implied modules :

  • Workbench Moderation 7.x-2.x-dev
  • Workbench Path Revision 7.x-2.x-dev
  • State machine 7.x-3.x-dev

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.

alauzon’s picture

StatusFileSize
new3.6 KB
alauzon’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 12: workbench_path_revision-pathauto_generate_2570467-2.patch, failed testing.

moonray’s picture

The 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.

acy76’s picture

If 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).