View Issue Details

IDProjectCategoryView StatusLast Update
0003165OXID eShop (all versions)4.07. Source code, Testpublic2012-12-10 13:44
Reportercsimon Assigned To 
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionduplicate 
Product Version4.5.1 revision 38045 
Summary0003165: language files aren't loaded on some servers
DescriptionIf glob() returns false, language files aren't loaded correctly. This can be due server configuration issues or other issues, however, this behavior of glob isn't considered in oxlang:

in _getLanguageFilesPathArray:

*snip*

        if ( $sGenericPath ) {
            $aLangFiles[] = $sGenericPath . "lang.php";
            $aLangFiles = array_merge( $aLangFiles, glob( $sGenericPath."*_lang.php" ) );

*snap*

when glob returns false, array_merge returns NULL, which causes that the lang array is deleted. you have to check if the return value of glob is false, and if not, don't merge the arrays (or pass an empty array to array_merge)

However: It IS considered in the same function at the end:

        //modules language files
        $aModuleFiles = glob(getShopBasePath().'/modules/*/out/lang/' . $sLang . '/*_lang.php');
        if (is_array($aModuleFiles) && count($aModuleFiles)) {
            $aLangFiles = array_merge( $aLangFiles, $aModuleFiles );
        }

there, the return value of glob is correctly checked.
Steps To ReproduceIt can be provoked if you activate open_basedir restriction. delete tmp folder, try to open shop -> all translations are gone.
TagsNo tags attached.
ThemeBoth
BrowserAll
PHP Versionany
Database Versionany

Relationships

duplicate of 0003128 resolvedLinas Kukulskis Warnings because oxlang.php and texts are not shown in frontend 

Activities

Linas Kukulskis

2011-08-19 16:26

reporter   ~0005072

Reminder sent to: csimon

please check 4.5.1 version revision you have in the latest revision it is already fixed

csimon

2011-08-19 16:31

reporter   ~0005073

Last edited: 2011-08-19 16:33

hi,

i can confirm that it's fixed in SVN version, i used the release package of 4.5.1, which is of course not fixed.

edit: https://bugs.oxid-esales.com/view.php?id=3128

Sorry for duplicate!

birute_meilutyte

2011-08-19 16:36

reporter   ~0005074

closed as duplicate of 0003128