[Plugin: Mage Enabler] Workaround for inability to edit Magento Products and Attribute Sets
-
Aloha Richard and friends!
I initially ran into issues while updating Products and Attribute Sets within Magento 1.5.1.0 and 1.6.0.0. When saving products, I’d receive “Decoding failed: Syntax error.” When saving attribute sets, I’d get “An error occurred while saving the attribute set.”
I traced it back to a JSON decoding issue within app/code/core/Mage/Core/Helper/Data.php
Meanwhile, it seemed as though the POST data looked totally cool.
I beat myself up for a long while debugging themes, modules, database & server configs before realizing that it may be WordPress to blame and that WP functions need not be available within Magento admin.
My solution: I modified Magento’s index.php to conditionally load WordPress:
if ( strpos($_SERVER['REQUEST_URI'], 'index.php/admin') === FALSE ) { @ini_set('session.auto_start','0'); define('WP_USE_THEMES', false); require_once('/path/to/wp-load.php'); }
You’ll want to modify the ‘index.php/admin’ portion to match a slice of your Magento Admin URL.
I hope this is useful.
Richard – Perhaps this might deserve a spot in your Install instructions?
Aloha!
John
- The topic ‘[Plugin: Mage Enabler] Workaround for inability to edit Magento Products and Attribute Sets’ is closed to new replies.