Plugin Author
Guido
(@guido07111975)
Hi John,
I tried to duplicate your situation but I don’t get an error here.
– Using PHP 7.1.9 (local install)
– Removed all previous plugin settings from database
– Clicked “Save Changes” once
– Updated my contact form page
When clicking “Save Changes” without changing anything the plugin settings are added to the database; the checkboxes get value “no” and the text inputs become empty values.
Did this PHP warning occured once or every time you re-save your contact page?
Guido
Thread Starter
John
(@dsl225)
Thanks for testing Guido.
That site is on PHP 7.1.17
In the meanwhile, I filled in all Label fields of VSCF settings and the issue remains the same.
So it doesn’t seem to be related to this as I thought.
What happens is the following and only with the page that holds the shortcode:
[contact from_header=”info@mysite.com” email_to=”mysite@gmail.com”]
When I edit this page and change something in there (or even don’t change anything) and then click on UPDATE the main screen becomes blank empty and remain only the dashboard menus at left and the PHP warning is written in the log.
If I go one step backwards with the browser, everything is back to normal and when I check that page again all edits have been taken into account correctly and the form is still working fine.
So, if you are unable to reproduce this, it might be a conflict with another plugin or something wrong with my shortcode? I also tried other variations of the shortcode but always getting same results…
I really don’t know what else to test.
Plugin Author
Guido
(@guido07111975)
Ho John,
I did take a look at the files that are mentioned:
PHP Warning: Cannot modify header information – headers already sent by (output started at /…/wp-includes/functions.php:1476) in /…/wp-admin/post.php on line 198
This has something to do with the nonce field and the cookie that is being set.
There’s another related thread on VSCF forum, posted today, regarding a validation error (duplicate ID in plugin code). Meanwhile I found out the nonce code is loaded twice. This might cause your problem as well. I don’t know why the nonce code is being loaded twice so that’s why I’ve started a thread. You can find it here.
If you have a test site you could remove the nonce code from plugin file vscf-form (line 339) and update page again. Error should not occur anymore…
Guido
Thread Starter
John
(@dsl225)
Thanks for the update!
I just tested at a quite minimal site running on same server, same PHP version and same WordPress 4.9.6 and I didn’t get this issue!
So, that’s quite strange and could mean a plugin or theme conflict.
I’ll be waiting for your own results first and see what happens before exploring this further.
Plugin Author
Guido
(@guido07111975)
Hi John,
Have updated plugin few moments ago.
I hope the PHP warning is fixed / gone now as well..
Guido
Thread Starter
John
(@dsl225)
Absolutely!
Everything works fine now, without errors.
Many thanks for your prompt reaction and issue solving!