You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On a blank fresh installation of elgg 1.6 the pre-login screen comes with a standard bit of code which should display all the publicly available 'latest Activity' within the site, it doesnt.
The code is in : elgg/dashboard/latest.php
// Load the front page
global $CONFIG;
$title = elgg_view_title(elgg_echo('content:latest'));
set_context('search');
$content = list_registered_entities(0,10,true,false,array('object','group'));
set_context('latest');
$content = elgg_view_layout('two_column_left_sidebar', '', $title . $content);
page_draw(elgg_echo('content:latest'), $content);
I've been using the same code to display this from elgg 1.2
Thanks,
The text was updated successfully, but these errors were encountered:
I was able to reproduce. Here is the logic that is breaking down in get_entities():
foreach($subtype as $typekey => $subtypearray) {
foreach($subtypearray as $subtypeval) {
$typekey = sanitise_string($typekey);
if (!empty($subtypeval)) {
if (!$subtypeval = (int) get_subtype_id($typekey, $subtypeval))
return false;
} else {
// todo: Setting subtype to 0 when $subtype = '' returns entities with
// no subtype. This is different to the non-array behavior
// but may be required in some cases.
$subtypeval = 0;
}
if (!empty($tempwhere)) $tempwhere .= " or ";
$tempwhere .= "(type = '{$typekey}' and subtype = {$subtypeval})";
}
If get_subtype_id() returns zero, the function immediately returns. The subtypes passed in are obtained from the CONFIG object while they are being checked against the subtype table. If a plugin registers an entity type but none exist yet, there is no subtype table entry and get_entities fails.
When get_subtype_id fails, it should skip the subtype rather than failing completely.
This works now with the latest from svn because a single subtype that doesn't exist no longer returns FALSE. A todo item in there says there is still the possibility of breaking this again though...
Original ticket http://trac.elgg.org/ticket/1198 on 39658959-02-12 by trac user munkee, assigned to unknown.
Elgg version: 1.6
On a blank fresh installation of elgg 1.6 the pre-login screen comes with a standard bit of code which should display all the publicly available 'latest Activity' within the site, it doesnt.
The code is in : elgg/dashboard/latest.php
I've been using the same code to display this from elgg 1.2
Thanks,
The text was updated successfully, but these errors were encountered: