WordPress.org

Forums

Events Manager
[resolved] 404 errors on upgrade (43 posts)

  1. illusiodesign
    Member
    Posted 4 years ago #

    Looks like the 404 error is a permalinks issue. When I specify a custom structure, the links to the events posts become broken. However, when leaving the setting to default, everything works fine.

  2. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 4 years ago #

    hi, i tested it just now with /%category%/%postname%/ but no problems for me.

    one common issue is that the events page hasn't been selected from Events > Settings > Events Page. Just thought of another thing, did you try to de/reactivate the plugin?

  3. illusiodesign
    Member
    Posted 4 years ago #

    Yes, I tried deactivating and uninstalling the plugin and clearing the database entries. I reverted to the 3.0.98 version as recommended by Dave on the support forum and everything appears to be working fine.

  4. eventsmanager
    Member
    Posted 4 years ago #

    i misread your post a little, thought you meant custom permalink structures, i think u mean turning it on or off? if its not working with permalinks it's probably because things didn't update properly (see plugin site, recent post with update waltkthrough.

  5. Curtiss Grymala
    Member
    Posted 4 years ago #

    I followed the upgrade walkthrough completely, and experienced the exact same issue. All of the permalinks to my events stopped working when I updated to 4.0.2; leading to a 404 page, instead.

    I believe I found the cause of the issue and I found a temporary work-around.

    In my case, my "events" page was 3 levels deep in my site structure. I have a News Room page, which has an "Events" page as a child, then has my "Event Details" page (which is the page I have set as my events page in the Events Manager plugin settings) as a child of that.

    When I moved the "Event Details" page to the top of the site structure (so it doesn't have any parent pages), the permalinks started working properly.

    EDIT - I just updated to 4.0.3 and the issue still exists. I also tried testing with my "Event Details" page as a 2nd-level page; and the 404 errors persisted. The only way the permalinks seem to work is if the "Events" page is a top-level page on the site.

  6. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 4 years ago #

    nicely spotted. I'm able to duplicate the error. Will try to fix this asap.

  7. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 4 years ago #

    think i got it. does this work:

    replace classes/em-permalinks.php line 122 with:

    $events_slug = str_replace(trailingslashit(get_bloginfo('wpurl')),'', get_permalink($events_page->ID));
    				$events_slug = preg_replace('/\/$/','',$events_slug);

    and resave your custom permalink structure (normal wp settings) to trigger the permalink rule flush

  8. illusiodesign
    Member
    Posted 4 years ago #

    Moving the page to be at parent level resolved the issue. However, that's not going to work for people who need to have the page as a child.

    Marcus, did you mean line 243?

  9. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 4 years ago #

    nope, 122 should solve the issue with child levels. should make it into a version within a day or two

  10. Dave Hammond
    Member
    Posted 4 years ago #

    Could someone tell me how I work out which is line 122?

    I tried the edit mentioned above and crashed the entire site. I'd like another go but I'm not sure how to know I'm replace the correct line. (122)

    Dave

  11. Curtiss Grymala
    Member
    Posted 4 years ago #

    Dave - Marcus was saying to find the following line in your events-manager/classes/em-permalinks.php folder:

    $events_slug = $events_page->post_name;

    and replace it with the code he provided above.

    Marcus - I just tried it, and still can't seem to get it to work. I tested with my "Events" page as a 3rd-level page and as a 2nd-level page; I refreshed my permalinks, etc.; and I'm still getting 404 errors for my events when the "Events" page is not a top-level page on the site.

  12. Dave Hammond
    Member
    Posted 4 years ago #

    Thanks Curtiss. Still couldn't get that to work. I ended up using an ftp solution and switched out the classes/em-permalinks.php with a new one EM team sent me. it works now but there are still a few bugs i'm working on. 4:20 am here, going to sleep and work on it tomorrow.

    Dave

  13. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 4 years ago #

    Hey Curtiss, does 4.0.4 fix it? It fixes it for a lot or ppl inc. Dave (and all my tests) I made a vid (on the plugin site, latest post)

    If not, take a look at the /em-events.php file and around line 14, you'll see some commmented code.

    if you move the /* to just above the line with
    echo "<h2>WP_QUERY</h2>";

    and check your events list. if you can send me the output of that and and details about your structure (or screenshots) that'd help. you can post it to the contact form on the site

  14. Curtiss Grymala
    Member
    Posted 4 years ago #

    I will update this evening and try it out. I'll let you know either way. Thanks for your quick response.

  15. Curtiss Grymala
    Member
    Posted 4 years ago #

    Sadly, 4.0.4 actually seemed to break the event permalinks altogether for me (whether it's a top-level page or not). I reverted to 4.0.3 for now.

    I have submitted the output from on your contact form. Thanks.

  16. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 4 years ago #

    ok, working with Curtiss to try and fix this. note that this issue is limited to a certain spectrum of users, and I've not managed to pin it on one specific cause now.

    I've noticed two patterns that others could comment on if similar on theirs:

    1. does your permalink structure start with index.php/...
    2. your wp-admin, wp-content, etc. files are not all in one folder
    3. windows servers maybe, possibly IIS (wamp is ok)?
  17. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 4 years ago #

    I've finally managed to duplicate this issue successfully, I'm guessing everyone's sites are set up like this: http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

    If so, below this line in classes/em-permalinks.php line 122 replace

    $events_slug = str_replace(trailingslashit(get_bloginfo('wpurl')),'', get_permalink($events_page->ID));

    with

    $events_slug = str_replace(trailingslashit(get_bloginfo('wpurl')),'', get_permalink($events_page->ID));
    $events_slug = str_replace(trailingslashit(get_bloginfo('url')),'', get_permalink($events_page->ID));

    if this doesn't fix it, i'll need more info to go on because if I can replicate the problem, fixing it isn't a problem.

    I'll release this today in 4.0.6

  18. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 4 years ago #

    you need to go to your permalinks page and just click the update button after doing the above, to refresh your settings.

  19. kenneth
    Member
    Posted 4 years ago #

    I have this following problem
    When I try to add a new location from my buddypress profile I get the following error

    Not Found
    The requested URL /admin.php was not found on this server.

    I am not a php expert but I guess it has got something to do in
    templates/forms/location-editor.php

    <form enctype='multipart/form-data' name='editcat' id='location-form' method='post' action='admin.php?page=events-manager-locations' class='validate'>

    Is this problem related to what is being discussed in this thread or I am doing something wrong?

    I am using
    Events Manager Version 4.0.5
    Wordpress 3.0.5
    Buddpress 1.2.8

  20. healersla
    Member
    Posted 4 years ago #

    I've been trying everything I can think of and still can't get it to work.

    My site is still in development so I have a landing page on the root URL (www.healers.la).
    The calendar itself can be found here: http://www.healers.la/healing.php/events/ and the location page can be found here: http://www.healers.la/healing.php/locations/

    Everything seems to be working fine except for the slugs - when I click on an event or location, I get the "not found" message.

    When I change the WP permalinks to the default, everything works fine.

    I'm using WP 3.1.2 and EM 4.0.5.

    I'm hoping to launch the site next week - please help!!

    Thanks, Ilan.

  21. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 4 years ago #

    @healersla
    I'm hopefully sorting this out once and for all today. I already have an install with this issue to fix, but if you send me ftp and wp admin creds via http://wp-events-plugin.com/contact-us/ I could also have a look to see if it fixes yours too.

  22. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 4 years ago #

    this is a really pesky bug. I've narrowed it down to IIS and most probably only people using this: http://codex.wordpress.org/User:ringmaster/IIS#Alternate_Rewrite_Methods

    If you download the current dev version, I've made a temporary workaround, as I don't know how long this could take to fix. Basically, you can enable permalinks, but Events Manager will still work with querystrings, e.g.

    mysite.com/events/?event_id=x

    Once the problem is sorted, you'll be able to just revert to normal permalink slugs and the automatic 301 redirects should maintain your google rankings.

    To enable this, you need to go to your config file and add this:

    define('EM_DISABLE_PERMALINKS',true);

    If you want, you can wait until the next update, I hope tomorrow but running a little late atm.

  23. jlrezac
    Member
    Posted 4 years ago #

    you need to go to your permalinks page and just click the update button after doing the above, to refresh your settings

    The 4.0.6 update fixed this problem for me after I went to the permalinks menu and clicked update like in the pre-update fix. So if 4.0.6 didn't appear to have fixed this for you, try refreshing your permalinks settings. Glad it's finally worked out! Thanks.

  24. healersla
    Member
    Posted 4 years ago #

    4.0.6 fixed the problem for me too - thank you!!

  25. illusiodesign
    Member
    Posted 4 years ago #

    Ditto that on 4.0.6. It works great. Thanks for the fix!

  26. SimonCrosbie
    Member
    Posted 4 years ago #

    Nope - back to 404s again after upgrading.

    If I had hair left I'd be tearing it out. I'm already having similar trouble with others getting the 'no event' thing happening. Seems related to the theme I'm using, but now back to 404 errors after the upgrade.

    Done the permalinks update, but no change.

    This is frustrating as I'll end up flipping to EventEspresso by the end of the week. I don't have time to rebuild the site completely using a new theme as a base, the only other idea is to put the booking system on a subdomain and clean WP install. I'll lose the calendar in the sidebar, but at least it'll work as a temporary solution.

    I hope.

  27. SimonCrosbie
    Member
    Posted 4 years ago #

    Turned things on, off, on, off and back on again, reset the events page and it all works again - until I try to send a booking.

    Damn, so close.

    Looks like 4.0.6 has sorted the permalinks issue tho'. Well done on that one.

  28. Curtiss Grymala
    Member
    Posted 4 years ago #

    Sorry for being MIA the last few days. I've been working on other projects.

    I just upgraded to 4.0.6 and the permalink issue appears to be solved. Thank you so much for your quick work on this issue.

  29. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 4 years ago #

    glad that issue is sorted. i'm curious, is everyone using the default permalinks or using the disabled permalinks solution I provided above?

    @simon, pls open up other issues in a seperate thread

  30. SimonCrosbie
    Member
    Posted 4 years ago #

    Using default permalinks this time.

    @Marcus, Apologies - was smacking my head against a wall last night!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Events Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic