Make sure you use the method getSubtype() to get the subtype
I simply check the subtype member. My code is following:
$place = get_entity($place_guid);
if ($place) {
if($place->subtype != 'place')
echo "correct";
else echo "wrong";
}
I created this group in the action/add.php as following:
$place = new ElggGroup($place_guid); // load if present, if not create a new place
$place->subtype = 'place';
Can you advise me if there is anything wrong?
Thanks,
Okay, I got it. Using getSubtype() method works. However, I am still wondering why assigining value to a private member works and there is no setSubtype() method...
@apeforest : Could you upload a screenshot? This behaviour is not expected. The group profiles should be similar to http://community.elgg.org/pg/groups/12/getting-started/ in usual elgg installs. Probably some plugin is causing this. Try disabling all third party plugins
@Team Webgalli: Yes, you are right. It is caused by a plugin I added. However, I am still not sure why my plugin, which is a subtyped ElggGroup, caused such issue. The screenshot is below. Could you enlighten me which file I should look at?
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.