Question

This is very strange. I disabled both app/community and app/local as well as replaced app/core with stock Magento files and yet I keep getting the following error:

Call to undefined method Mage_Directory_Helper_Data::getRegionJsonByStore() in /var/www/site-root/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Region.php on line 87

Not sure how to troubleshoot from here.

Was it helpful?

Solution

Mage_Directory_Helper_Data::getRegionJsonByStore() was introduced in Magento 1.8, so it sounds like your Mage_Directory_Helper_Data class is from an older version.

The most likely explanation is an override in app/code/local. You did not explain how you "disabled app/local" but it probably didn't work.

OTHER TIPS

Try to check Configuration -> System -> Tools -> Compilation, it should be disabled. If not, disable it.

If it does not fix your problem, then try to replace the file app\code\core\Mage\Directory\Helper\Data.php with the original copy, backup your copy of course just in case.

How to troubleshoot missing methods:

  1. If compilation is enabled, recompile and flush cache.
  2. Disable APC if enabled.
  3. Enable opcache timestamps if disabled
  4. Enable Xdebug, set a breakpoint in Mage::getModel() and trace what file it resolves to. If that file is outside your document root, verify include_path.
  5. If 4. resolves to the correct file, but you're still getting the errors, restart php interpreter (php-fpm or Apache).
  6. If 5 fixed it, but 2&3 didn't, verify if there are other opcode caches enabled and tune them.
  7. If 5 fixed it but you are not aware of any opcode caches, contact your hoster for information and diagnosis.

If none of the above worked, verify you are on the right server.

Mage_Directory_Helper_Data::getRegionJsonByStore() doesn't exist up to Magento CE 1.7.0.2. This method appeared in 1.8+.

It's look like an upgrade result . Do you upgrade mage extension through Magento Connect in admin?

If yes, you need upgrade all Magento Core modules. But upgrade by magento connect will skip lib/* folder. Try upgrade lib/* folder manually.

The other possible solution is to refresh/disable your cache under Admin-> System -> Cache Management. And don't forget to click "Flush Magento Cache" button.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top