Custom Attribute Fails in v8.4
Permalink
When I try to install my custom attribute in V5.8.4 I get this message:
Declaration of Concrete\Package\Ancora\Attribute\CampusSelector\Controller::importKey($akey) should be compatible with Concrete\Core\Attribute\Controller::importKey(SimpleXMLElement $element)
Works fine in 5.8.1.
Any Ideas on how to address the problem would be great.
Thanks,
Sean
Declaration of Concrete\Package\Ancora\Attribute\CampusSelector\Controller::importKey($akey) should be compatible with Concrete\Core\Attribute\Controller::importKey(SimpleXMLElement $element)
Works fine in 5.8.1.
Any Ideas on how to address the problem would be great.
Thanks,
Sean
***** Correction, this works in C5.7 and fails in C5.8.n. *****
There were breaking changes in attributes between 5.7 and v8. Some backward compatibility was provided that enabled fairly conventional/simple attributes from 5.7 to work in v8.
There are also some changes in the way attribute values are returned, with values output as strings rather than value objects, so code using attributes needs to take that into account.
Details can be found in the release notes and documentation.
There are also some changes in the way attribute values are returned, with values output as strings rather than value objects, so code using attributes needs to take that into account.
Details can be found in the release notes and documentation.
Thanks John, I will check the release notes.
I was looking at 8.4, not 8.0. That is likely why I didn't see anything.
I was looking at 8.4, not 8.0. That is likely why I didn't see anything.
The error message is telling you to change
importKey($akey)
to
importKey(SimpleXMLElement $element)
in the Concrete\Package\Ancora\Attribute\CampusSelector\Controller.php file.
So, try that and see if it fixes it for you..
importKey($akey)
to
importKey(SimpleXMLElement $element)
in the Concrete\Package\Ancora\Attribute\CampusSelector\Controller.php file.
So, try that and see if it fixes it for you..
Thanks for the reply.
I tried that as the very first thing. It changes to a different error message! There is more involved. I will read up in the release notes.
Thanks,
Sean
I tried that as the very first thing. It changes to a different error message! There is more involved. I will read up in the release notes.
Thanks,
Sean
Yeah I guessed as much but it was worth a try..