Hello,
I'm using hypewall 6.2.0 in Elgg 3.3.12 and in "\forms\wall\status" and "\framework\wall\container", a call is made to "$entity = elgg_extract('entity', $vars);".
In both instances it returns "null". I believe the call is expecting a "Post" object (I could be wrong :)).
In "\river\object\hjwall\create" a call is made to "elgg_view('notifier/view_listener', ['entity' => $object,]);". However, this view does not exist. I'm not sure if this has any relevance.
Could someone please point me in the right direction so I can collect the expected "entity" in the container and pass it on to status.
Thanks in advance.
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 - 0 likes
- VinceK@vincek
VinceK - 0 likes
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 0 likes
- VinceK@vincek
VinceK - 0 likes
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 1 like
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 1 like
- VinceK@vincek
VinceK - 0 likes
You must log in to post replies.How did you understand that?
You can check it:
Add
After
In both views.
Thanks for your response, Nikolai.
In an attempt to better understand Elgg, I have been using Netbeans with XDebug to remove the deprecated messages from the hypewall plugin. I've been very careful and tested after each change which mainly consisted of transferring everything out of start.php into a bootstrap class.
I tested the original hypewall 6.2.0 and it also returned null for those two instances of 'entity'.
The results of "var_dump($entity);" in both are:
\mod\hypeWall\views\default\forms\wall\status.php:5:null
mod\hypeWall\views\default\framework\wall\container.php:10:null
Can you reproduce your steps while I tests this plugin on my server?
Upd: just tested it and can't find any issue with posting and editing wall posts.
Sorry, Nikolai, I wasn't implying there was an issue, I just wondered if the null entity was affecting functionality that I wasn't aware of. The Post object entity is present when editing a post, but not when adding a post or visiting the activity page.
The php_error_log has two Elgg.Notice entries that appear to be related to the null entity:
1) "Trying to get property 'guid' of non-object" in file mod\hypeWall\views\default\forms\wall\status.php
2) "Undefined variable: entity" in file mod\hypeWall\views\default\framework\wall\container.php
As you say, it doesn't appear to affect functionality, but I was curious as to how I could amend the script to remove the php_error_log messages.
Ah, debugging :)
You can use this trick instead of $entity = elgg_extract('entity', $vars); :
Also, look at blog/save form. You can rewrite hypeWall views using same code.
Many thanks, Nikolai. I'll update my version of the plugin.