Support » Plugin: 301 Redirects - Easy Redirect Manager » There has been a critical error on this website. Please check your site admin em

  • Resolved neroley350

    (@neroley350)


    Hello,

    I have like 100+ redirect rules using the free version and i can’t access the wp-admin/options-general.php?page=eps_redirects page because i get “There has been a critical error on this website. Please check your site admin email inbox for instructions” most of the times … you can check the screenshot here: https://www.swisstransfer.com/d/2a1c8014-5c0b-4beb-9ddd-d8d0568b223f

    I even tried opening like 10 or 20 tabs with the same page and it seems 1% of the times the redirects show on the page and in the other tabs I get the same critical error, so for sure it’s related only to the plugin, i even disabled and enabled, disabled all other plugins etc …

    Maybe because I have so many redirect rules? I don’t get any email with the crash report like you get when the theme crashes the site so I have no idea how to fix this …

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author WebFactory

    (@webfactory)

    Hi,
    Without that email, it’s gonna be borderline impossible to get to the bottom of the issue πŸ™ Did you check the spam folder? And do you get other emails from WP?

    Thread Starter neroley350

    (@neroley350)

    From WP I get emails but from your plugin’s error I never got any email… very strange.

    Plugin Author WebFactory

    (@webfactory)

    Very strange yes, as it’s the same function that sends them out.
    100ish rules are not that much. So that shouldn’t be a problem. Do you have a large number of posts/pages?

    Thread Starter neroley350

    (@neroley350)

    2200 pages
    20400 posts

    and growing
    ………………..

    Plugin Author WebFactory

    (@webfactory)

    Unfortunately, that’s the cause of the problem, not the 100 redirects. The way we have things coded at the moment gives you the option to redirect to an existing page/post. Hence we have a dropdown with all the posts. In your case, that’s a dropdown with +20k entries and that’s not good πŸ™

    That problem has been on our to-do for some time but hasn’t been fixed as it affects existing users and is one of the core functionalities of the plugin. We’ll definitely fix it, it’ll just take a bit longer.

    As for an immediate fix for your problem – I only have one, and it involves a bit of code editing. Find the eps_dropdown_pages() function in eps-form-elements.php:19 and add return array() as it’s first line. That’ll skip generating the dropdown and you’ll be able to open the redirects page.

    Thread Starter neroley350

    (@neroley350)

    Thanks, it worked. I added your fix like you can see below, let me know if it’s ok.

    
    if (false === ($options = get_transient('post_type_cache_' . $post_type))) {
    	  return array();
        $options = eps_dropdown_pages(array('post_type' => $post_type));
        set_transient('post_type_cache_' . $post_type, $options, HOUR_IN_SECONDS);
      }
    Plugin Author WebFactory

    (@webfactory)

    Yes, looks good πŸ‘

    If you have a minute, please leave a review. It’s what keeps support going. Thank you πŸ™ https://wordpress.org/support/plugin/eps-301-redirects/reviews/#new-post

    Thread Starter neroley350

    (@neroley350)

    ok

    Plugin Author WebFactory

    (@webfactory)

    Thank you very much!

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.