0

Notice: Undefined index: files in /home//public_html/.com/app/code/core/Mage/Core/Model/Translate.php on line 139

#0 /home//public_html/.com/app/code/core/Mage/Core/Model/Translate.php(139): mageCoreErrorHandler(8, 'Undefined index...', '/home/farmacam/...', 139, Array)
#1 /home//public_html/.com/app/code/core/Mage/Core/Model/App/Area.php(146): Mage_Core_Model_Translate->init('adminhtml')
#2 /home//public_html/.com/app/code/core/Mage/Core/Model/App/Area.php(121): Mage_Core_Model_App_Area->_initTranslate()
#3 /home//public_html/.com/app/code/core/Mage/Core/Model/App/Area.php(93): Mage_Core_Model_App_Area->_loadPart('translate')
#4 /home//public_html/.com/app/code/core/Mage/Core/Model/App.php(774): Mage_Core_Model_App_Area->load()
#5 /home//public_html/.com/app/code/core/Mage/Core/Controller/Varien/Action.php(512): Mage_Core_Model_App->loadArea('adminhtml')
#6 /home//public_html/.com/app/code/core/Mage/Adminhtml/Controller/Action.php(160): Mage_Core_Controller_Varien_Action->preDispatch()
#7 /home//public_html/.com/app/code/core/Mage/Core/Controller/Varien/Action.php(407): Mage_Adminhtml_Controller_Action->preDispatch()
#8 /home//public_html/.com/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index')
#9 /home//public_html/.com/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#10 /home//public_html/.com/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#11 /home//public_html/.com/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#12 /home//public_html/.com/index.php(87): Mage::run('', 'store')
#13 {main}

TRANSLATE.PHP:

foreach ($this->getModulesConfig() as $moduleName=>$info) {
            Mage::log($moduleName);
            $info = $info->asArray();
            $this->_loadModuleTranslation($moduleName, $info["files"], $forceReload);

        }

var_dump($info["files"]):

array(1) { ["default"]=> string(13) "Mage_Core.csv" } 
2

This is an error in the word "files" in a config.xml file of some module. It would be better to use Xdebug for this, however you can also debug like this:

foreach ($this->getModulesConfig() as $moduleName=>$info) {
        $info = $info->asArray();

        if (!isset($info['files'])) {
            Mage::log($moduleName);
        }

        $this->_loadModuleTranslation($moduleName, $info['files'], $forceReload);
    }

You will have in your log the module that is in trouble. Look in the config.xml of the part of translate:

<translate>
        <modules>
            <vendor_module>
                <files> <!-- Probably this word is not correct! (files) -->
                    <default>Vendor_Module.csv</default>
                </files>
            </vendor_module>
        </modules>
    </translate>
| improve this answer | |
  • Thanks Rafael! This worked as expected. In my case, the faulty module was Rapidcommerce/Ias: in its config.xml, the module name was nested inside <files>, istead of the other way around. – Dr. Gianluigi Zane Zanettini Oct 25 '17 at 13:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.