Categories in multisite (bug in widgets on subsites)
-
Hi Marcus,
there’s an issue with the categories in multisite: On subsites the content after the event widgets break and/or urls break after them.
This code breaks:
In classes/em_event.php, inside of output() line 1643-1650 the categories are called://for backwards compat and easy use, take over the individual category placeholders with the frirst cat in th elist. $EM_Categories = $this->get_categories(); if( count($EM_Categories->categories) > 0 ){ $EM_Category = $EM_Categories->get_first(); } if( empty($EM_Category) ) $EM_Category = new EM_Category(); $event_string = $EM_Category->output($event_string, $target);
Please tell me if I’m wrong but I think categories are only on the mainsite, that’s the way it works in my install. So if I put these lines inside of the condition
if(is_main_site()){...}
the issue is solved and everything works fine ??On a events details page it’s breaking again. Therefore lines 1554-1558 has to be commented out, too:
case '#_EVENTCATEGORIES': ob_start(); $template = em_locate_template('placeholders/categories.php', true, array('EM_Event'=>$this)); $replace = ob_get_clean(); break;
Inside of placeholders/categories.php the $EM_Event is empty.
But I think that’s not the way it is meant to be… The categories should be listet on subsites, too.
- The topic ‘Categories in multisite (bug in widgets on subsites)’ is closed to new replies.