0

I am currently having an issue with seeing my template path hints in 1.9.2.3 all of a sudden.

If I remove my IP address from the allowed IP's field (leaving it blank), then the template path hints show (not ideal!!). However, if I put in my current IP address, then the template path hints do not show (tried multiple browsers as well to double check).

Before anyone asks, yes I know how to turn them on an off and yes I've looked at all of the scopes.

1
  • Ok, so it seems like it might be a template issue. I'm running a multi-domain installation, with a different template on each domain. The first domain works just fine when I turn on the template path hints, however the site I'm trying to get them to work on, is not working.
    – Eric Fox
    Commented Feb 11, 2016 at 15:29

1 Answer 1

0

The best way to debug such problem is by checking the following file: app/code/core/Mage/Core/Helper/Data/php in the isDevAllowed function.

You can do some debugging like this to check whether your IP matches the allowed IPs:

public function isDevAllowed($storeId=null)
    {
        $allow = true;

        $allowedIps = Mage::getStoreConfig(self::XML_PATH_DEV_ALLOW_IPS, $storeId);
        Mage::log($allowedIps);
        $remoteAddr = Mage::helper('core/http')->getRemoteAddr();
        Mage::log($remoteAddr);
        if (!empty($allowedIps) && !empty($remoteAddr)) {
            $allowedIps = preg_split('#\s*,\s*#', $allowedIps, null, PREG_SPLIT_NO_EMPTY);
            if (array_search($remoteAddr, $allowedIps) === false
                && array_search(Mage::helper('core/http')->getHttpHost(), $allowedIps)
=== false) {
                $allow = false;
            }
        }

        return $allow;
    }
2
  • Thanks for the quick response to this, I checked into this as suggested, however everything checks out (as I expected it would). The template path hints are working for one of the other sites (ultimo theme) on my magento installation, but not on both for some reason. I'm starting to think it might be something template (porto) related.
    – Eric Fox
    Commented Feb 11, 2016 at 15:35
  • What if you switch back to default/default native Magento theme ? Does that work ? Commented Feb 11, 2016 at 15:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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