I see a few posts in regards to this, but none that are related to the newest 4.6 release, so forgive me if I'm posting a duplicate issue here. My issue is that when I add/edit/delete items on the Conditional page the webform gets set to "Generate automatic URL alias" even though I have unchecked the box and provided my own custom URL alias.

I am using:
webform version 7.x-4.6
PathAuto version 7.x-1.2

Steps to reproduce:
1) Create a new webform.
2) Un-check "Generate automatic URL alias" and provide a URL alias value. For example "mycoolform"
3) Add components to webform. (I simply added 2 textfields so I could create a conditional using them)
4) Add a conditional to webform (If textfield 1 has a value, hide textfield 2) and save.
5) Custom URL alias is now lost. Checkbox for "Generate automatic URL alias" is checked again.

Comments

DanChadwick’s picture

I see from your minutes-ago comment in #936222: Merge in pathauto_persist module functionality to prevent losing manual aliases with node_save() calls that you've discovered the problem lies in pathauto. I am surprise that your comment says that it works okay without the Pathauto Persist modules. I reproduced the issue with just webform and pathauto 7.x-1.2.

Let's hope that pathauto get's it's 4 year old patch. :)

ladybug_3777’s picture

Actually the comment I left on that thread was due to the fact that pathauto's latest release of 1.2 no longer requires pathauto_persist from what I can see. So the discussion over there about committing a patch doesn't make any sense to me since it works just fine without it.

The ONLY time I have an issue with the checkbox getting rechecked now is within Webform's conditionals page. It behaves correctly everywhere else. Normal content types work fine, Webform also works fine on ALL pages but the conditionals. There must be something different about the save process on that one page, but I'm not sure what it is?

Perhaps I'm missing something obvious and it totally may be a pathauto problem, not a webform problem... but it just seems strange that the conditionals page is the only one that "breaks".

ladybug_3777’s picture

Status: Closed (duplicate) » Active

Re-opening so this can be looked at one more time given the info provided. Are you seeing pathauto behave badly for you on ALL webform pages, or do you see the same thing I do where only the conditionals page resets the checkbox?

ladybug_3777’s picture

BTW, you are one of my favorite module maintainers since you are always so great about responding and helping out. I hope you know it's really appreciated!

DanChadwick’s picture

Status: Active » Closed (duplicate)

Thanks for the compliment.

The issue exists entirely within pathauto. When a module loads a node and then saves it, pathauto loses it's setting. That's why that issue is still open.

I can't speak for pathauo persists -- I didn't try it.

Seems incredible that this bug could exist for 4 years an still not be fixed. Nonetheless, it is not related to webform itself, but to how pathauto responds to the normal operation of modules. There are a handful of places in webform what are affected -- saving components, adjusting analysis settings. If you search the codebase for node_save -- these places are all affected.

I suggest that you push for a fix in the pathauto issue.

ladybug_3777’s picture

That's the weird thing, I don't see that behavior anymore now that I have version 1.2 of pathauto. The alias doesn't get lost when I save webform components or change any settings on the other webform pages. New nodes of other content types also work just fine. I've totally removed path auto persist from my test server and my only issue is with conditionals. LOL I'm starting to think I'm crazy or that my system has a ghost in it!

Maybe I just need another fresh install to be 1000% sure. I'll strip it down to just those 2 modules and see what happens.

ladybug_3777’s picture

oh and I agree that its CRAZY that the issue has been around so long. We've always known to use path auto with pathauto persist or else it really doesn't work right. That's why when the new version came out and things started acting wacky I was totally surprised. I wasn't expecting to be able to remove pathauto persist.

I'm off to spin up a new drupal instance. I'll let ya know what I find.

ladybug_3777’s picture

OK i'm starting to suspect workbench moderation may be a player in this. I was thinking I recently upgraded pathauto... but that wasn't it, it was WB moderation that I upgraded recently. Yup, I'm likely just going crazy.

ladybug_3777’s picture

OK, I'm still doing some research, but bottom line, this is actually a workbench moderation version 1.4 issue!! Not a pathauto issue and not a webform issue. Somehow I got confused thinking I updated pathauto when in reality I upgraded workbench moderation. Since I don't use moderation on my webforms I was thinking webform was having the trouble.

Ahhh, the mix of modules and the wonderful stew they create can be tough to work out.

For anyone else that is experiencing this weirdness it is due to this patch that was rolled into workbench moderation: https://www.drupal.org/node/2308095.

So here's what happened on my server (I plan to leave comments in the other modules too in case others have this issue to)

1) I had workbench moderation 1.3, pathauto 1.2 , and pathauto persist 1.3. Workbench moderation was turned on for all my content types EXCEPT webform. Everything was right in the world.
2) I upgraded to workbench moderation 1.4.
3) I started to notice that the "Generate automatic URL alias" checkbox (which should be on by default) was somehow getting turned off on all my content types after saving (Probably wasn't happening to my webforms, but I didn't notice at the time)
4) I somehow got confused thinking I upgraded pathauto and that they must've fixed the long standing issue with the checkbox.
5) I disabled pathauto persist. Everything seemed right in the world again
6) I then starting seeing issues only on my webforms.
7) I started thinking webforms had the bug
8) Dan set me straight (THANK YOU!)
9) Additional research on a stripped down server pointed me to the real issue.

So yes, this is an issue with pathauto, and yes, if you aren't using the newest workbench you should still use pathauto persist. Actually if you are using the new workbench you should back out the patch they rolled in here: https://www.drupal.org/node/2308095

Sorry for filing an issue for a non-bug. i appreciate your patience!

DanChadwick’s picture

This issue has been fixed in pathauto. Update to pathauto-7.x-1.3 or later.

Change record: https://www.drupal.org/node/2581993
Issue: #936222: Merge in pathauto_persist module functionality to prevent losing manual aliases with node_save() calls