• This happened with WP 4.8.2 and happens with 4.8.3. Evident in several sites on different web servers.

    The plugin’s options page settings are not pre-set when the plugin is first activated. The options page needs to be saved 2 or 3 times after activation before the presets show and can be saved.

    In WordPress 4.8.3, the options page has developed an additional problem: adjusting any settings causes the options page to return a dead (white) page after ‘Save Settings’ is clicked.

    Example URL of returned page on settings page save is example.com/wp-admin/options-general.php?page=abj404_solution&subpage=abj404_options&_wpnonce=0fcea0bd15

    On a separate note. The Logs page has no ‘delete log’ option.

    Thanks for this plugin. When it works it works well. 4.8.3 seems to have broken it.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Aaron

    (@aaron13100)

    Lee,

    I tried to fix the options page issues in version 2.2.1. Please let me know if that version fixes it for you or not.

    There is no “delete log” option because the log is trimmed (deleted) automatically when it gets too big based on the setting named “Maximum log disk usage (MB)”. You’re not the first person to ask about this. Where were you looking for the button? Maybe I can add a note there about how it works.

    thanks

    Thread Starter Lee Hodson (VR51)

    (@leehodson)

    Thanks Aaron.

    I cleaned the database of all 404 Solutions data then re-installed the plugin. The pre-set options issue persists.

    From an initial install standpoint:

    • All numerical options are set at ‘2’,
    • All boolean options are set to ‘0’, and
    • All text input fields are set to ‘2’.

    When I save the options they do now populate with their proper pre-sets.

    The error recorded by PHP is:

    [05-Nov-2017 08:49:56 UTC] ABJ-404-SOLUTION (ERROR): ABJ404-SOLUTION Normal error handler error: errno: 2, errstr: "array_key_exists() expects parameter 2 to be array, string given", errfile: "**server-root**/wp-content/plugins/404-solution/includes/PluginLogic.php", errline: 168

    I’ve placed to error log files on my server for you to review (sanitized):

    https://wpservicemasters.com/abj404_debug.txt
    https://wpservicemasters.com/abj404_error_log.txt

    (will be deleted when you reply or within 24 hours of this post, whichever comes sooner)

    It appears the previous 403 response received on options save (the one that lead to a White Page of Doom) was caused by duplicate rows in abj404 data tables. Deleting the tables and starting afresh solved this specific issue.

    Log Deletion

    An option to manually delete the logs Would be most useful under the Purge Options page.

    Also thinking it would be useful to include a full reset option that removes all the plugin’s DB data ready for recreation.

    Plugin Author Aaron

    (@aaron13100)

    Lee,

    Please try version 2.2.2.

    The error logs were helpful as I wasn’t able to reproduce the issue this time. So I made a change that should theoretically fix it, but I wasn’t able to test it. Let me know how it goes.

    thanks

    Thread Starter Lee Hodson (VR51)

    (@leehodson)

    I have deleted those log files. I’m glad they were helpful.

    Tested the new version in a different site where 404 Solutions has never before been used. The options pre-sets populated properly.

    Tested the upgrade from 2.2.1 to 2.2.2 in a site where 404 Solutions is already in use. The upgrade works fine. The settings page saves but to remove the errors I had to delete the database tables/rows prefiX_abj404_options and prefiX_abj404_logsv2 then deactivate and reactivate the plugin to rebuild the tables.

    [05-Nov-2017 13:36:28 UTC] WordPress database error Duplicate key name 'requested_url' for query ALTER TABLE prefix_abj404_logsv2 ADD INDEX requested_url (requested_url) made by require('wp-admin/menu.php'), require_once('wp-admin/includes/menu.php'), do_action('admin_menu'), WP_Hook->do_action, WP_Hook->apply_filters, ABJ_404_Solution_WordPress_Connector::addMainSettingsPageLink, ABJ_404_Solution_PluginLogic->getOptions, ABJ_404_Solution_PluginLogic->updateToNewVersion, ABJ_404_Solution_DataAccess::createDatabaseTables

    Looks like the problem is solved except for where the plugin’s database tables already exist.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Options do not save first time’ is closed to new replies.