Events Made Easy Forums Bug fixed or feature request implemented event permalinks starting with digits lead to redirect loop

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #59409
    Anonymous
    Inactive

    Hi, as part of my research on my feature request on events permalink structure I found that when I manually edit the permalink of an event to something like “2019-01-01-event-name”, opening the event’s permalink causes an infinite redirect loop. Changing it to “event-name-2019-01-01” works. I suspect that the code thinks that if the URL component starts with a digit, it is an internal URL that needs to be redirected to the permalink. If that is correct, you need to test that the whole URL component is a number (not just that it starts with one).

    #59411
    Franky
    Keymaster

    Thanks, I’ll look into that this weekend

    #59415
    Franky
    Keymaster

    Here it doesn’t go in a loop (maybe you have an oldere eme version?), but if you use 2019-01-01-… it currently falls in a calendar-like page because of a permalink setting.
    Try changing line 215 in events-manager.php from
    $newrules['(.*/)?'.$events_prefix.'(\d{4})-(\d{2})-(\d{2}).*'] = 'index.php?page_id='.$events_page_id.'&calendar_day=$matches[2]-$matches[3]-$matches[4]';
    to
    $newrules['(.*/)?'.$events_prefix.'(\d{4})-(\d{2})-(\d{2})/?$'] = 'index.php?page_id='.$events_page_id.'&calendar_day=$matches[2]-$matches[3]-$matches[4]';

    (changing ‘.*’ into ‘/?$’ in the regex). That should solve it

    #59433
    Anonymous
    Inactive

    I’m running EME 2.0.85, and I’ve just seen the redirect loop again when I edited the permalink for a newly created event. Making the suggested change did not remove the problem. I can avoid creating such permalinks for the time being.

    #59434
    Franky
    Keymaster

    Well, after that change, you should reload your permalink settings in wp.
    And Ivm guessing it won’t gtin a redireyloop if you’d use a date that in reality has no events behind it.
    But I will release the next version soon.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.
Scroll to Top