Project

General

Profile

Actions

Bug #19213

closed

Its not possible to save sys_templates bigger than 64KB

Added by Sven Juergens over 16 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2008-08-12
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.1
PHP Version:
5.0
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

In the Setup field in the Backend it's not possible to save data bigger than 64KB, if you have more than 64KB, its cut off. Anymore there are no warnings, that is data can't save to DB.

It's possible that the function processAccordingToConfig(&$value,$fInfo) {

...
case 'blob':
$value = substr($value,0,65536);
...
}
in class.t3lib_sqlengine.php
it's the reason for that?

(issue imported from #M9158)

Actions #1

Updated by Chris topher over 14 years ago

This is still an issue with current trunk.
Since revision 3368 there are no fields of the type "blob" in table sys_templates anymore, but some "text" fields. And these are handled the same way by the function you mentioned:

case 'text':
case 'blob':
$value = substr($value,0,65536);
break;

Actions #2

Updated by Chris topher over 14 years ago

After reading the MySQL Docs I think, that this is not fixable (at least not for TYPO3):
The maximum length for BLOB and TEXT is determined by the storage requirements. And the maximum size of a row in a MyISAM table is 65,535 bytes...
See http://dev.mysql.com/doc/refman/5.1/en/blob.html
http://dev.mysql.com/doc/refman/5.1/en/storage-requirements.html

Sitenote: When you try to save a text, which is too long, you get a message in the TYPO3 log module:
"These fields are not properly updated in database: (config) Probably value mismatch with fieldtype."

Actions #3

Updated by Sven Juergens over 14 years ago

sorry, for reopen but in my opinion this is a really big problem.
Imagine, you have a website with lot of Conditions in a single sys_template, now you save a sys_template bigger than 64 KB, there is no Warning, no Information and the closing part of the Condition is cut away. in a really worst case you destroy the complete page, because your condition not work.

And the Message in the TYPO3 log Module is not very herlpful in this moment, the sys_template is saved and the cache is deleted.

Actions #4

Updated by Chris topher over 14 years ago

Hmm, I see.
So there could be a check, if the datasize is to big (as there already is basically).
And if it is, there should be a (flash) message telling you about the problem.
The changed data should be displayed again (so that you don't loose anything).
But nothing should be saved and no cache deleted etc.

Can you provide a patch, Sven?

(Just as a workaround: If this error destroyed your page, I think you should be able to restore a working record (a template in your case) by reverting the change in the Belog module. And you obviously can use multiple templates to avoid this problem.)

Actions #5

Updated by Sven Juergens over 14 years ago

hi Christopher,
Sorry, at the moment I don't have time for creating a patch, maybe at a later time.

and yes you're absolutely right with your workaround, especially with using multiple templates.
But sometimes if you got a TYPO3 System with a lot of legacy Code and no time for restructure ... In my case, it was a configuration for mailformplus, i killed some condtions with this bug and noticed it two or three days later.

Actions #6

Updated by Dmitry Dulepov over 13 years ago

  • Status changed from Needs Feedback to Closed
  • Target version deleted (0)

Please, try t structure your templates better. 64K is too much.

Actions

Also available in: Atom PDF