I don't know if this is a bug for Webforms or a Smart Menus/Tabs, but I have a Webform on my site and after I installed the Smart Menu/Tabs module and enabled them, my webform would show a "Page Not Found" error after editing or adding a form component. I then disabled the Smart Menu/Tabs and...no more errors. I tried this twice, same result. I'm not sure why it happens, but I thought I'd better post it here in case it was a bug that could be resolved.
Comments
Comment #1
rdeboerThanks for posting this, Shannon. Will look into it - Rik.
Comment #2
rdeboerHave just tried to reproduce this but can't.... I have edited a web form (both Configuration and Form components) and saved it several times. No error...
On your system, does it happen for form components of any specific type (textarea, email, file, fieldset, etc...)?
And is it with Smart Menus (sub)module or the Smart Tabs (sub)module? Or only when both are enabled? In fact for Smart Menus to work you need to enable the "Smart navigation" block on the Site building >> Blocks page... if not then Smart Menus is effectively disabled.
What URL is visible in your browser address bar when you get "Page not found" ?
Have you tried using the page exclusions lists on the Administer >> Site configuration >> Smart menus and Administer >> Site configuration >> Smart tabs pages?
For instance, you could enter the following under "Pages to exclude from the collection specified above" (on the Administer >> Site configuration >> Smart tabs page) the following:
Does that change anything for you?
Also on these two configuration pages you can switch on a debug trace, which may shed some light on what's happening.
Comment #3
ShannonK commentedOK - So I enabled each module individually to test. There were no problems with Webform when either Smart Tabs or Smart Menus were enabled individually. When I enable both of them (and enable the Smart Navigation block), then I get the Page not found error when adding a form component.
The component can be any any kind (date, textfield, etc.).
Here's the URL for Page Not Found: "http://mysite.com/node/252/edit/components/new"
I entered the page exlusion "node/*/edit/components*" for both Smart Tabs and Smart Menus, and tested after each, but still received the error message.
Switched on debug trace for both tabs and menus. The following trace message appears on Page not found: "Auto-selecting previously active Delete tab at node/252/edit/components/new"
Does this tell you anything?
Comment #4
rdeboerGreat Shannon! That has eliminated some of garden paths that I was going down and makes it so much easier to reproduce.
Thanks for pointing me in the right direction.
Will get back to you... Give me a few days.
Rik
Comment #5
ShannonK commentedThank you - it's a great module and definitely worth the wait! Let me know if/how I can help.
Comment #6
rdeboerFixed in 6.x-1.2, e.g any version dated 23-Dec-09 or later.
Simply download new module as per normal. Log out (to clear out existing Smart tabs cache) and log back in.
Just to make sure everything is properly initialised go to Site building >> Modules and press "Save configuration".
Then go to Site configuration >> Smart tabs and press "Reset to defaults" followed by "Save configuration".
That should do the trick.
Comment #8
vinmassaro commentedReopening this because we are seeing the page not found issue with Smart menus/Smart tabs 6.x-1.5 with Smart Tabs enabled, and Webform 6.x-3.1. Just added exclusions for node/*/webform and node/*/webform/* for the time being, which seem to fix the issue.
Comment #9
rdeboerThanks for the report and the workaround! I may have to add this path to the default list of exclusions. Will investigate.
Comment #10
rdeboerWas able to reproduce the issue whereby adding a second or subsequent field by pressing the "Add" button on the node/%/webform page resulted in a page not found error.
Fixed by adding node/*/webform/components/new to the page exclusion list.
Comment #11
rdeboerChecked into repository. Versions 6.x-1.7 and later.
Comment #13
bzsim commentedThis is still an issue for me. I get "page not found" whenever I try to add a second component to my webform. I have installed Webofrm 6.x-3.4 and Smart Tabs/Menus 6.x-1.7.
My steps: I successfully added a first component, but a second component took me to page not found. I stumbled upon this page and followed the instructions above. I added the page exclusions of: node/*/webform, node/*/webform/* & node/*/webform/components/new. I was still getting page not found. My URL of page not found was node/*/webform/components/new/delete.. So I went back to my exclusions and added node/*/webform/components/new/*. Then when I tried to add a second component, the page refreshed and I did not get the Page not found, but my component didn't show up in the list. I tried a few more times and it acted as if it accepted the component, but it's not in the list. Then I went to the "E-mails" tab, then the "Form settings" tab, nothing I could see that would help the situation, so I tried to go back to "Form Components" and it took me to the "E-mails" tab. I tried clicking several times on "Form Components" and it wouldn't load. I tried adjusting the URL and again, it went back to "Emails". So I tried to undo everything I did by deleting the current page for the webform, deleting my exclusions, and starting over. I added a new webform, but now when I try to add the first component the page refreshes and it doesn't show up in the list. So now it's all messed up. Any suggestions?
UPDATE: After I logged out, things were a little better. I was able to add a first component, but still receiving a "page not found" for second components with the above mentioned exclusions on. The URL has changed to node/*/webform/components/new/clone
Double UPDATE: I originally only added node/*/webform/components/new to "Pages to Exclude". I decided to also add it to the place above that, "Pages to exclude from the collection specified above" and now it works, but then I couldn't Edit them. The page kept refreshing to node/*/webform/components. So I removed node/*/webform/components/new from the "Pages to Exclude" section and left it in "Pages to exclude from the collection specified above" and that seemed to do the trick. Just wanted to post in case someone else goes down the same path.
Comment #14
rdeboerThank you for your elaborate analysis bzsim.
Webform's menu and tab structure is a little unorthodox in places. Looks like I have to refine the default exclusions in Smart tabs.
Comment #15
bzsim commentedFound one more odd thing today...I was able to edit the first component in my list, but now I cannot edit it again or any other component. I had to log out and back in in order to be able to edit a component in the form.
Comment #16
rdeboerYeah, logging out clears the Smart tabs memory, so I can see that this might have an impact. Sorry -- will investigate.
Comment #17
jd_hannah commentedThanks SOOO much for your detailed report on this issue. Saved me a lot of hassle!
Comment #18
mradamjohn commentedThanks for the info - - I was uncertain why webforms started acting hokey in a similar way to what I found here. Since I don't rea;;y use them on this site and couldnt quite make heads or tails of what to exclude, easily... just unchecked "Allow Smart tabs to control tab behaviour" and all is right in the world once again. Hope this eventually gets resolved, happy to report more detailed findings if needed.
Comment #19
rdeboer