Hi,
I used views to put my webform into a block (Webform block module showed a strange layout behaviour). Everything works fine in connection with Ajax as long as logged in users submit a feedback through my webform. But when anonymous users do so a website just showing the following code appears under the URL-alias of the webform:
<textarea>{ "status": true, "updaters": [ ], "debug": [ ], "messages_error": [ ], "messages_status": [ { "id": 0, "value": " Vielen Dank für Dein Feedback - zögere nicht, uns weiteres Feedback zu geben, wenn Dir noch irgendetwas auffällt. \x3cp style=\"text-align:center;\"\x3e\x3cstrong\x3eFür ein neues Feedback: Einfach alte Nachricht löschen, neue schreiben und abschicken!\x3c/strong\x3e\x3c/p\x3e" } ], "messages_warning": [ ], "redirect": null, "preview": null, "form_id": "webform_client_form_674", "options": { "enabled": true, "disable_redirect": true, "remove_form": false } }</textarea>
So just this textarea is shown - everything else is white.
When anonymous users submit the webform directly from the node (not from the block) everything is fine as well. Ajax configuration is "activated" and "Disable Redirect" but it doesn't matter if "Disable Redirect" is on or off - anonymous users will always be shown this white screen with the textarea showing above text.
Has anyone an idea???
Greez,
Tobias
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | ajax_error.png | 66.32 KB | kvvnn |
Comments
Comment #1
tobiberlinForgot to say: submissions does not fail - it is just that anonymous users are shown this ugly white website with this small textarea
Comment #2
baxang commentedI have exactly same one except using formblock module instead of webform. It doesn't show any 'Ajax' related behaviour at all. And in my case, it doesn't work whether from the node/add page or from the block and logged-in user or anonymous user.
Comment #3
Annalog commentedI have the same issue, I think. When a user is on the contact form page and logs in using the (ajax enabled) loginblock, only the white page with the textarea appears. Interesting, the window location is correct. Just need to hit enter in the address bar to get back to the contact page, successfully logged in. I have no idea where to start...
Comment #4
reg commentedI have the same result but different circumstances.
Using WYSIWYG and TinyMCE, if I "disable rich-text" on a normal node edit and then save the node, exactly the same result:
{ "status": true, "updaters": [ ], "debug": [ ], "messages_error": ...
The URL is right but the page displayed is wrong and I don't see any errors in my logs to give a clue what it is. However disabling:
Ajax plugin - wysiwyg
fixes it.
Perhaps this additional information will help the maintainers pinpoint it.
Comment #5
reg commentedhere's my guess as to what's happening but I don't know for sure and I don't know Drupal's handling of JS to fulling understand the code. With that caveat, with many years of programming here's my best guess:
this code seems to be the key:
I'm thinking that there are various circumstances when the WYSIWYG editor is not attached but the code gets called, runs, and tries to detach an editor that's not attached in the first place and that's when we see the weird screen. In my case clicking "disable rich-text" probably detaches the editor in a way that this code has no checks for.
Comment #6
kvvnn commentedI am getting this error when loading Node Edit form in a Lightbox, or in an inline element through Ajax, and then do an Ajax submit on the form.
See http://www.erikhedin.com/web-design/drupal-tips/Easy-Ajax-Nodes-Lightbox... to see what I am doing.
One thing that I noticed was the the view I am doing all of this in is not loading some scripts that the /node/edit page is loading, where Ajax works. In particular, ahah.js.
Will work a bit on debugging tomorrow and post any success.
Here is exactly what happens :
I hit a link to either get a lightbox or inline-load of a node-edit form. Loads good. I click on submit, and it redirects the page to /node/[nid]/edit with the following HTML :
Comment #7
kvvnn commentedDuplicate : http://drupal.org/node/352292
Comment #8
kvvnn commentedComment #9
kvvnn commentedI was getting this same issue loading a node form via Ajax into an inline element.
I have solved it by using the following Javascript after the form loads :
Comment #10
kvvnn commentedThis is also happening to me when I try and submit a form (that submits via Ajax fine) using a javascript call like :
or