dtll2016 2014-07-21 17:33
浏览 35
已采纳

未加载扩展模型

We have a development site and a production site for Magento. Both sites have an extension called 'Affiliate Pro' installed.

I need to access the model from my script. So I wrote a test script.

<?php
  require_once '../app/Mage.php';
  umask(0);
  Mage::app('default');
  $v = Mage::getModel('affiliate/affiliatecustomers');
  var_dump($v);
?>

It works fine with our development site but not the production site.

[development site output]

object(MW_Affiliate_Model_Affiliatecustomers)#117 (15) { ["_eventPrefix":protected]=> string(13) "core_abstract" ["_eventObject":protected]=> string(6) "object" ["_resourceName":protected]=> string(28) "affiliate/affiliatecustomers" ["_resource":protected]=> NULL ["_resourceCollectionName":protected]=> string(39) "affiliate/affiliatecustomers_collection" ["_cacheTag":protected]=> bool(false) ["_dataSaveAllowed":protected]=> bool(true) ["_isObjectNew":protected]=> NULL ["_data":protected]=> array(0) { } ["_hasDataChanges":protected]=> bool(false) ["_origData":protected]=> NULL ["_idFieldName":protected]=> NULL ["_isDeleted":protected]=> bool(false) ["_oldFieldsMap":protected]=> array(0) { } ["_syncFieldsMap":protected]=> array(0) { } }

[production site output]

bool(false)

The extension functions well for both sites but the script doesn't work for the production site.

What configuration do I have to check?

Thanks.

Sam

  • 写回答

1条回答 默认 最新

  • doujiao1984 2014-09-02 18:06
    关注

    This means there is something wrong with the extension, Check if the files are there, clear the cache, disable compilation. check the var log folder for errors.

    Answered by Marius

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)