agnostack/magento_extension

Fatal error: Call to a member function find() on a non-object in /app/code/community/Zendesk/Zendesk/Model/Observer.php on line 75

Closed this issue · 3 comments

Fatal error: Call to a member function find() on a non-object in /app/code/community/Zendesk/Zendesk/Model/Observer.php on line 75

Hello, i have this error
Fatal error: Call to a member function find() on a non-object in /app/code/community/Zendesk/Zendesk/Model/Observer.php on line 75

on this line

if (! empty($zDomain)) {
if ((bool) Mage::getStoreConfig('zendesk/frontend_features/web_widget_code_active')) {
$embeds = Mage::getModel('zendesk/api_configsets')->find();
if (! isset($embeds['launcher'])) {
Mage::getModel('zendesk/api_configsets')->initialize();
}
}

Any info on this issue?

There's an error into the getModel function initialization. The proper way to call to that find() function is:
$embeds = Mage::getModel('zendesk/api_configSets')->find();

also it's necessary to update the line:
Mage::getModel('zendesk/api_configsets')->initialize();
for
Mage::getModel('zendesk/api_configSets')->initialize();

Let me know if you have any questions.

Best,