kunalnagar / custom-404-pro

đź”— A WordPress Plugin to override the default 404 page with any page from the Admin Panel.
https://wordpress.org/plugins/custom-404-pro/
GNU General Public License v2.0
8 stars 6 forks source link

Version 3.0.5 Save Settings Issue #39

Closed enzor77 closed 5 years ago

enzor77 commented 5 years ago

With version 3.0.5 save settings still not working

kunalnagar commented 5 years ago

@enzor77 can you deactivate the plugin, activate it and then try saving the settings?

enzor77 commented 5 years ago

yes, that works; thanks a lot

mwhs commented 5 years ago

I have the same problem - settings are not saved. I've: reset the settings / decativated and activated the plugin / uninstalled and installed it again - nothing helped.

Any more ideas? (Using the current build: 3.2.3)

kunalnagar commented 5 years ago

@mwhs uninstalling and re-installing the plugin should definitely fix the issue.

mwhs commented 5 years ago

@kunalnagar unfortunately not, hasn't fixed anything.

kunalnagar commented 5 years ago

@mwhs are you getting any errors? can you put some logs here?

there should be a table in your MySQL: wp_custom_404_pro_options. Can you post a screenshot of the table? Don't worry, no sensitive information is stored in the table.

mwhs commented 5 years ago

@kunalnagar hmmm, I don't have access to the table - looks like our Webhost doesn't allow access to the database (weird...)

No, there isn't any error shown - I change my settings (-> select the page which should be shown as 404 page) and when I save them they are instantly reverted back to default settings.

kunalnagar commented 5 years ago

@mwhs I'm not sure how that is happening even after you completely removed the plugin from WordPress. Deactivating is different, and completely removing the plugin is different.

At this point, since you don't have access to the Database as well, can you record a video of the removal, install and then saving the plugin and post a link here?

I don't record any logs on the plugin due to privacy issues so I'm actually out of options.

mwhs commented 5 years ago

@kunalnagar : I tried my very best to record it... let me please know when you have seen it, then I'll remove it from the webserver: https://***/Custom_404_Problem.MOV

kunalnagar commented 5 years ago

@mwhs I just downloaded the video locally. I'll take a look at it and let you know. For now, you can delete it from the webserver. Thanks a lot!

mwhs commented 5 years ago

@kunalnagar : whow, that was fast :) - it's deleted!

kunalnagar commented 5 years ago

@mwhs so I saw the video and it seems like the Settings are not saved. Let's try something here:

Can you try using the URL mode and set it to a custom URL and see if that works?

mwhs commented 5 years ago

@kunalnagar of course, I've tried it: unfortunately, that doesn't change anything - settings are not saved.

kunalnagar commented 5 years ago

@mwhs are any of your other settings saving in the General Tab?

mwhs commented 5 years ago

@kunalnagar No, nothing is saved :( At first I thought it is something in general, but this only happens with "Custom 404 Pro", all other plugins work as they should.

kunalnagar commented 5 years ago

@mwhs okay, so the possible explanation here is that the tables required for the plugin to operate are not created successfully - OR, if they are, the settings are not being saved to the tables. I presume it's the former.

In the next release of the plugin, I'll add some error logging and display so I can better debug issues like these - I haven't done that right now.

One more thing - can you revert back to the last working version for you and check if that works? (a version before 3.0.5?) Let me know what you find!

mwhs commented 5 years ago

@kunalnagar Yes, of course, where can I get them?

kunalnagar commented 5 years ago

@mwhs you can go here and download ALL the previous versions of the plugin (at the very bottom): https://wordpress.org/plugins/custom-404-pro/advanced/

Also, can you post two things here: your WordPress version and your PHP version - I am trying to repro this issue to the exact parameters.

mwhs commented 5 years ago

@kunalnagar I took the 3.0.3, it's the same: settings are not saved... That's really weird, I know that at least 3.0.3 worked fine.

PHP version is: 7.0.32 Wordpress is: 5.1.1 (it's a managed Wordpress installation at 1und1)

kunalnagar commented 5 years ago

@mwhs your WordPress and PHP versions are fine (latest) so those shouldn't be a problem.

I'm as stumped as you - 3.0.3 worked for you before and doesn't work now..

Okay, let's investigate two other solutions for test:

  1. Can you setup a fresh WordPress Install and ONLY install the latest version (3.2.3) of the Custom 404 Pro plugin and try saving settings there?

  2. If option 1 does not work, switch to version 2.1.3 of the plugin and see on your current installation and see if the Settings Save?

With these tests, I'm trying to figure out if you have sufficient permissions to create Custom Tables in your WordPress installation. The best way would be to actually check your SQL tables, but you said it's a shared install..

mwhs commented 5 years ago

@kunalnagar okay, I used a local installation of Wordpress (5.0.3), all was working fine - then I did a Wordpress update to 5.1.1 and the plugin stopped saving the settings...

Now I took version 2.1.3 and installed it at our Website which is online and (!) all works.

So... maybe it's more a combination of Wordpress 5.1.1 and the newer versions of the plugin? Because at the local installation there are no restrictions.

kunalnagar commented 5 years ago

@mwhs this gets interesting by the minute :P

So you're saying the plugin works on WordPress 5.0.3 for you and doesn't after you upgrade to 5.1.1? How about if you directly install 5.1.1 fresh and then install the plugin?

Yes, I think it has something to do with 5.1.1 and the WordPress versions. I have another data point now to test, thanks!

Also, 2.1.3 was the last version of the plugin that did not create any custom tables. It just inserted data into existing tables, and that's why there was a performance problem in the WP Dashboard. 3.0.0 onwards we create custom tables for the plugin and store data there so it doesn't interfere with the Dashboard.

mwhs commented 5 years ago

@kunalnagar the local installation was a near fresh one, except that I did the upgrade from 5.0.3 to 5.1.1.

Well, yes, interesting... or confusing :P

kunalnagar commented 5 years ago

@mwhs I've just released version 3.2.4 with some error logging when installing the plugin. Can you do a fresh install of the latest version of the plugin and see if you get any errors when activating the plugin? Thanks!

mwhs commented 5 years ago

@kunalnagar where can I get the 3.2.4 version? I don't see it at here at github and Wordpress also doesn't offer me that version.

kunalnagar commented 5 years ago

@mwhs sorry about that - had some issues while pushing the release - can you check now?

mwhs commented 5 years ago

@kunalnagar Installed it and I have the same problem, the settings are not saved.

kunalnagar commented 5 years ago

@mwhs Like I said, you have to reinstall the plugin - I've added error logging to the Install Step - when you activate the plugin for the first time, you should see some errors.

mwhs commented 5 years ago

@kunalnagar I am getting that message: "The plugin generated 240 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin."

kunalnagar commented 5 years ago

@mwhs okay then this confirms that there is some problem with your MySQL installation while creating the tables for the plugin. Couple of things:

If you have enabled error logging on your WordPress Installation, you should see the error log in the wp-content/debug.log file.

If you've not enabled error logging, you can do that by going to your wp-config.php file and pasting the following there along with the database configuration:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);

After doing that, you should re-install the plugin to repro the error and you'll see the error on the screen OR in the debug.log file I mentioned above. Hope this helps! If you're able to figure out the error, let me know!

mwhs commented 5 years ago

@kunalnagar well, yes, I am seeing the error messages now and also see the entries at the log file, it just confirms that the tables are not created.

I am now a little bit lost, because of the managed wordpress installation I don't have direct access to the database. Just wondering a bit, because I thought a other plugin also has created own tables, but... atm I have no chance to check it... all weird...

Thanks a lot for your help and patience so far!

kunalnagar commented 5 years ago

@mwhs not a problem - but you also mentioned that the plugin did not work on your upgrade from 5.0.3 to 5.1.1 on the local system. Can you try the same procedure there as well and see what errors you get?