WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] Categories in multisite (bug in widgets on subsites) (15 posts)

  1. Fee
    Member
    Posted 1 year ago #

    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.

    http://wordpress.org/extend/plugins/events-manager/

  2. agelonwl
    Member
    Posted 1 year ago #

  3. Fee
    Member
    Posted 1 year ago #

    thanks, no doesn't help. I want to use global tables and I want the categories to be edited by super admin. It's not a problem of not knowing how to configure my settings, it's a bug inside of the code that breaks my page...

    The problem is:
    1. On single event page (in frontend) on a subsite the site breaks during the mentioned category specific code.
    2. On all pages on a subsite (in frontend) the site breaks during event widget and calendar widget.

    This looks like that:
    A. All following widgets are not displayed.
    B. All following intern URLs change from subsite URL to mainsite URL.

  4. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    I've tested this and am not getting this problem.

    Even though categories are held on the main site when in global mode, you should still be able to assign/display categories on sub-sites.

    are you on the latest version of EM? we've made some MS improvements there.

  5. Fee
    Member
    Posted 1 year ago #

    Hi Marcus, thanks for your reply!
    Yes, I'm on the last EM...
    The categories do display, but after them the page breaks. It's like they are fetched from mainsite and then the code continues with blog_id or something related from mainsite instead of going on with the data from subsite. It's hard to explain, and unfortunately I'm on a local site, so you can't take a look at it.

  6. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    Can you check your php error logs? There must be a fatal error that may give us a clue.

  7. Fee
    Member
    Posted 1 year ago #

    I'm sorry, there are no errors in it :-(
    (errors of other plugins, yes, but of course I deactivated all other plugins for this test and now there is no error)

  8. Fee
    Member
    Posted 1 year ago #

    Just upgraded to WP 3.5 RC2, problem persists.

  9. Fee
    Member
    Posted 1 year ago #

    Hi Marcus,

    I opened my online demopage now that you can take a look at it (both for this thread and http://wordpress.org/support/topic/404-error-on-events-page-caused-by-permalinks):
    http://demo.lebensblumen.de

    I'm sorry that I can't deactivate all plugins there because some plugins need to be network activated for the other subsites in this multisite setup. But on my local server the bug is exactly the same, even with all plugins truned off (except EM).

    I prepared a querystring for testing:
    if you add "?showcat=1" to the url it shows you the bug (then both code snippets from reply#1 are active).
    Look at the widgets, most of them disappear.
    In the footer (without the querystring) you can read the name and link of the page, with the querystring on it turns to the name and link of the mainsite, and "Kontakt" (is part of a footer menu here) disappears.

  10. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    can you give me a link to page where this breaks? adding ?showcat=1 to the url above works ok.

    btw, showcat=1 isn't something EM does, so I'm thinking maybe it's e.g. your theme or a custom script you wrote.

  11. Fee
    Member
    Posted 1 year ago #

    Maybe I wasn't clear, sorry for my English.
    The page is demo.lebensblumen.de - does it really work at you with the query string?
    I added this string myself. In post#1 I wrote that I have to comment out the code snippets. So I did this for testing now: Not commenting out but adding a if(isset($_GET['showcat']) && $_GET['showcat'] == '1'){...} around it inside your classes/em-event.php.

  12. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    http://demo.lebensblumen.de/?showcat=1

    shows a full page for me, nothing breaks.

  13. Fee
    Member
    Posted 1 year ago #

    just checked different browsers on win and mac now to make sure it's no browser issue. It's the same in all browsers, so it must be visible for you, too.

    It's not the whole page that breaks.
    Please take a look at the widgets in the sidebar, and in the footer line. Look at it without the querystring and then with the querystring.
    Most of the widgets disappear and the site link changes as I wrote above.

    To be clear again: I added the querystring myself and hardcoded it in your plugin - only for now that YOU can test it.

  14. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    ok i see the difference, however this is probably something you've coded in somewhere because it's just showing different widgets but the page finishes loading so there's no errors.

    pretty sure EM would have nothing to do with which widgets are loaded on a sidebar.

  15. Fee
    Member
    Posted 1 year ago #

    Hm, this is marked as resolved, but not really resolved yet - if anybody looks here: the problem is related to http://wordpress.org/support/topic/404-error-on-events-page-caused-by-permalinks and we discussed it there

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic