HI,
I've recently upgraded to 3.3.6 from 2.3.14 (this is my first Elgg upgrade) and I've noticed that my custom plugin causes view issues when it's activated. The reason for this, I believe, is that in my plugin I wasn't able to see any views (I saw blank screens) unless I override all of the views in the /var/www/html//vendor/elgg/elgg/views/default/page/elements/ directory to my /var/www/html/mod/my-plugin/views/default/page/elements/.
When upgrading it uses the views from Elgg 2.3.14 because they're included in my plugin and the pages render with things out of place, but if I replace those with the views from 3.3.6 the pages render correctly. If I remove those views from my plugin then all I get is a blank screen in both versions (2.3.14 and 3.3.6) . So my thought is that I'm doing something incorrectly and I shouldn't have to override those views at all.. then upgrading would be much easier. I hope that makes sense.
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.
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 1 like
- iionly@iionly
iionly - 0 likes
- TCB@tblack06
TCB - 0 likes
You must log in to post replies.Really don't understand what happend on your installation.
If you've any issues with the custom plugin then upgrade them.
If you've any problem with upgrade then try to search my post on Community - how to upgrade Elgg 2 on Elgg 3:
Shortly:
Again, search my replies on Community for very advanced tips.
Overriding means the views provided by a plugin totally replace the original core view (or the corresponding view provided by a plugin higher in the plugin list). Overriding views is one way of modifying views if you want to change some code in the view. As the core views probably have changed between Elgg 2 and 3 you can't simply override the views of Elgg 3 using the modified views of your plugin based on the Elgg 2 core views.
It shouldn't be necessary at all to copy ALL views into the views folder of your plugin. Only the views you need to modify need be copied and altered. Question is why it doesn't work without the views in your plugin as Elgg should just use the unmodified core views in this case. Have you references to these views elsewhere in your plugin (using elgg_extend_view is NOT necessary when overriding views btw.!). Not knowing your plugin I can't say if anything else needs to be updated in your code to work on Elgg 3.
Yeah... it's weird and I'm not sure why I would need to override ANY of those views. I think if I were to open the site, go to admin panel, remove my version of the page/elements directory, then flush the cache it may work. Fingers crossed.