我有一个 Magento 1.8 安装,直到昨天晚上都可以正常工作,此时更改管理区域中的任何配置设置都停止工作。
例如,如果我将“商店名称”更改为任何不同的名称并单击“保存”:它会在顶部的绿色栏中显示“配置已保存”,但值保持不变。
在 phpMyAdmin 中检查该值未更改,但是您可以在 phpMyAdmin 中手动更改它,这将反映在管理后端。
打开开发者模式,当我尝试加载任何页面时,最初得到以下信息:
Strict Notice: Only variables should be passed by reference in /home/user/dev/lib/Varien/Db/Adapter/Pdo/Mysql.php on line 2765
#0 /home/user/dev/lib/Varien/Db/Adapter/Pdo/Mysql.php(2765): mageCoreErrorHandler(2048, 'Only variables ...', '/home/user/de...', 2765, Array)
#1 /home/user/dev/lib/Varien/Data/Collection/Db.php(483): Varien_Db_Adapter_Pdo_Mysql->prepareSqlCondition('path', Array)
#2 /home/user/dev/lib/Varien/Data/Collection/Db.php(414): Varien_Data_Collection_Db->_getConditionSql('path', Array)
#3 /home/user/dev/lib/Varien/Data/Collection/Db.php(385): Varien_Data_Collection_Db->_translateCondition('path', Array)
#4 /home/user/dev/app/code/core/Mage/Core/Model/Resource/Config/Data/Collection.php(58): Varien_Data_Collection_Db->addFieldToFilter('path', Array)
#5 /home/user/dev/app/code/core/Mage/Adminhtml/Model/Config/Data.php(306): Mage_Core_Model_Resource_Config_Data_Collection->addScopeFilter('default', 0, 'general')
#6 /home/user/dev/app/code/core/Mage/Adminhtml/Model/Config/Data.php(292): Mage_Adminhtml_Model_Config_Data->_getPathConfig('general', false)
#7 /home/user/dev/app/code/core/Mage/Adminhtml/Model/Config/Data.php(221): Mage_Adminhtml_Model_Config_Data->_getConfig(false)
#8 /home/user/dev/app/code/core/Mage/Adminhtml/Model/Config/Data.php(334): Mage_Adminhtml_Model_Config_Data->load()
#9 /home/user/dev/app/code/core/Mage/Paypal/Model/Observer.php(134): Mage_Adminhtml_Model_Config_Data->getConfigDataValue('paypal/general/...')
#10 /home/user/dev/app/code/core/Mage/Core/Model/App.php(1338): Mage_Paypal_Model_Observer->loadCountryDependentSolutionsConfig(Object(Varien_Event_Observer))
#11 /home/user/dev/app/code/core/Mage/Core/Model/App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Mage_Paypal_Model_Observer), 'loadCountryDepe...', Object(Varien_Event_Observer))
#12 /home/user/dev/app/Mage.php(447): Mage_Core_Model_App->dispatchEvent('adminhtml_init_...', Array)
#13 /home/user/dev/app/code/core/Mage/Adminhtml/Model/Config.php(93): Mage::dispatchEvent('adminhtml_init_...', Array)
#14 /home/user/dev/app/code/core/Mage/Adminhtml/Model/Config.php(63): Mage_Adminhtml_Model_Config->_initSectionsAndTabs()
#15 /home/user/dev/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php(88): Mage_Adminhtml_Model_Config->getSections('general')
#16 /home/user/dev/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_System_ConfigController->editAction()
#17 /home/user/dev/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('edit')
#18 /home/user/dev/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#19 /home/user/dev/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#20 /home/user/dev/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#21 /home/user/dev/index.php(87): Mage::run('', 'store')
#22 {main}
在第 2765 行查找 /home/user/dev/lib/Varien/Db/Adapter/Pdo/Mysql.php:
$key = key(array_intersect_key($condition, $conditionKeyMap));
这对我来说毫无意义,但与 MySQL 有关的事情似乎我可能走在正确的轨道上......我用谷歌搜索了错误并发现了这个: http: //www.magentocommerce.com/boards/v/viewthread/266575 / - 并尝试将第 2795 行替换为:
$tmp = array_intersect_key($condition, $conditionKeyMap);
$key = key($tmp);
这导致以下开发模式错误:
Method "addJqueryLibrary" is not defined in "Magentothem_Upsellslider_Model_Layout_Generate_Observer"
#0 /home/user/dev/app/code/core/Mage/Core/Model/App.php(1340): Mage::throwException('Method "addJque...')
#1 /home/user/dev/app/code/core/Mage/Core/Model/App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Magentothem_Upsellslider_Model_Layout_Generate_Observer), 'addJqueryLibrar...', Object(Varien_Event_Observer))
#2 /home/user/dev/app/Mage.php(447): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#3 /home/user/dev/app/code/core/Mage/Core/Controller/Varien/Action.php(351): Mage::dispatchEvent('controller_acti...', Array)
#4 /home/user/dev/app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#5 /home/user/dev/app/code/core/Mage/Adminhtml/Controller/Action.php(275): Mage_Core_Controller_Varien_Action->loadLayout(NULL, true, true)
#6 /home/user/dev/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php(95): Mage_Adminhtml_Controller_Action->loadLayout()
#7 /home/user/dev/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_System_ConfigController->editAction()
#8 /home/user/dev/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('edit')
#9 /home/user/dev/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/user/dev/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#11 /home/user/dev/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#12 /home/user/dev/index.php(87): Mage::run('', 'store')
#13 {main}
如果你现在关闭开发者模式,同样的事情会发生,说它已保存但没有改变。
刚刚在 /var/exception.log 中发现另一个错误,上面写着:
exception 'Mage_Core_Exception' with message 'Invalid block type: Fishpig_FPAdmin_Block_Adminhtml_Extend' in /home/pieboy/dev/app/Mage.php:594
(后跟另一个堆栈跟踪)
对于下一步该尝试什么,我几乎束手无策。该商店使用的是付费主题,其中包含许多我没有亲自安装的扩展,但到目前为止它一直运行良好。
我安装的最新扩展是:http: //www.magentocommerce.com/magento-connect/stripe-for-magento.html
据我所知,一切都很顺利,从那以后我一直在编辑配置设置,但是当我在支付方式区域启用它时,我注意到了这个问题。
我知道这需要大量阅读,但只是想了解所有信息。欢迎任何关于如何从这里调试的建议。
编辑:我卸载了 Fishpig 和 Magenthem upsellslider 扩展,现在我在开发模式下完全没有错误或异常,但配置设置未保存时仍然存在相同的行为。