magespecialist/m1-MSP_DevTools

Notice: Trying to get property of non-object in Config.php on line 1524

Closed this issue · 3 comments

Hi, i added some store view by using data upgrade script and this happen when i reload any page:
schermata del 2016-09-20 09-54-41

It's trying go descend into the event config area "frontend" even if it does not exists.

Hello @LucaGallinari ,
it is weird it does not exists in that code phase. I strongly suggest you to investigate for other issues.

Meanwhile you can try this patch:

app/code/community/Varien/Profiler.php:_getObservers (around line 79):

Replace the existing method with:

protected static function _getObservers($area, $eventName)
    {
        if (!Mage::app()->getConfig()->getNode($area)) {
            return array();
        }

        $observers = array();
        $observersConfig = Mage::app()->getConfig()->getEventConfig($area, $eventName);

        if ($observersConfig) {
            foreach ($observersConfig->observers->children() as $obsName => $obsConfig) {
                $class = $obsConfig->class ? (string)$obsConfig->class : $obsConfig->getClassName();
                $observers[$obsName] = $class.'::'.(string)$obsConfig->method;
            }
        }

        return $observers;
    }

Please let us know if it fixes your problem.
Thank you for your help.

That fixes the problem.
It only happens after the modification of websitre/store/storeviews, and after that it will generate that error on every page until i make it work with the patch. Then i can remove the patch and the issue won't be showed again. I think that is due to a "particular process" that is done one time after you do some changes to the stores.

Yes, that is possible.
We added this fix to version 0.1.12 .

Thank you again for your help, we really appreciate ;)