Custom Attribute Types
Permalink
Hi all
I've run into some problems creating a new custom attribute type. I copied the folder from /concrete/attributes/boolean to /application/attributes/boolean2. I changed line 2 of the controller.php in boolean2 (the new custom attribute type) to read:
I've changed nothing else, I can see no other references to the CORE that should affect the class.
I then went into my CMS and went to system and settings->attributes (at dashboard/system/attributes/types). My new attribute shows up for installation but the icon link is broken. It's still pointing to concrete/attributes. When I install the new type a get an error:
ReflectionException (-1)
Class \Concrete\Attribute\Boolean2\Controller does not exist
I cannot work it out. The new attribute type is added to my database table attribute types but still not installing properly. I cannot access that system->attributes page again without an error until i delete that entry from the table.
Any ideas?
I'm using version 5.7.4/2
I've run into some problems creating a new custom attribute type. I copied the folder from /concrete/attributes/boolean to /application/attributes/boolean2. I changed line 2 of the controller.php in boolean2 (the new custom attribute type) to read:
namespace Application\Attribute\Boolean2;
I've changed nothing else, I can see no other references to the CORE that should affect the class.
I then went into my CMS and went to system and settings->attributes (at dashboard/system/attributes/types). My new attribute shows up for installation but the icon link is broken. It's still pointing to concrete/attributes. When I install the new type a get an error:
ReflectionException (-1)
Class \Concrete\Attribute\Boolean2\Controller does not exist
I cannot work it out. The new attribute type is added to my database table attribute types but still not installing properly. I cannot access that system->attributes page again without an error until i delete that entry from the table.
Any ideas?
I'm using version 5.7.4/2
It tries to find the icon and the controller in \concrete instead of \application.
edit your application/bootstrap/app.php file and add:
Another problem:
You will probably be missing the atBoolean2 table.
Create a db.xml file in your map:
I didn't get the icon right yet, but that prolly needs another line in app.php