0

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.

wittich
  • 2,079
  • 2
  • 27
  • 50
  • 1
    What's the full path to TranslatedReference.php, and what namespace is defined at the top of that file? – Nate Dec 08 '15 at 23:10
  • I can only find the file `system/modules/metamodels/MetaModelAttributeTranslatedReference.php` that's what I was wondering too. You can see it in [github](https://github.com/backbone87/metamodels-core/blob/master/src/system/modules/metamodels/MetaModelAttributeTranslatedReference.php) – wittich Dec 08 '15 at 23:12
  • Strange.. I can't find `TranslatedCombinedValues` in the .tar.bz2 you linked to. – Nate Dec 08 '15 at 23:19
  • @NateB thx for the help, it seems that I had just to call the right class name. See my [answer](http://stackoverflow.com/a/34171732/3001970)... – wittich Dec 09 '15 at 06:06

1 Answers1

0

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
{
 // ...
} 
wittich
  • 2,079
  • 2
  • 27
  • 50