WordPress.org

Forums

Simple 301 Redirects
Cannot enter more then 499 entries (13 posts)

  1. ben.at
    Member
    Posted 1 year ago #

    When using Simple 301 Redirects V1.06 I was unable to enter new entries beyond entry number 499.
    It said settings saved but the new entry never showed.

    I found this to be because of the php setting max_input_vars, default: 1000, because the input form will need 2 fields per entry.

    So I had to increase this setting, ini_set was not working due to security restrictions but placing the following .htaccess file in the /wp-admin folder solved the issue:

    # Setting by Ben for simple 301 redirects
    php_value max_input_vars 2000

    https://wordpress.org/plugins/simple-301-redirects/

  2. Scott Nelle
    Member
    Plugin Author

    Posted 1 year ago #

    Wow, thanks Ben! The data is stored in a serialized string and until now I haven't been able to figure out what the limiting factor for string size is. This is the first time someone's been able to track down the source of this problem.

    I'll see if there's something I can do to fix this directly in the plugin. Barring that, I'll point people to your solution until I can implement a different storage mechanism for the data.

    Thanks again!

  3. mayrrecordscan
    Member
    Posted 1 year ago #

    Hey scottnelle. i guess it's not the perfect solution to store maybe up to thousands of links in a serialized array. i had a similar difficulty, so i decided to load the data direct from a csv file. you can get line by line while you check against the incoming link.

    http://www.php.net/manual/en/function.fgetcsv.php

  4. Ash Durham
    Member
    Posted 1 year ago #

    This issue doesn't have anything to do with "how" you store the data, its the form itself. Generally speaking, as soon as a user gets to 250 redirects (2 input fields per redirect = 500 input fields), most are hitting the problem.

    Scott, the quickest way to get around this is to not have all the redirects in input fields, just print them to page. This way you'll never hit the limit. Create an edit button on the right with the remove button, load the values into input fields via javascript at that point.

    This will obviously affect the way your saving the values. When you split out the serialised value to display to the page, you could json the group (old redirect/new redirect) and have it in a data attribute - that will allow you to pass the values to the dynamic inputs on edit - then submit the form via an ajax call, compiling the changed and unchanged values in javascript, and passing back to the server as 1 json value, decode, serialise, save.

    Save that to the database, or take mayrrecordscan's idea of storing in a CSV. Either way, the general process above will fix the issue at hand.

  5. Scott Nelle
    Member
    Plugin Author

    Posted 12 months ago #

    You're absolutely right, Ash. After taking a second look at what Ben did to resolve the issue, I arrived at the same conclusion. It's the way that the plugin was entering the data that was causing problems.

    I've got an update that's more-or-less along the same lines as your suggestion just about ready to go. I'm doing some final testing and interface enhancements now. Thanks for your feedback!

  6. Ash Durham
    Member
    Posted 12 months ago #

    No worries, anything I can do to help ;)

  7. leo4all
    Member
    Posted 12 months ago #

    @scottnelle when are you going to release this new update I having issue with more entries.

    regards.

  8. BDDierks
    Member
    Posted 11 months ago #

    Any status on this?

  9. jsgd
    Member
    Posted 11 months ago #

    Any update on this, running into the same issue. Thanks!

  10. miooimmio
    Member
    Posted 8 months ago #

    Any updates? Look forward to a new version.

    Thanks!

  11. hakerdesign
    Member
    Posted 7 months ago #

    hi i have the same issue
    cant add more 301 redirect

    waiting for update
    tnx

  12. pysanchis
    Member
    Posted 6 months ago #

    Hello,

    Any update on this ;-)?
    That would help a lot :) Thanks!

  13. davecampbell
    Member
    Posted 5 months ago #

    Ben - Thanks for the tip. Works like a charm - until the next version comes out.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Simple 301 Redirects
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.