Details
-
Bug
-
Resolution: Unresolved
-
Medium
-
None
-
2012.2, 4.7.0-dev, 4.6.0
-
None
Description
When an object gets a truncated name (and url) because the source attribute is longer than ContentSettings/ContentObjectNameLimit, php uses substr() to create the shortened version of the name.
But that is not utf8-safe, and will create invalid utf8 strings. The db will then halt with a transaction failed error and prevent such object to be stored.
As I do not think eZ wants to enable mb_* functions by default, we should fix eZNamePatternResolver::resolveNamePattern instead
(for options: see http://stackoverflow.com/questions/1967540/truncate-a-utf-8-string-to-fit-a-given-byte-count-in-php)