Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2017-10-08 22:46:53

jpdupont
Member
Registered: 2004-10-01
Posts: 752

Impossible to save ...

Hello, on a site where I install the latest updates of dev 4.7, I am no longer able to save the articles. I have in chrome console the following error

VM1063:1 Uncaught SyntaxError: Unexpected token <
    at p (jquery.js:2)
    at Function.globalEval (jquery.js:2)
    at text script (jquery.js:4)
    at Qb (jquery.js:4)
    at A (jquery.js:4)
    at XMLHttpRequest.<anonymous> (jquery.js:4)

…when I click the “save” button for when I use the keyboard. The last article saved was on September 13th. I have tested on this site the dropzone developments of Oleg … Try Chrome and Firefox, same problem. On a fresh new 4.7 dev site, no problem …

Any idea ?

Offline

#2 2017-10-09 04:40:00

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,089
Website Mastodon

Re: Impossible to save ...

try solutions in this thread


…. texted postive

Offline

#3 2017-10-09 07:02:28

jpdupont
Member
Registered: 2004-10-01
Posts: 752

Re: Impossible to save ...

Thanks for your reply, bici, but it does not work.
- I already had a .htaccess, but with a different content. I added the recommended, reloaded all without success.
- On the same server, I have another site that works very well with file dev 4.7 of August 8th last. I replaced the textpattern file from the site that does not save with those files there. Without success.
- Because of this I suspect a table / database problem ??? I tried to do a repair / optimize in phpMyAdmin without result.

Offline

#4 2017-10-09 07:46:10

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

Re: Impossible to save ...

This usually happens when the browser expects a javascript response, but gets html. Dropzone shouldn’t have interfered with Write tab, but refresh (cmd+f5) textpattern.js just in case. And look at the servers response in browsers console when you save an article, maybe some clues there?

Offline

#5 2017-10-09 08:07:44

jpdupont
Member
Registered: 2004-10-01
Posts: 752

Re: Impossible to save ...

Refresh, delete cache … done, same problem.

Server response :

Fatal error: Uncaught Error: Class ‘Textpattern\Textfilter\Exception’ not found in /home/rouvroy/webapps/commune/textpattern/vendors/Textpattern/Textfilter/Registry.php:116Stack trace:#0 /home/rouvroy/webapps/commune/textpattern/include/txp_article.php(1299): Textpattern\Textfilter\Registry->filter(‘’, ‘’, Array)#1 /home/rouvroy/webapps/commune/textpattern/include/txp_article.php(201): textile_main_fields(Array)#2 /home/rouvroy/webapps/commune/textpattern/include/txp_article.php(128): article_save()#3 /home/rouvroy/webapps/commune/textpattern/index.php(222): include(‘/home/rouvroy/w…’)#4 {main} thrown in /home/rouvroy/webapps/commune/textpattern/vendors/Textpattern/Textfilter/Registry.php on line 116

Offline

#6 2017-10-09 09:28:26

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

Re: Impossible to save ...

This is the most intriguing:

Textpattern\Textfilter\Registry->filter('', '', Array)

The first argument of filter should be numeric, not empty. Can you check the value of use_textile in txp_prefs table? It is 1 by default.

Offline

#7 2017-10-09 10:05:35

jpdupont
Member
Registered: 2004-10-01
Posts: 752

Re: Impossible to save ...

Yes, use_textile is “1” …

Offline

#8 2017-10-09 10:10:13

jpdupont
Member
Registered: 2004-10-01
Posts: 752

Re: Impossible to save ...

in my Froala plugin, I force this :

$(".body .textfilter-value").attr("value","0");
$(".excerpt .textfilter-value").attr("value","1");});

Offline

#9 2017-10-09 10:15:43

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

Re: Impossible to save ...

jpdupont wrote #307330:

in my Froala plugin, I force this :

$(".body .textfilter-value").attr("value","0");...

Disable it, to see if the problem comes from here. If so, try $(".body .textfilter-value").val("0") instead.

Offline

#10 2017-10-09 16:26:49

jpdupont
Member
Registered: 2004-10-01
Posts: 752

Re: Impossible to save ...

I removed the 2 lines without success.

I try plugout to disable all the plugin, same problem

Offline

#11 2017-10-09 17:02:58

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

Re: Impossible to save ...

Then my only guess is that textile_body or/and textile_excerpt fields in textpattern table are incorrectly saved as empty strings instead of 0.

Offline

#12 2017-10-09 17:51:46

jpdupont
Member
Registered: 2004-10-01
Posts: 752

Re: Impossible to save ...

Table structure :

20	textile_body	varchar(32)	utf8mb4_unicode_ci		Non	1		
21	textile_excerpt	varchar(32)	utf8mb4_unicode_ci		Non	1

and in a record :

textile_body	varchar(32)			
0
textile_excerpt	varchar(32)			
1

Offline

Board footer

Powered by FluxBB