Support » Plugin: Quick Page/Post Redirect Plugin » Is there a limit?

  • Hello I’m using the plugin and I wanted to know is there is a limit in the number of redirects that we can create in our site. I did more than 50 redirects and the plugin stopped creating new ones.

    Can you guys help me? Thanks

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author anadnet

    (@anadnet)

    There isn’t a limit on how many redirects you can add.

    There is no limit. But queries are written very poorly.

    That has to be improved.

    Like one of the sample change mentioned here:

    in file: page_post_redirect_plugin.php
    in function: get_main_array

    Original Query:
    $theqsl = “SELECT * FROM $wpdb->postmeta a, $wpdb->posts b WHERE a.post_id = b.ID AND b.post_status != ‘trash’ AND ( a.meta_key = ‘_pprredirect_active’ OR a.meta_key = ‘_pprredirect_rewritelink’ OR a.meta_key = ‘_pprredirect_newwindow’ OR a.meta_key = ‘_pprredirect_relnofollow’ OR a.meta_key = ‘_pprredirect_type’ OR a.meta_key = ‘_pprredirect_url’) ORDE R BY a.post_id ASC;”;

    Needs to be changed to this:
    $theqsl = “SELECT a.*, b.ID, b.post_status FROM $wpdb->postmeta a, $wpdb->posts b WHERE a.post_id = b.ID AND b.post_status != ‘trash’ AND ( a.meta_key = ‘_pprredirect _active’ OR a.meta_key = ‘_pprredirect_rewritelink’ OR a.meta_key = ‘_pprredirect_newwindow’ OR a.meta_key = ‘_pprredirect_relnofollow’ OR a.meta_key = ‘_pprredirect_type’ OR a.meta_key = ‘_pprredirect_url’) ORDER BY a.post_id ASC;”;

    There is one more place where it is getting huge number of rows (not sure if that can be reduced by changing this query):
    line 651:
    $finalSQL = “SELECT * FROM {$wpdb->prefix}postmeta as m1 WHERE {$whereSQL} m1.post_id IN ( SELECT post_id FROM {$wpdb->prefix}postmeta as m WHERE 1 = 1 AND m.meta_key =’_ppr redirect_active’ AND m.meta_value = ‘1’);”;

    @anadnet Could you please do the above modifications. It will greatly enhance this plugin.

    luizourives

    (@luizourives)

    Is there really no limit? I hit 4000 redirects and the list page does not appear, it will come to 404 error. The other plugin pages work ok.

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