No problem to create a panel page with Panels 5.x-1.2.
Upgrating to 5.x-2.0-beta2 I can't do that because the Path field is locked:
Go to the Panel pages menu item (Panels > Panel pages)
Click the 'Add' tab at the top.
Select the 'Two column stacked layout'.
Set the Panel name to: a test panel
Now I try setting the path, but the Path field is locked. So I can't set anything for the path. If just click 'Next' button to go ahead, I got a warning: "Path field is required". So a panel page cannot be created.
Also I have checked my existing panel pages created with 5.x-1.2. I found their Path fields are locked too, which can not be changed anymore.
Is there something wrong? Any solution?
BTW, a few days
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | only_disable_path_node_217992.patch | 1 KB | greggles |
Comments
Comment #1
astra commentedI found a clue why the Path field of Panels is locked.
Because of the Pathauto module installed to my site, I suspicion it could perhaps cause this problem. For testing I disable Pathauto, then go to Panel pages to add a panel. The Path field is now activate and editable. If the Pathauto module is enabled again, the Path field of Panels will be locked again too.
Any solution to solve this problem?
Comment #2
merlinofchaos commentedHey pathauto folks, this seems to be a bit overzealous.
Comment #3
gregglesSure - what do you suggest as a solution?
I haven't tested panels2 yet (will soon). The feature in Pathauto is to lock the path field and display a checkbox next to it alerting users that Pathauto will automatically create an alias for the node. If the user wants they can unclick that checkbox and the path field will become enabled (it is enabled by default and then disabled with javascript so that it can be enabled later with an uncheck of the box). It sounds like panels has turned the node entry form into a wizard, which is probably what is pushing that checkbox off of this page which leaves the path field permanently disabled.
One workaround is that this behavior from Pathauto only happens if 1) the user has set a pathauto pattern for this node type 2) they have set a default pattern for all nodes. So, unset the default and unset the pattern for panels.
Comment #4
gregglesWhich version of Pathauto were you using? I can't repeat this bug.
Comment #5
astra commentedI have two sites using the same versions:
Drupal 5.7
Pathauto 5.x-2.0
Panels 5.x-2.0-beta2
One fresh install site works fine. The Path field from Panels ALWAYS can be editable.
But if enable Pathauto this problem(Path field disabled) will appear on my another site , which was upgrated from Panels 5.x-1.2 to 5.x-2.0-beta2.
Any solution to fix it?
Comment #6
gregglesOk. In my testing it appears that this is only a problem for "panel pages" so I've modified the form alter so that it only runs when on a example.com/node/* page.
Given that I can't repeat this issue, I'd appreciate if you can test it, astra, and if perhaps another person can confirm the bug before I commit this.
Comment #7
gregglesComment #8
astra commentedFor a test, I use your patch for function pathauto_form_alter($formid, &$form) and just change the code
as
I'm glad it works now for my upgrading site. The Path field from "Panel pages" can be editable with Autopath enabled.
Hope it's helpful for you to fix this problem in next version.
Comment #9
gregglesSo, you are saying that you manually applied the patch and it works now?
That sounds good to me. I will apply this when I get back to my dev environment (tuesday) and roll a release in a week or two. Thanks for the help testing.
Comment #10
astra commentedYes, just manually change the code from your patch and it works.
But in the same case a fresh installed site of mine is still works fine without applying the patch. This may be helpful for your thinking.
Comment #11
gregglesOk, fixed in 5.x-2 and HEAD. This is maybe not the best solution but in the future if someone finds a problem with this I can investigate more fine grained ways of fixing this.
Comment #12
dropcube commentedI reproduced the steps indicated here and I am not having any issues. I installed panels-5.x-2.0-beta2 and pathauto-5.x-2.1 on a fresh Drupal installation and everything worked as expected. In fact, the code at
pathauto_form_alterdoes not interfere with panels, checking$form['#id'] == 'node-form'is enough. The conditionarg(0) == 'node'introduces a bug that does not allow to create aliases for nodes created programmatically, see this issue.astra: Could you please provide more info. Verify if you have installed any other module that alter forms, this may be the cause of your issue.
Comment #13
greggles@dropcube - You have to start using Panels5.x-1 and upgrade to Panels5.x-beta2. If you install 5.x-2.0-beta2 directly then the bug is not present.
Comment #14
dropcube commentedAnyway, actually I can not see any problem with the
pathauto_form_alter, let me try upgrading from panels-5.x-1...Comment #15
gregglesI think this is "fixed" and we'll fix the other issue in the other issue.
Please re-open and explain if you disagree.
Comment #16
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.