Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#61 2014-12-09 14:37:19

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.

cmcnair wrote #286373:

And how would I correct the problem if I could find it — completely delete the old title, then retype it (no copy / paste) — in the form view?

yes

And if you can’t find the exact article to correct just work backward correcting titles, with the last 10 articles (max).

Offline

#62 2014-12-09 19:10:01

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

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

You can modify textpattern/lib/txplib_misc.php: add the preg_replace line (without the + at the beginning):

Offline

#63 2014-12-09 21:36:58

cmcnair
New Member
Registered: 2014-12-09
Posts: 2

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

Thank you for the quick responses! I will try one or both solutions this weekend.

Offline

#64 2015-02-19 21:04:24

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

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

ruud wrote #286381:

You can modify textpattern/lib/txplib_misc.php: add the preg_replace line (without the + at the beginning):

Hi, I’m having exactly the same problem on a 4.5.4 site (yes, I know, but I don’t have the time right now to upgrade and figure out which MLP version to use…). I addes this line to txplib_misc.php and corrected the titles of the latest articles. Still getting the error though, any idea?

Offline

#65 2015-02-19 21:08:58

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.

Els wrote #288428:

Hi, I’m having exactly the same problem on a 4.5.4 site (yes, I know, but I don’t have the time right now to upgrade and figure out which MLP version to use…). I addes this line to txplib_misc.php and corrected the titles of the latest articles. Still getting the error though, any idea?

The fix only works for new articles! Are you shure you didn’t miss one article title? A quick fix could be to create an invisible ‘debug’ section and post 10 dummy articles.

Offline

#66 2015-02-19 21:27:37

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

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

kees-b wrote #288429:

The fix only works for new articles!

Do you mean that changes to existing articles still can’t be saved? Damn, the site owner wants to modify a lot of the existing articles…

Are you shure you didn’t miss one article title?

Don’t think so, there were only 3 new/modified articles since 2011.

Offline

#67 2015-02-20 13:33:28

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.

Els wrote #288431:

Do you mean that changes to existing articles still can’t be saved? Damn, the site owner wants to modify a lot of the existing articles…

I don’t know if new edit of a ‘wrong’ title cleans it with the fix installed. It does work with new ones.

Don’t think so, there were only 3 new/modified articles since 2011.

The problem is caused by invisible unicode characters preserved in the list of 10 ‘recent articles’ at the bottom of the edit page. If this error is caused by this bug it should go away by clearing all wrong titles by retyping the tittle by hand. In fact in our case it has allways been a copy-paste error from word documents. The worst ones were those were the character was before the title. This might happen with word documents with an empty line above the title. By just taking away the visible characters by selecting them the evil one might stay in place! When clearing the title be shure to completely empty the title field by doing a “select all”. If one wrong title is still in the list you need 10 good ones to clear the list.

Best practice might be to never ever copy paste directly from word documents!

Last edited by kees-b (2015-02-20 13:34:21)

Offline

#68 2015-02-20 14:08:20

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,433
Website GitHub

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

kees-b wrote #288429:

The fix only works for new articles!

The patch alters the code that Txp uses to render its javascript so, in theory at least, any rogue characters remaining in place will be stripped, even if they are still present in your article titles. This should allow you to carry on as normal, despite the existence of such characters.

The fact that Els is still seeing the error even after patching the file might indicate something else afoot.

@Els: Is there any more detail you can give us (perhaps from debugging mode?) that might give us a clue what to look for?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#69 2015-02-20 21:09:38

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

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

Well, I changed all 10 last modified articles in the textpattern table, and in the MLP language tables, but no difference. I am noticing other strange behaviour now, still trying to make sense of it…

Bloke wrote #288462:

@Els: Is there any more detail you can give us (perhaps from debugging mode?) that might give us a clue what to look for?

I am looking right now, Stef, will post it in a minute.

Offline

#70 2015-02-20 21:52:11

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

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

OK, here goes… Not sure if any of this is related to the original problem, but I’ll mention it anyway.

As I said, changing the article titles (in the textpattern table and the language tables) following Kees’ instructions did not solve the ‘form could not be submitted’ problem.

The site is a MLP site with three languages and it has shown strange behaviour in the past, mainly caused by renditions showing up in the wrong language table, while they look OK in the MLP article list. I haven’t been able to determine if this is caused by something the site owner did, but I used to fix it by deleting the faulty renditions directly in the database. Apparently this is still happening now and then, because I just found a couple of nl-nl and en-gb articles in the pt-pt table…

The site now has rvm_maintenance turned on, but the following happens regardless of production status. I noticed that some single article pages (using the ‘view’ link in the write tab) don’t display anything except

EDIT: Ah, that was stupid, forget this please. The articles were hidden…

Debugging output for single article pages:

Notice: Undefined offset: 8192 in /home/httpd/vhosts/xxxxxxxxx/httpdocs/textpattern/lib/txplib_misc.php on line 681
Tag error:  <txp:zem_contact_select label="Size" list='<txp:output_form form="formaten_prijzen" />' /> ->  : Function split() is deprecated while parsing form “artikel_foto_single_details” on page “arlette”
textpattern/lib/txplib_misc.php(813) : eval()'d code:539 split()
textpattern/lib/txplib_publish.php:421 zem_contact_select()
textpattern/lib/txplib_publish.php:321 processTags()
textpattern/lib/txplib_misc.php(813) : eval()'d code:95 parse()
textpattern/lib/txplib_publish.php:421 zem_contact()
textpattern/lib/txplib_publish.php:321 processTags()
textpattern/publish/taghandlers.php:3944 parse()
textpattern/lib/txplib_publish.php:421 if_custom_field()
textpattern/lib/txplib_publish.php:334 processTags()
textpattern/lib/txplib_misc.php:1975 parse()

Notice: Undefined offset: 8192 in /home/httpd/vhosts/xxxxxxxxx/httpdocs/textpattern/lib/txplib_misc.php on line 686

Notice: Undefined offset: 8192 in /home/httpd/vhosts/xxxxxxxxx/httpdocs/textpattern/lib/txplib_misc.php on line 681
Tag error:  <txp:zem_contact_select label="Size" list='<txp:output_form form="formaten_prijzen" />' /> ->  : Function split() is deprecated while parsing form “artikel_foto_single_details” on page “arlette”
textpattern/lib/txplib_misc.php(813) : eval()'d code:539 split()
textpattern/lib/txplib_publish.php:421 zem_contact_select()
textpattern/lib/txplib_publish.php:321 processTags()
textpattern/lib/txplib_misc.php(813) : eval()'d code:95 parse()
textpattern/lib/txplib_publish.php:421 zem_contact()
textpattern/lib/txplib_publish.php:321 processTags()
textpattern/publish/taghandlers.php:3944 parse()
textpattern/lib/txplib_publish.php:421 if_custom_field()
textpattern/lib/txplib_publish.php:334 processTags()
textpattern/lib/txplib_misc.php:1975 parse()

Notice: Undefined offset: 8192 in /home/httpd/vhosts/xxxxxxxxx/httpdocs/textpattern/lib/txplib_misc.php on line 686

Any ideas?

Oh, and I thought that errors in debugging mode were not supposed to be visible on a 503 page? It was about a deprecated tag attribute and I corrected it, but it would be nice to be able to debug without the world looking over my shoulder… ;)

Last edited by els (2015-02-20 22:00:32)

Offline

#71 2015-02-20 23:03:41

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,433
Website GitHub

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

Els wrote #288468:

renditions showing up in the wrong language table

Weird. Can’t say I’ve ever seen that one so it’d be interesting to try and track it down. Mind you, if it’s an old version of MLP you’re running then whatever’s causing it may well have gone away now.

Undefined offset: 8192 in … txplib_misc.php on line 681… and 686

That warning will be what’s causing the Form cannot be submitted errors. Any unexpected output from an AJAX-related activity causes that behaviour, as it expects a valid response (it’ll handle either positive or negative responses, as long as they’re well-formed, of which an unceremonious PHP error spat out by the system is not).

Since you’ve patched your txplib_misc.php file by adding one line, your line numbers are off by 1 compared with the official release. So looking at 4.5.4’s line 680 and 685 leads us to the $error array and the fact the tag handler doesn’t intercept E_DEPRECATED notices (error code 8192).

Thus the deprecated function in zem_contact_reborn is triggering the error. If I was a betting man, I’d say edit that plugin and swap any mention of split for explode, then the error will go away and normality will be restored.

Hope that helps.

EDIT: Oh, and in regards your note about 503 pages, yeah, it’s a tad annoying that errors show through. I’ll add it to the todo list if possible: silencing warnings on 503 pages seems reasonable to me, but I don’t know if the system can treat them separately at present.

Last edited by Bloke (2015-02-20 23:05:22)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#72 2015-02-20 23:56:31

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

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

Thanks, Stef! No more errors in debugging mode after editing the plugin. Still getting Sorry, the form could not be submitted. Please try again later. though…

Offline

Board footer

Powered by FluxBB