elgg_get_entities 'type'=> 'site' fail on 1.7

hello,
I'm trying to create a plugin for elgg version 1.7, do testing elgg 1.7.19 and 1.7.15 and I need to use the function elgg_get_entities but not returns correctly the 'type' => 'site', responds bool(false).
$test = elgg_get_entities (array ('type' => 'site', 'limit' => 999,));
var_dump ($ test);
Works perfectly with 'user', 'object', and 'group', or all ' ' but not the 'site'
I tested with version 1.8.4, 1.8.16 and 1.6.4 (get_entities) and operate properly, return also the type = site
I have reviewed and been tested with the call made has elgg_get_entity_type_subtype_where_sql and appear as $ valid_types = array ('object', 'user', 'group', 'site'), but the function elgg_get_entities does not return the type site in versions 1.7
I have no idea where can be the problem, if in the class, in site.php or elsewhere, I have not found any plugin or function that uses elgg_get_entities ('type' => 'site') to version 1.7;
I tried also elgg_get_entities_from_metadata in 1.7 and seems to work correctly, but does has no relationship and does not solve my needs
I appreciate any help, solution or suggestion
sorry for my english, I'm Hispanic: D
thanks.

  • You should use xdebug, which allows you to walk through the execution of elgg_get_entities() to see what's going wrong. Here are the slides for a recent presentation I did on that tool that may or may not be useful.

  • thanks Steve
    I'm working on it (as recommended had me on github) and when I have some progress or solution I'll post here for future reference
    but I had to do other things and had not ever used xdebug, but I anticipate will be a very useful tool for my next attempts to create plugins

  • resolved
    in 1.7 the function returns the entity site by adding 'site_guid' => null, in 1.8 it is not necessary
    thanks

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking