Bug #48337
Problem with DCE 0.8.1 and TYPO3 6.1.0 (special character like äöü)
0%
Description
I used DCE 0.8.0 and TYPO3 6.0.5 with no problems.
Now, I updated TYPO3 to 6.1.0 and DCE to 0.8.1.
And now when I clear the TYPO3 cache, all sites with dce content elements in it are broken(html representation). There are problems with special character like äöü and some html disapears. But If I edit one content element of a site and save it without changing anything then the site renders correctly.
Files
Related issues
Updated by Armin Vieweg over 7 years ago
- Status changed from New to Needs Feedback
- Assignee changed from Armin Vieweg to Lukas no-lastname-given
Hi Lukas,
I need more informtaion this is not enough to reconstruct this behavior.
Am I able to check the bug right on the server?
Please contact me via mail, so I can help you much better: armin@v.ieweg.de
Thanks.
Armin
Updated by Armin Vieweg over 7 years ago
- Status changed from Needs Feedback to Accepted
- Assignee changed from Lukas no-lastname-given to Armin Vieweg
Okay, got it. No feedback necessary anymore.
Updated by Claudia Höhne over 7 years ago
HI,
is this bug fixed in latest version?
got the same problem with newest 8.3 on 6.1
Claudia
Updated by Armin Vieweg over 7 years ago
Unfortunately not.
It seems to be a problem in TYPO3 core itself, because the bug does not appear in earlier versions of TYPO3.
Updated by Oliver Hader over 7 years ago
Albeit the PHP bootstrap has been changed a lot in TYPO3 6.0 it is still transparent...
However, Tx_Dce_Cache::getDce() creates a separate database connection during the initialization phase of ext_localconf files - I guess that missing further initializations are also problematic in this scenario...
Updated by Armin Vieweg over 7 years ago
Hm I'm not sure, because the array containing the infos about the DCE has the correct title with umlauts. If I assign it to fluid template, then it will get lost.
Updated by Oliver Hader over 7 years ago
Here's an intermediate solution: https://github.com/ohader/dce/commit/2a05c2fceed3d0635b7a69498ff09a3c94eaa762
The process is delayed to ext_tables to be able to use a correct database connection... With TYPO3 6.1 ext_tables will always be loaded, in front-end as well..
It might also be, that the caching framework has not been initialized correctly at that time in ext_localconf, thus reflection and partial caches might behave "differently". I did not track this further down than the bootstrap behaviour.
Updated by Armin Vieweg over 7 years ago
- Status changed from Accepted to Resolved
Finally got it!
The solution was pretty easy. Just execute a "SET NAMES utf8".
This fix has been released in version 0.8.5
Updated by Andreas Keck over 7 years ago
With version 0.8.5 and TYPO3 6.1.3 the problems not fixed.
After clearing the Cache, the umlauts are destroyed.
Updated by Thomas no-lastname-given over 7 years ago
Same here, I need to reload the page in Google Chrome with STRG+F5 to fix this.
Updated by Armin Vieweg over 7 years ago
- Status changed from Resolved to Accepted
Hm, el stupido.
I'll check it... again.
Updated by Benni Mack over 7 years ago
hey,
I suggest that we use the Caching Framework (FileBased) for that stuff for 6.x - is that a way to go?
Also, it seems pretty bad that every time getDce() is called, a new DB connection is set up.
I'm digging into it.
Updated by Armin Vieweg over 7 years ago
Benjamin Mack wrote:
Also, it seems pretty bad that every time getDce() is called, a new DB connection is set up.
Well, the getDce() method is just called twice. In createLocalconf and createExtTables method. I'm not sure but I think this is necessary, because at this very early point while initializing TYPO3 database connection does not exist. But I should check with $TYPO3_DB->isConnected() if a connection already exists, before creating a new one. That sounds reasonable.
Updated by Benni Mack over 7 years ago
Hey Armin,
alright, seems like a bigger problem.
In FluidTemplate.php there is a DB connect as well which does not do the SET NAMES call. I recommend using a UtilityClass to "DatabaseUtility.php" that returns a valid t3lib_DB object for any TYPO3 version. Cool for you? I'd provide a patch then.
Updated by Benni Mack over 7 years ago
Hey Armin,
attached is a patch that unifies the DB connection retrieval, and checks if a TYPO3_DB object already exists.
Fixes the problem on my installation with 6.1.3
Enjoy!
Updated by Armin Vieweg over 7 years ago
Cool Thanks!
I'll check it soon and release a bugfix version.
Updated by Armin Vieweg over 7 years ago
- Status changed from Accepted to Resolved
Fixed in last release.