WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] 404 Error on Events Page caused by Permalinks (30 posts)

  1. jbarryweb
    Member
    Posted 1 year ago #

    Using Events Manager 5.3 / WordPress 3.4.2

    I am receiving a 404 error on the events page of our website. I've read through many other posts on this issue and have not been able to find a solution. I've tried:

    - Creating a new events page
    - Adjusting Permalink Slugs
    - Ensuring that the event page is selected in EM settings
    - Resetting Permalinks in WordPress
    - Resetting Events Manager
    - Disabling all other Plugins
    - Reverting to the WordPress twenty eleven theme
    - Using "define('EM_DISABLE_PERMALINKS',true);"

    Changing the permalinks setting in WordPress to default corrects the issue.

    Our website is hosted in a subdomain which may be causing the issue:
    http://journalmultimedia.com/petage/index.php/calendar-of-events/

    Any help on how to correct this is much appreciated!

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

  2. agelonwl
    Member
    Posted 1 year ago #

    Hi,

    Does your server allows url rewrite?

  3. Fee
    Member
    Posted 1 year ago #

    I've the same problem on subdomains. In my case it's a multisite setup. Some subsites use domain mapping, they are on a own domain and it works. But the subsites without domain mapping, that are on a subdomain, show a 404 on the events detail page. The listing on the events page, location page and bookings page work well, the error is only on the details page.

  4. Fee
    Member
    Posted 1 year ago #

    I can give you the link with login key to my testpage (it's not visible without login key).

  5. 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/categories-in-multisite-bug-in-widgets-on-subsites):
    http://demo.lebensblumen.de

    You see a demo event in the events widget. It's German:
    Termine
    Demo-Termin
    29.12.12
    alle Termine

    If you click on the "Demo-Termin" you receive the 404.

  6. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    @jbarryweb

    Changing the permalinks setting in WordPress to default corrects the issue.

    Do you mean disabling the permalinks? However, it seems to me like your server may be causing the issue with CPTs because your url includes the index.php. Whilst it should work even in this mode, it may be that some servers still cause problems with permalinks and CPTs. We don't handle the urls for events, we just supply the url pattern to WP and it does the rest.

    @Fee
    have you tried this with another theme e.g. the default wp theme? Also, have you tried resaving your permalinks?

  7. Fee
    Member
    Posted 1 year ago #

    yes, I tried twenty twelve and twenty eleven, I switched to twenty twelve on demo.lebensblumen.de now for you.
    Yes, I tried different permalink settings both for WP and EM. It's interesting, the url of the details page doesn't change, stays the same with all kinds of permalink settings of WP. the slug changins on EM settings page do change the URL but the 404 persists even on the new URL.

  8. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    custom posts don't follow the format you see on the permalinks settings of WP.

    Did you try disabling other plugins and resaving the permalinks settings? It might be something related to another plugin. We did quite a bit of testing for v5.3 on MS and event links were working fine.

  9. Fee
    Member
    Posted 1 year ago #

    On my local install I deactivated now all plugins (incl. EM), switched to Twenty Eleven, even completely moved all plugins except EM out of plugins directory, reactivated EM, resetted all permalinks in WP and EM ond mainsite and subsite, added a new event (for a just in case) - the error is still there.

  10. Fee
    Member
    Posted 1 year ago #

    ...the events also don't show up in the events list in admin (.../wp-admin/edit.php?post_type=event). It counts the events (all/published), but there are no events listet, (yes the date is in future).

  11. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    the counted events include all events I believe, so I think the issue is just 404 errors. Do you have a screenshot of your MultiSite settings?

    Not sure what else to say... normally it works. I'm wondering if it's a domain-mapping related issue.

    On your 404.php file in WP, try adding this:

    global $wp_rewrite; echo "<pre>"; print_r($wp_rewrite); echo "</pre>";

    will look at it tomorrow and it may give a clue as to what's wrong there.

  12. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    sorry, i mean 404.php in your theme, wrapped in <?php ... ?>

  13. Fee
    Member
    Posted 1 year ago #

    Thanks, Marcus, but I don't think it's related to rewrite and permalinks. I tried your code and looked at it, it doesn't contain anything that is related to mainsite/subsite.

    I did a complete new install now (local) with all default settings of WP, no other plugins than EM, no other themes than default, no domain mapping.

    If global mode is off, the events on the subsite work correctly. It must be an issue with the global tables mode.
    Sure I could make a screenshot of my settings, but here is no upload functionality. So these are my settings:

    Enable global tables mode? Yes
    Display global events on main blog? Yes
    Link sub-site events directly to sub-site? Yes
    Locations on main blog? No
    Display global locations on main blog? No

    I think it's the "Link sub-site events directly to sub-site" that does not work. This configuration acts like this:

    The 3 example events from your plugin first have their links to the subsite before I switch to global mode. With global mode their links show to the main site.
    Without global mode adding events on the subsite works correctly. With global mode on the following happens if I add an event on the subsite:
    - at saving I'm redirected to (blog) posts admin screen
    - on events admin screen only your 3 test events still show, the new event doesn't show up
    - on events list in frontend your 3 test events link to the mainsite, the new event shows up with a link to the subsite, clicking on it gives the 404 like above.

    I also tried around with the Yes/No settings except global tables mode.
    Then newly added events on the subsite don't do a redirect in admin screen, but show up in the frontend list with a link to mainsite.

  14. Fee
    Member
    Posted 1 year ago #

    sorry, I forgot to mention:
    using WP 3.5 RC2, EM 5.3, both from a fresh download

    just did the installation, set up a network with one subsite, network activated EM, only changed in multisite options the mentioned settings, no other changes to the installation. Maybe you can reproduce this, too.

  15. Fee
    Member
    Posted 1 year ago #

    now did the first and only change, added your code to the twenty twelve 404.php, this is the result:

    WP_Rewrite Object
    (
        [permalink_structure] => /%year%/%monthnum%/%day%/%postname%/
        [use_trailing_slashes] => 1
        [author_base] => author
        [search_base] => search
        [comments_base] => comments
        [pagination_base] => page
        [feed_base] => feed
        [comments_feed_structure] =>
        [front] => /
        [root] =>
        [index] => index.php
        [matches] =>
        [rules] => Array
            (
                [events/(\d{4}-\d{2}-\d{2})$] => index.php?pagename=events/&calendar_day=$matches[1]
                [events/rss$] => index.php?pagename=events/&rss=1
                [events/feed$] => index.php?pagename=events/&rss=1
                [events/locations/?$] => index.php?page_id=10
                [events/categories/?$] => index.php?page_id=11
                [events/my-bookings/?$] => index.php?page_id=12
                [events/event/(.+)$] => index.php?pagename=events/&em_redirect=1&event_slug=$matches[1]
                [events/location/(.+)$] => index.php?pagename=events/&em_redirect=1&location_slug=$matches[1]
                [events/category/(.+)$] => index.php?pagename=events/&em_redirect=1&category_slug=$matches[1]
                [events/?$] => index.php?pagename=events
                [events/([^/]+)/ical/?$] => index.php?event=$matches[1]&ical=1
                [locations/?$] => index.php?post_type=location
                [locations/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?post_type=location&feed=$matches[1]
                [locations/(feed|rdf|rss|rss2|atom)/?$] => index.php?post_type=location&feed=$matches[1]
                [locations/page/([0-9]{1,})/?$] => index.php?post_type=location&paged=$matches[1]
                [events/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?post_type=event&feed=$matches[1]
                [events/(feed|rdf|rss|rss2|atom)/?$] => index.php?post_type=event&feed=$matches[1]
                [events/page/([0-9]{1,})/?$] => index.php?post_type=event&paged=$matches[1]
                [category/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?category_name=$matches[1]&feed=$matches[2]
                [category/(.+?)/(feed|rdf|rss|rss2|atom)/?$] => index.php?category_name=$matches[1]&feed=$matches[2]
                [category/(.+?)/page/?([0-9]{1,})/?$] => index.php?category_name=$matches[1]&paged=$matches[2]
                [category/(.+?)/?$] => index.php?category_name=$matches[1]
                [tag/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?tag=$matches[1]&feed=$matches[2]
                [tag/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?tag=$matches[1]&feed=$matches[2]
                [tag/([^/]+)/page/?([0-9]{1,})/?$] => index.php?tag=$matches[1]&paged=$matches[2]
                [tag/([^/]+)/?$] => index.php?tag=$matches[1]
                [type/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?post_format=$matches[1]&feed=$matches[2]
                [type/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?post_format=$matches[1]&feed=$matches[2]
                [type/([^/]+)/page/?([0-9]{1,})/?$] => index.php?post_format=$matches[1]&paged=$matches[2]
                [type/([^/]+)/?$] => index.php?post_format=$matches[1]
                [events/tags/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?event-tags=$matches[1]&feed=$matches[2]
                [events/tags/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?event-tags=$matches[1]&feed=$matches[2]
                [events/tags/([^/]+)/page/?([0-9]{1,})/?$] => index.php?event-tags=$matches[1]&paged=$matches[2]
                [events/tags/([^/]+)/?$] => index.php?event-tags=$matches[1]
                [events/categories/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?event-categories=$matches[1]&feed=$matches[2]
                [events/categories/(.+?)/(feed|rdf|rss|rss2|atom)/?$] => index.php?event-categories=$matches[1]&feed=$matches[2]
                [events/categories/(.+?)/page/?([0-9]{1,})/?$] => index.php?event-categories=$matches[1]&paged=$matches[2]
                [events/categories/(.+?)/?$] => index.php?event-categories=$matches[1]
                [locations/[^/]+/attachment/([^/]+)/?$] => index.php?attachment=$matches[1]
                [locations/[^/]+/attachment/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1
                [locations/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
                [locations/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
                [locations/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]
                [locations/([^/]+)/trackback/?$] => index.php?location=$matches[1]&tb=1
                [locations/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?location=$matches[1]&feed=$matches[2]
                [locations/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?location=$matches[1]&feed=$matches[2]
                [locations/([^/]+)/page/?([0-9]{1,})/?$] => index.php?location=$matches[1]&paged=$matches[2]
                [locations/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?location=$matches[1]&cpage=$matches[2]
                [locations/([^/]+)(/[0-9]+)?/?$] => index.php?location=$matches[1]&page=$matches[2]
                [locations/[^/]+/([^/]+)/?$] => index.php?attachment=$matches[1]
                [locations/[^/]+/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1
                [locations/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
                [locations/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
                [locations/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]
                [events/[^/]+/attachment/([^/]+)/?$] => index.php?attachment=$matches[1]
                [events/[^/]+/attachment/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1
                [events/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
                [events/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
                [events/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]
                [events/([^/]+)/trackback/?$] => index.php?event=$matches[1]&tb=1
                [events/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?event=$matches[1]&feed=$matches[2]
                [events/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?event=$matches[1]&feed=$matches[2]
                [events/([^/]+)/page/?([0-9]{1,})/?$] => index.php?event=$matches[1]&paged=$matches[2]
                [events/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?event=$matches[1]&cpage=$matches[2]
                [events/([^/]+)(/[0-9]+)?/?$] => index.php?event=$matches[1]&page=$matches[2]
                [events/[^/]+/([^/]+)/?$] => index.php?attachment=$matches[1]
                [events/[^/]+/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1
                [events/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
                [events/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
                [events/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]
                [events-recurring/[^/]+/attachment/([^/]+)/?$] => index.php?attachment=$matches[1]
                [events-recurring/[^/]+/attachment/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1
                [events-recurring/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
                [events-recurring/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
                [events-recurring/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]
                [events-recurring/([^/]+)/trackback/?$] => index.php?event-recurring=$matches[1]&tb=1
                [events-recurring/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?event-recurring=$matches[1]&feed=$matches[2]
                [events-recurring/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?event-recurring=$matches[1]&feed=$matches[2]
                [events-recurring/([^/]+)/page/?([0-9]{1,})/?$] => index.php?event-recurring=$matches[1]&paged=$matches[2]
                [events-recurring/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?event-recurring=$matches[1]&cpage=$matches[2]
                [events-recurring/([^/]+)(/[0-9]+)?/?$] => index.php?event-recurring=$matches[1]&page=$matches[2]
                [events-recurring/[^/]+/([^/]+)/?$] => index.php?attachment=$matches[1]
                [events-recurring/[^/]+/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1
                [events-recurring/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
                [events-recurring/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
                [events-recurring/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]
                [robots\.txt$] => index.php?robots=1
                [.*wp-(atom|rdf|rss|rss2|feed|commentsrss2)\.php$] => index.php?feed=old
                [.*wp-app\.php(/.*)?$] => index.php?error=403
                [.*wp-register.php$] => index.php?register=true
                [feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?&feed=$matches[1]
                [(feed|rdf|rss|rss2|atom)/?$] => index.php?&feed=$matches[1]
                [page/?([0-9]{1,})/?$] => index.php?&paged=$matches[1]
                [comments/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?&feed=$matches[1]&withcomments=1
                [comments/(feed|rdf|rss|rss2|atom)/?$] => index.php?&feed=$matches[1]&withcomments=1
                [comments/page/?([0-9]{1,})/?$] => index.php?&paged=$matches[1]
                [search/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?s=$matches[1]&feed=$matches[2]
                [search/(.+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?s=$matches[1]&feed=$matches[2]
                [search/(.+)/page/?([0-9]{1,})/?$] => index.php?s=$matches[1]&paged=$matches[2]
                [search/(.+)/?$] => index.php?s=$matches[1]
                [author/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?author_name=$matches[1]&feed=$matches[2]
                [author/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?author_name=$matches[1]&feed=$matches[2]
                [author/([^/]+)/page/?([0-9]{1,})/?$] => index.php?author_name=$matches[1]&paged=$matches[2]
                [author/([^/]+)/?$] => index.php?author_name=$matches[1]
                [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&feed=$matches[4]
                [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&feed=$matches[4]
                [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/page/?([0-9]{1,})/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&paged=$matches[4]
                [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]
                [([0-9]{4})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&feed=$matches[3]
                [([0-9]{4})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&feed=$matches[3]
                [([0-9]{4})/([0-9]{1,2})/page/?([0-9]{1,})/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&paged=$matches[3]
                [([0-9]{4})/([0-9]{1,2})/?$] => index.php?year=$matches[1]&monthnum=$matches[2]
                [([0-9]{4})/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?year=$matches[1]&feed=$matches[2]
                [([0-9]{4})/(feed|rdf|rss|rss2|atom)/?$] => index.php?year=$matches[1]&feed=$matches[2]
                [([0-9]{4})/page/?([0-9]{1,})/?$] => index.php?year=$matches[1]&paged=$matches[2]
                [([0-9]{4})/?$] => index.php?year=$matches[1]
                [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/?$] => index.php?attachment=$matches[1]
                [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1
                [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
                [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
                [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]
                [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/trackback/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&tb=1
                [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&feed=$matches[5]
                [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&feed=$matches[5]
                [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/page/?([0-9]{1,})/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&paged=$matches[5]
                [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&cpage=$matches[5]
                [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)(/[0-9]+)?/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&page=$matches[5]
                [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/?$] => index.php?attachment=$matches[1]
                [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1
                [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
                [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
                [[0-9]{4}/[0-9]{1,2}/[0-9]{1,2}/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]
                [([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/comment-page-([0-9]{1,})/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&cpage=$matches[4]
                [([0-9]{4})/([0-9]{1,2})/comment-page-([0-9]{1,})/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&cpage=$matches[3]
                [([0-9]{4})/comment-page-([0-9]{1,})/?$] => index.php?year=$matches[1]&cpage=$matches[2]
                [.?.+?/attachment/([^/]+)/?$] => index.php?attachment=$matches[1]
                [.?.+?/attachment/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1
                [.?.+?/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
                [.?.+?/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
                [.?.+?/attachment/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]
                [(.?.+?)/trackback/?$] => index.php?pagename=$matches[1]&tb=1
                [(.?.+?)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?pagename=$matches[1]&feed=$matches[2]
                [(.?.+?)/(feed|rdf|rss|rss2|atom)/?$] => index.php?pagename=$matches[1]&feed=$matches[2]
                [(.?.+?)/page/?([0-9]{1,})/?$] => index.php?pagename=$matches[1]&paged=$matches[2]
                [(.?.+?)/comment-page-([0-9]{1,})/?$] => index.php?pagename=$matches[1]&cpage=$matches[2]
                [(.?.+?)(/[0-9]+)?/?$] => index.php?pagename=$matches[1]&page=$matches[2]
            )
    
        [extra_rules] => Array
            (
            )
    
        [extra_rules_top] => Array
            (
                [locations/?$] => index.php?post_type=location
                [locations/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?post_type=location&feed=$matches[1]
                [locations/(feed|rdf|rss|rss2|atom)/?$] => index.php?post_type=location&feed=$matches[1]
                [locations/page/([0-9]{1,})/?$] => index.php?post_type=location&paged=$matches[1]
                [events/?$] => index.php?post_type=event
                [events/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?post_type=event&feed=$matches[1]
                [events/(feed|rdf|rss|rss2|atom)/?$] => index.php?post_type=event&feed=$matches[1]
                [events/page/([0-9]{1,})/?$] => index.php?post_type=event&paged=$matches[1]
            )
    
        [non_wp_rules] => Array
            (
            )
    
        [extra_permastructs] => Array
            (
                [category] => Array
                    (
                        [with_front] => 1
                        [ep_mask] => 512
                        [paged] => 1
                        [feed] => 1
                        [forcomments] =>
                        [walk_dirs] => 1
                        [endpoints] => 1
                        [struct] => /category/%category%
                    )
    
                [post_tag] => Array
                    (
                        [with_front] => 1
                        [ep_mask] => 1024
                        [paged] => 1
                        [feed] => 1
                        [forcomments] =>
                        [walk_dirs] => 1
                        [endpoints] => 1
                        [struct] => /tag/%post_tag%
                    )
    
                [post_format] => Array
                    (
                        [with_front] => 1
                        [ep_mask] => 0
                        [paged] => 1
                        [feed] => 1
                        [forcomments] =>
                        [walk_dirs] => 1
                        [endpoints] => 1
                        [struct] => /type/%post_format%
                    )
    
                [event-tags] => Array
                    (
                        [with_front] =>
                        [ep_mask] => 0
                        [paged] => 1
                        [feed] => 1
                        [forcomments] =>
                        [walk_dirs] => 1
                        [endpoints] => 1
                        [struct] => events/tags/%event-tags%
                    )
    
                [event-categories] => Array
                    (
                        [with_front] =>
                        [ep_mask] => 0
                        [paged] => 1
                        [feed] => 1
                        [forcomments] =>
                        [walk_dirs] => 1
                        [endpoints] => 1
                        [struct] => events/categories/%event-categories%
                    )
    
                [location] => Array
                    (
                        [with_front] =>
                        [ep_mask] => 1
                        [paged] => 1
                        [feed] => 1
                        [forcomments] =>
                        [walk_dirs] => 1
                        [endpoints] => 1
                        [struct] => locations/%location%
                    )
    
                [event] => Array
                    (
                        [with_front] =>
                        [ep_mask] => 1
                        [paged] => 1
                        [feed] => 1
                        [forcomments] =>
                        [walk_dirs] => 1
                        [endpoints] => 1
                        [struct] => events/%event%
                    )
    
                [event-recurring] => Array
                    (
                        [with_front] =>
                        [ep_mask] => 1
                        [paged] => 1
                        [feed] => 1
                        [forcomments] =>
                        [walk_dirs] => 1
                        [endpoints] => 1
                        [struct] => events-recurring/%event-recurring%
                    )
    
            )
    
        [endpoints] => Array
            (
            )
    
        [use_verbose_rules] =>
        [use_verbose_page_rules] =>
        [rewritecode] => Array
            (
                [0] => %year%
                [1] => %monthnum%
                [2] => %day%
                [3] => %hour%
                [4] => %minute%
                [5] => %second%
                [6] => %postname%
                [7] => %post_id%
                [8] => %author%
                [9] => %pagename%
                [10] => %search%
                [11] => %category%
                [12] => %post_tag%
                [13] => %post_format%
                [14] => %event-tags%
                [15] => %event-categories%
                [16] => %location%
                [17] => %event%
                [18] => %event-recurring%
            )
    
        [rewritereplace] => Array
            (
                [0] => ([0-9]{4})
                [1] => ([0-9]{1,2})
                [2] => ([0-9]{1,2})
                [3] => ([0-9]{1,2})
                [4] => ([0-9]{1,2})
                [5] => ([0-9]{1,2})
                [6] => ([^/]+)
                [7] => ([0-9]+)
                [8] => ([^/]+)
                [9] => ([^/]+?)
                [10] => (.+)
                [11] => (.+?)
                [12] => ([^/]+)
                [13] => ([^/]+)
                [14] => ([^/]+)
                [15] => (.+?)
                [16] => ([^/]+)
                [17] => ([^/]+)
                [18] => ([^/]+)
            )
    
        [queryreplace] => Array
            (
                [0] => year=
                [1] => monthnum=
                [2] => day=
                [3] => hour=
                [4] => minute=
                [5] => second=
                [6] => name=
                [7] => p=
                [8] => author_name=
                [9] => pagename=
                [10] => s=
                [11] => category_name=
                [12] => tag=
                [13] => post_format=
                [14] => event-tags=
                [15] => event-categories=
                [16] => location=
                [17] => event=
                [18] => event-recurring=
            )
    
        [feeds] => Array
            (
                [0] => feed
                [1] => rdf
                [2] => rss
                [3] => rss2
                [4] => atom
            )
    
        [page_structure] => %pagename%
    )
  16. Fee
    Member
    Posted 1 year ago #

    this I added before get_header. If I add it before get_footer instead, there are two lines more at the end:

    [feed_structure] => feed/%feed%
    [comment_feed_structure] => comments/feed/%feed%
  17. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    Global tables are only relevant with regards to listing of events, if you create an event on a subsite, it's still a post stored on the subsite, so you shouldn't be seeing a 404 there.

    Have you tried creating a new event with your desired MS settings already in place and then visiting that?

    Since nobody else is getting this issue atm, I still have to chalk it down to a problem on your end somewhere, I reserve going in to check things out for pro users only unless it's a bug many ppl are getting, so there's not much more I can say to help here.

  18. Fee
    Member
    Posted 1 year ago #

    Hi Marcus,
    I understand that you can't give so much free support. Maybe I'm going to buy your PRO, but somewhere in the future, I don't need the additional features by now.
    I don't know which WP version and setups you're using. Maybe it's related to WP 3.5 that's coming out soon - the most people will get that later. And who knows how many people use exactly this MU global mode with linking to subsite.
    So we (the thread owner and me) are the first ones and waiting...
    Thanks for your support so far.

  19. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    I've just tested this out with 3.5RC2 and it works fine for me.

    RC3 is out today but given you had the problem already, I'm not convinced it's an EM or WP issue, would have to dig into a site with this problem to find out more.

  20. Fee
    Member
    Posted 1 year ago #

    Hi Marcus,
    thanks for looking into it, I didn't expect it.
    Just a question, that I could maybe find out more myself: Did you update your existing install or did you try it with a fresh install?

    I downloaded RC3 today and updated my fresh install from yesterday, but it didn't change the issue. It's hard for me to think of the cause outside of EM because I used complete new and untouched WP and EM download. If it's not EM it must be a server, php or MySQL issue.

  21. Fee
    Member
    Posted 1 year ago #

    I tried now a print_r(get_current_blog_id()); in different places of your plugin files (yes, touched them now again...), testing on the subsite. Sometimes the output is "1", sometimes "2" (the correct blog_id of the subsite would be "2").
    I don't know why this is caused exactly, but I saw this already in working with other plugins and themes. In some places I had to work with global $current_blog and $current_blog->blog_id. I guess, this is needed in your plugin, too.

  22. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    I updated the site. I'll keep this in mind and test this again asap.

    Since you're persistently testing, let's try some more :)

    Try modifying this in em-functions.php

    if( !function_exists('get_current_blog_id') ){
    	/**
    	 * Substitutes the original function in 3.1 onwards, for backwards compatability (only created if not previously defined)
    	 * @return int
    	 */
    	function get_current_blog_id(){
    		global $current_site;
    		if ( ! is_multisite() )
    			return 1;
    		if( !empty($current_site->blog_id) ){
    			return $current_site->blog_id;
    		}else{
    			return 1;
    		}
    	} //for < 3.1
    }

    search for the first line on the code above as that didn't change.

    Also, where does it output 1 and when does it output 2 (i.e. what parts of a page, event widget, list etc.)?

  23. Fee
    Member
    Posted 1 year ago #

    Hi Marcus,
    tried this, no changes. I also tried the same with $current_blog instead of $current_site, and I even tried to force id 2 with

    function get_current_blog_id(){
    	return 2;
    }

    Then I tried it more risky and searched through all your files and replaced the get_current_blog_id() with $current_blog->blog_id, of course with calling the global before. Nothing changes! So this was not the right suggestion from me.
    Now I cleaned it with replacing all EM files with the downloaded 5.3.1 version and tried the print_r again.

    Testing on the events page (list):

    - /templates/templates/events-list.php:
    before em_locate_template('templates/events-search.php',true); -> 2
    after em_locate_template('templates/events-search.php',true); -> 1

    - /templates/templates/events-search.php:
    before (line 49) EM_Object::ms_global_switch(); -> 2
    after (line 49) EM_Object::ms_global_switch(); -> 1
    after (line 51) EM_Object::ms_global_switch_back(); -> 1 (stays on 1 here!)
    this is inside the categories call

    -/classes/em-object.php function ms_global_switch_back()
    taken out !is_main_site() (because we are now virtually on 1 == main_site)

    if( EM_MS_GLOBAL ){
    	restore_current_blog();
    }

    voilĂ : The blog_id is correctly switched back to 2, content displays correctly on the events list.
    Adding new events works correctly now.
    The 404 is still on the details page for the previous added events, but the now added event shows correctly.

  24. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    Probably won't get to it today but will test out the latest RC tomorrow on clean MS to make sure.

  25. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    OK, I've set up a new blank install and tested it out... you're right!

    Thanks for your patience & persistence on this, just to let you know I've reproduced this so a fix should be out very soon, will let you know when it is.

  26. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    Turns out this is exactly the problem and your solution is correct too. Thanks for testing and figuring this out! We've released 5.3.2 with the fix (it's the only change to the plugin this time round :))

  27. Fee
    Member
    Posted 1 year ago #

    Thanks Marcus for your wonderful plugin, I really love it and appreciate your always very fast (and most times here free!) support! It's one of the best WordPress plugins ever :-)

  28. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    Great to hear, thx again!

  29. Fee
    Member
    Posted 1 year ago #

    Hi Marcus,
    today I recognized (with newest version 5.3.3), that the same has to be done with ms_global_switch(). Please remove the !is_main_site() here, too.

    function ms_global_switch(){
    	if( EM_MS_GLOBAL ){
    		//If in multisite global, then get the main blog categories
    		global $current_site;
    		switch_to_blog($current_site->blog_id);
    	}
    }

    If you want to reproduce it first: Try saving an event on a subsite with some sitewide categories checked. You are redirected to posts. Going back to the event edit page and removing the categories, saving: You are redirected again, the post is saved twice. On Frontend you get the same layout issues as mentioned earlier this thread.

  30. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    Thanks, we have a few MS fixes to make so will test this out asap and make sure it's in the next update (we're on 5.3.5 now btw).

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic