Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2013-06-07 16:32:29

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: Edit error: Sorry, the form could not be submitted. Please try again.

This is a plugin problem: you’ll need to identify the culprit(s) and hack them not to misbehave. You can narrow down your suspects by concentrating on ones that interact with the write tab.

I manually hacked bot_wtc and mck_article_image to make them behave themselves.

I found a solution that worked for me here Thanks Jukka

Identify the culprit plugins

  1. disable 1/2 your plugins and see if the error occurs:
    • If YES, the culprit(s) is/are in the active batch
    • If NO, the culprit(s) is/are in the disabled batch
  2. repeat the above on the batch with the culprits.

Hack the plugin(s)

  1. locate the callbacks for functions that look like this register_callback('my_function_name', 'article');
  2. replace them with register_callback('my_function_name, 'admin_side', 'head_end');
  3. locate the functions that start with: function my_function_name (){...
  4. insert inside the first “{” right after the code below:

global $event;
if($event !== 'article') {return;}

Alerts be gone.

Offline

#14 2013-06-07 18:35:05

kees-b
Member
From: middelburg, nl
Registered: 2004-03-03
Posts: 235
Website

Re: Edit error: Sorry, the form could not be submitted. Please try again.

etc wrote:

Weird that it happens only on article save.

Yes, and even weirder is that it happens only with edits, not with the initial article save.

Try to enable response body logging in Firefox web console

How and were do I do that? Do you mean Tools | Webdeveloper or Firebug?

Offline

#15 2013-06-07 18:39:09

kees-b
Member
From: middelburg, nl
Registered: 2004-03-03
Posts: 235
Website

Re: Edit error: Sorry, the form could not be submitted. Please try again.

mrdale wrote:

This is a plugin problem

Hi Dale,

But nothing changed before and after the popups started to appear. I will check them anyhow this weekend when sitetraffic is low(er).

Offline

#16 2013-06-07 19:24:54

kees-b
Member
From: middelburg, nl
Registered: 2004-03-03
Posts: 235
Website

Re: Edit error: Sorry, the form could not be submitted. Please try again.

etc wrote:

Try to enable response body logging in Firefox web console.

Looked around with Firebug Console | Warnings

This warning is displayed when the article is edited:

Use of attributes' specified attribute is deprecated. It always returns true. [Break On This Error] ...ction(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,ar... jquery.js (line 2)

Offline

#17 2013-06-07 19:44:11

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: Edit error: Sorry, the form could not be submitted. Please try again.

what are your plugins?

Offline

#18 2013-06-07 19:48:13

kees-b
Member
From: middelburg, nl
Registered: 2004-03-03
Posts: 235
Website

Re: Edit error: Sorry, the form could not be submitted. Please try again.

mrdale wrote:

what are your plugins?

adi_menu
arc_youtube
ob1_pagination
pap_contact_cleaner
rah_comment_spam
rah_custom_feed
rss_admin_db_manager
rss_auto_excerpt
rvm_maintenance
smd_lately
smd_query
smd_where_used
tru_tags
wet_commentmagic
wet_haystack
wet_recent_comments
zem_contact_lang
zem_contact_reborn

Offline

#19 2013-06-07 19:54:20

etc
Developer
Registered: 2010-11-11
Posts: 5,189
Website GitHub

Re: Edit error: Sorry, the form could not be submitted. Please try again.

kees-b wrote:

How and were do I do that? Do you mean Tools | Webdeveloper or Firebug?

Firefox own Web developer/web console, then right click inside the console and enable “Log request and response bodies”. Save an article, you should then see a POST request in the console. Click on it and check if the response body looks ok.

Offline

#20 2013-06-07 20:04:43

kees-b
Member
From: middelburg, nl
Registered: 2004-03-03
Posts: 235
Website

Re: Edit error: Sorry, the form could not be submitted. Please try again.

etc wrote:

Firefox own Web developer/web console, then right click inside the console and enable “Log request and response bodies”. Save an article, you should then see a POST request in the console. Click on it and check if the response body looks ok.

Thanks! This is logged when the article is saved:

[21:59:33.678] Use of attributes’ specified attribute is deprecated. It always returns true. http://domain.nl/textpattern/jquery.js:2
[21:59:33.751] POST http://domain.nl/textpattern/index.php [HTTP/1.1 200 OK 82ms]
[21:59:33.752] GET http://domain.nl/textpattern/txp_img/spinner.gif [HTTP/1.1 304 Not Modified 31ms]

Same warning and nothing special. Should I look further?

Offline

#21 2013-06-07 20:09:42

etc
Developer
Registered: 2010-11-11
Posts: 5,189
Website GitHub

Re: Edit error: Sorry, the form could not be submitted. Please try again.

Click on the POST link and look at the response body, you should see something like $(document).ready...

Offline

#22 2013-06-07 20:17:10

kees-b
Member
From: middelburg, nl
Registered: 2004-03-03
Posts: 235
Website

Re: Edit error: Sorry, the form could not be submitted. Please try again.

etc wrote:

Click on the POST link and look at the response body, you should see something like $(document).ready...

Indeed, it starts with:

$(document).ready(function() { $(“#messagepane”).html(“<span id=\“message\” class=\“success\”>Artikel geplaatst <a href=\”#close\” class=\“close\”>&times;</a></span>”); $(‘#message.success, #message.warning, #message.error’).fadeOut(‘fast’).fadeIn(‘fast’); });;
$(“[name=sLastMod]”).val(“1370635582”);
$(“[name=sPosted]”).val(“1370634184”);
$(“#keywords”).val(“”);
$(“#url-title”).val(“test”);
$(“#recent_group .recent”).replaceWith(“<ul class=\“recent plain-list\”>\n <li class=\“recent-article\”><a href=\”?event=article&step=edit&ID=558\”>test</a></li>\n

and continues with a lot of code…what should I look for?

Offline

#23 2013-06-07 20:37:49

etc
Developer
Registered: 2010-11-11
Posts: 5,189
Website GitHub

Re: Edit error: Sorry, the form could not be submitted. Please try again.

That looks normal. Try to disable “Use admin-side plugins?” option in admin/preferences/advanced, and check if the popup is still there on save?

Offline

#24 2013-06-08 06:41:47

kees-b
Member
From: middelburg, nl
Registered: 2004-03-03
Posts: 235
Website

Re: Edit error: Sorry, the form could not be submitted. Please try again.

etc wrote:

That looks normal. Try to disable “Use admin-side plugins?” option in admin/preferences/advanced, and check if the popup is still there on save?

It’s still there.

What actually wonders me most is that at the initial save no error appears but at a second (edit) save it does. This makes me think if there is a check by the textpattern.js script of the allready existing article content in the database. Weird but another hypothesis to check maybe?

-k

Last edited by kees-b (2013-06-08 06:49:58)

Offline

Board footer

Powered by FluxBB