doukui4836 2015-12-08 23:07
浏览 63
已采纳

在Contao CMS中调试“无法加载类”致命错误

I get in my Contao 2.11.11 installation with the module MetaModels 1.0.x the error:

Fatal error: Could not load class MetaModels\Attribute\TranslatedReference

I could narrow the problem down to the file system/modules/metamodelsattribute_translatedcombinedvalues/MetaModels/Attribute/TranslatedCombinedValues/TranslatedCombinedValues.php

There first the namespace is set and then the class TranslatedReference is called, which created the fatal error.

namespace MetaModels\Attribute\TranslatedCombinedValues;

use MetaModels\Attribute\TranslatedReference;
use MetaModels\Helper\ContaoController;

class TranslatedCombinedValues extends TranslatedReference
{
 // ...
}  

How can I debug why the class couldn't be called.

  • 写回答

1条回答 默认 最新

  • douhuang3740 2015-12-09 05:58
    关注

    Apparently as the namespace was okay I just had to call the correct class name:

    namespace MetaModels\Attribute\TranslatedCombinedValues;
    
    //use MetaModels\Attribute\TranslatedReference;
    //use MetaModels\Helper\ContaoController;
    use MetaModelAttributeTranslatedReference;
    
    //class TranslatedCombinedValues extends TranslatedReference
    class TranslatedCombinedValues extends MetaModelAttributeTranslatedReference
    {
     // ...
    } 
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 Llama如何调用shell或者Python
  • ¥20 eclipse连接sap后代码跑出来空白
  • ¥20 谁能帮我挨个解读这个php语言编的代码什么意思?
  • ¥15 win10权限管理,限制普通用户使用删除功能
  • ¥15 minnio内存占用过大,内存没被回收(Windows环境)
  • ¥65 抖音咸鱼付款链接转码支付宝
  • ¥15 ubuntu22.04上安装ursim-3.15.8.106339遇到的问题
  • ¥15 blast算法(相关搜索:数据库)
  • ¥15 请问有人会紧聚焦相关的matlab知识嘛?
  • ¥15 网络通信安全解决方案