Bug #31353

XLIFF: Invalid handling of overlays for unavailable language

Added by Robert Grede over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Must have
Category:
-
Target version:
Start date:
2011-10-27
Due date:
% Done:

100%

TYPO3 Version:
4.6
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

it seems the following occurs, if user-language isn't english:

PHP Catchable Fatal Error: Argument 2 passed to t3lib_div::array_merge_recursive_overrule() must be an array, null given, called in /typo3/sysext/lang/lang.php on line 554 and defined in /t3lib/class.t3lib_div.php line 1867

Associated revisions

Revision 0de6b562 (diff)
Added by Xavier Perseguers over 6 years ago

[BUGFIX] XLIFF: Invalid handling of overlays for unavailable language

When a language is chosen but does not provide localization files for an
extension, the localization overlay mechanism fails to detect it and
provides NULL instead of an array to the array merge method of t3lib_div.

Change-Id: Ibf0aa0feadc16a77e61d515ae0c684bf182cf1a6
Fixes: #31353
Releases: 4.6, 4.7
Reviewed-on: http://review.typo3.org/6384
Reviewed-by: Thomas Juhnke
Tested-by: Thomas Juhnke
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert

Revision c729fdf1 (diff)
Added by Xavier Perseguers over 6 years ago

[BUGFIX] XLIFF: Invalid handling of overlays for unavailable language

When a language is chosen but does not provide localization files for an
extension, the localization overlay mechanism fails to detect it and
provides NULL instead of an array to the array merge method of t3lib_div.

Change-Id: I435f7f5955675e6a8588b37496363b948033a4c0
Fixes: #31353
Releases: 4.6, 4.7
Reviewed-on: http://review.typo3.org/6509
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers

History

#1 Updated by Markus Klein over 6 years ago

Cannot reproduce.
Switched BE to German and page properties work just fine.

Seems like in line 546

$tempLL = t3lib_div::readLLfile($fileRef, $language, $this->charSet);

readLLfile returns NULL.

But according to the comment:
@return array Value of $LOCAL_LANG found in the included file. If that array is found it will returned. Otherwise an empty array and it is FALSE in error case.

NULL is not a valid return value, so there seems to be a problem with the underlying lang_factory.

#2 Updated by Tommy Juhnke over 6 years ago

Hi folks,

I've experienced the same. Steps to reproduce:

- switch to a non-english backend language (e.g german)
- install ext:tscobj and try to insert a ext:tscobj-plugin on an arbitrary page -> bang!

After that, I fiddled around a little bit in the core files and came to the
conclusion that in the file "locallang_db.php" of ext:tscobj the german language
wasn't available. After adding it, the Fatal error don't raised again...

I think the new language fallback functionality doesn't work correctly.

I didn't found time yet to do further debugging, but maybe this report helps
somebody to dig deeper into this issue.

Greetings,

tommy

edit: Sorry, the issue was originally posted for opening page properties, but my report
belongs to opening a page in the page module. Don't know if this is belongs to each other
but I guess t3lib_div::readLLfile() is defect...

#3 Updated by Robert Grede over 6 years ago

I tried this with different extensions and can confirm this:

usually, the english language is included in all extensions by default, so all works fine. If another language is set in the user option, witch is not included in an extensions locallang, the error-msg comes up.

THX

Robert

#4 Updated by Hendrik Reimers over 6 years ago

Hi,

on my Extension default (englisch) and german language is complete available. But the error doesn't go away. Also i become this message on tt_news. Another crazy thing is the missing tab titles on the first two tabs in the extension manager.

hope anyone can help
thanks

#5 Updated by Chris topher over 6 years ago

  • Subject changed from Fatal Error if opening page properties to XLIFF: Fatal Error if opening page properties

#6 Updated by Xavier Perseguers over 6 years ago

  • Status changed from New to Accepted
  • Assignee set to Xavier Perseguers
  • Target version set to 4.6.1

OK, finally could reproduce with EXT:tscobj when choosing German.

#7 Updated by Xavier Perseguers over 6 years ago

  • Subject changed from XLIFF: Fatal Error if opening page properties to XLIFF: Invalid handling of overlays for unavailable language

#8 Updated by Mr. Hudson over 6 years ago

  • Status changed from Accepted to Under Review

Patch set 1 of change Ibf0aa0feadc16a77e61d515ae0c684bf182cf1a6 has been pushed to the review server.
It is available at http://review.typo3.org/6384

#9 Updated by Xavier Perseguers over 6 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#10 Updated by Xavier Perseguers over 6 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF