Bug #62130
closedWarnings in BE due to LocallangXmlParser
100%
Description
We experienced the attached warnings shown in BE. After clearing all caches and in BE for example opening a content-element for editing the errors appeared. Problem boiled down to XML-file EXT:t3s_headerslider/pi1/locallang_csh.xml
Trying to shrink that XML-file as far as possible the error still persisted. I can't yet say why only this one file caused problems. Moving that file away the error was gone.
PHP Warning
PHP Warning: count() [function.count]: Node no longer exists in /var/www/html/typo3/sysext/core/Classes/Localization/Parser/LocallangXmlParser.php line 95
PHP Warning
PHP Warning: TYPO3\CMS\Core\Localization\Parser\LocallangXmlParser::getParsedDataForElement() [typo3\cms\core\localization\parser\locallangxmlparser.getparseddataforelement]: Node no longer exists in /var/www/html/typo3/sysext/core/Classes/Localization/Parser/LocallangXmlParser.php line 103
PHP Warning
PHP Warning: count() [function.count]: Node no longer exists in /var/www/html/typo3/sysext/core/Classes/Localization/Parser/LocallangXmlParser.php line 95
PHP Warning
PHP Warning: TYPO3\CMS\Core\Localization\Parser\LocallangXmlParser::getParsedDataForElement() [typo3\cms\core\localization\parser\locallangxmlparser.getparseddataforelement]: Node no longer exists in /var/www/html/typo3/sysext/core/Classes/Localization/Parser/LocallangXmlParser.php line 103
PHP Warning
PHP Warning: count() [function.count]: Node no longer exists in /var/www/html/typo3/sysext/core/Classes/Localization/Parser/LocallangXmlParser.php line 95
PHP Warning
PHP Warning: TYPO3\CMS\Core\Localization\Parser\LocallangXmlParser::getParsedDataForElement() [typo3\cms\core\localization\parser\locallangxmlparser.getparseddataforelement]: Node no longer exists in /var/www/html/typo3/sysext/core/Classes/Localization/Parser/LocallangXmlParser.php line 103
Updated by Stefan Froemken about 10 years ago
I found followinf line:
if (count($bodyOfFileTag->children()) == 0) {
children() returns a variable of type SimpleXMLElement which is not countable. Maybe PHP can count on that, but it is not official supported to do so. We should search for another implementation for that count part. For example:
$children = $bodyOfFileTag->children(); if ($children->count() == 0) {
Further I can't find your mentioned file in current version of t3s_headerslider.
Stefan
Updated by Gerrit Code Review about 10 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/33250
Updated by Gerrit Code Review about 10 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/33250
Updated by Gerrit Code Review about 10 years ago
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/33265
Updated by Stefan Froemken about 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset bf338a6d1f60f746966d22d475784aaeb7798cee.