Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2020-08-14 17:13:17

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,269
Website

size limitation in forms?

After posting this issue with my shortcode and taking a break, I revisited my environment and found that the shortcode is saved up to line 1098, trimming the rest. Note that I could not see this before as the ajax saves did not show that trim. I had to click on the form’s link and basically re-load/visit the page. Is there a size limitation in forms?


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github | Covid-19; a resource
I do my best editing after I click on the submit button.

Offline

#2 2020-08-14 17:21:41

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,718
Website

Re: size limitation in forms?

Yes. 64KB.

Incidentally, I tried to paste your entire media shortcode into a Form and the Ajax save failed. It’s too darn big! I had to hack out a tonne of it to get it to save.

EIDT: It didn’t truncate it in my case, just refused to save with a red alert message until I’d hacked out enough to get it under the size limit. This leads me to believe that the result of the action may be MySQL/PHP version specific.

Last edited by Bloke (2020-08-14 17:23:14)


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

#3 2020-08-14 17:26:18

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,269
Website

Re: size limitation in forms?

Bloke wrote #325347:

Yes. 64KB.

Do you think that it will be a very bad idea to increase that to 128KB? Servers are stronger now.

>Edit: I am not suggesting that because of the shorcode as I could easily split it. It is a genuine question.

Last edited by colak (2020-08-14 17:31:29)


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github | Covid-19; a resource
I do my best editing after I click on the submit button.

Offline

#4 2020-08-14 18:10:06

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,718
Website

Re: size limitation in forms?

The next size up from TEXT is MEDIUMTEXT which is up to 16MB. A big leap!


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

#5 2020-08-15 04:42:14

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,269
Website

Re: size limitation in forms?

Bloke wrote #325350:

The next size up from TEXT is MEDIUMTEXT which is up to 16MB. A big leap!

That is indeed too much for forms. I had no idea that mysql had this groupings. I thought that the capacities were defined by the devs.


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github | Covid-19; a resource
I do my best editing after I click on the submit button.

Offline

#6 2020-08-15 07:44:28

etc
Developer
Registered: 2010-11-11
Posts: 3,855
Website

Re: size limitation in forms?

Even 64KB full of tags can be stressing for the parser.

Offline

#7 2020-08-15 08:00:38

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,269
Website

Re: size limitation in forms?

etc wrote #325356:

Even 64KB full of tags can be stressing for the parser.

Noted! I’ll have to split the codebase.


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github | Covid-19; a resource
I do my best editing after I click on the submit button.

Offline

#8 2020-08-15 08:04:18

etc
Developer
Registered: 2010-11-11
Posts: 3,855
Website

Re: size limitation in forms?

colak wrote #325360:

I’ll have to split the codebase.

Or somehow modularize it, perhaps?

Offline

#9 2020-08-15 08:17:02

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,269
Website

Re: size limitation in forms?

etc wrote #325361:

Or somehow modularize it, perhaps?

I started creating variables for the widely used lines of code, but modularising will indeed be much better and it will give me a chance to think about it in a deeper way!


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github | Covid-19; a resource
I do my best editing after I click on the submit button.

Offline

#10 2020-08-15 09:26:38

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,718
Website

Re: size limitation in forms?

colak wrote #325366:

I started creating variables for the widely used lines of code, but modularising will indeed be much better and it will give me a chance to think about it in a deeper way!

Yes! There’s soooo much duplication in that <txp::media> shortcode. There has to be a way of refactoring it somehow to help the poor parser out. My site’s memory usage went into meltdown when I added a video to it :)


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

Board footer

Powered by FluxBB