Hey Elgg Developers,
I'm writing a plugin that requires custom entities. These are working, but my subtype view isn't.
I have registered the subtype in my plugin's activate.php file "add_subtype('object', 'custom_object');".
I have created a file in my plugin's directory "/mod/myplugin/views/default/object/custom_object.php", but I have been unable to get Elgg to use this view when I call "elgg_view_entity($custom_object_entity)", where $custom_object_entity is an ElggObject with a subtype property of "custom_object".
The view is working if I rename the file from "custom_object.php" to "default.php". I have tried deactivating and reactivating the plugin, clearing the cache, and renaming the subtype and file to remove the underscore.
Please help!
n.b. I'm using Release - 1.9.0-dev, Version - 2013051700
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Jerome Bakker@jeabakker
Jerome Bakker - 0 likes
- Epiphron@Epiphron
Epiphron - 0 likes
You must log in to post replies.What you're doing should work. I'm currently working on a new plugin (in Elgg 1.8) and everything works fine.
When developing a plugin is't always a good idea to disable caching, as you don't have to worry about issues.
Please keep in mind that Elgg 1.9 is still in heavy development and some things could not work. Maybe you could report this issue in github (https://github.com/Elgg/Elgg/issues) so the developers can tell you what's going on.
Thanks Jerome, I'll try to see if I can replicate this issue in a test plugin. If I encounter the same behaviour, I'll file a report.