BUG REPORT - Unknown process while saving prevents creation of new content

The Problem:
Logged in as an administrator, we get the error “Are you sure you want to do this? Please try again” whenever we try to create new content.

Using the latest version of PRO, we’ve encountered this bug three times now that forces all content to be deleted before the site is operational again. In other words, the only way to remedy this issue has been to rebuild a site anew, from the ground up. For existing sites with lots of content, this just isn’t an option.

We cannot reproduce the exact steps, but we’re close. In any case, I’ve created a video that shows some of the issues we’re experiencing and may provide some insight. The first 6 minutes is me playing around and familiarizing myself with the bug. Skip to 6:00 to see me take all necessary steps to determine it’s related to the PRO theme http://youtu.be/014TJIhvDZ4?hd=1

After disabling all plugins and switching themes, I investigated this further by examining the database. What I noticed is that PRO creates “ghost” posts in the wp_posts table every time we try to create a new Page item (this bug is also happening for Post types). Please see screenshot. We get the error “Do you want to do this;” no page is listed in the Pages list; but a ghost page AND a page of attempted article title is created in the database along with an Auto Draft. Please see screen shots.

To fix this, we’ve tried to delete all pages from the wp_posts table. This did not help.

In fact, out of desperation, we ran the command ‘delete from wp_posts delete from wp_postmeta.’

This STILL did not help. Where else would Pro related data be stored if not in the wp_posts table and related cornerstaone / PRO meta data in the wp_postmeta table?

While we cannot pinpoint the exact cause, we feel that when we have accidentally clicked “save” in the PRO visual editor a second time while the page is still saving (green bar going across the top) the error happens shortly after that.

Thoughts? What information can I get you to help diagnose?

You can see from the photos in this thread the ghost posting in the database screenshot , the error we get when we try to add new content as Admin, and those ghost posts being added to the navigation (we have add to navigation automatically turned on for the menu). The Japanese in those titles say “TITLE NASHI” - which is the translation for the wordpress phrase “no title.” Sorry for that, that screenshot is with all plugins off including WPML.

Also, just want to comment that it would not let me upload these supporting images at once because I’m a “new user.”

Guys, this is silly. Please make it so that we don’t have to create tremendously long threads by making multiple individual posts just to upload photos?

Hey there,

Please try the following solutions:

  1. Reset your security keys. See http://www.wpbeginner.com/wp-tutorials/how-to-fix-are-you-sure-you-want-to-do-this-error-in-wordpress/

  2. Ensure everything is up to date according to our version compatibility list at https://theme.co/apex/forum/t/troubleshooting-version-compatibility/195

  3. Clear all caches including browser cache then completely remove your caching plugins and other optimization plugins. Please contact the plugin developer to learn how to completely remove their plugin from your system.

  4. If you’re using a CDN, please clear the CDN’s cache and disable optimization services.

  5. I see you’ve tested disabling plugins but could would you mind deactivating while we investigate.

  6. Remove custom CSS, Javascript and templates.

  7. Add this code in your wp-config.php

define( 'WP_MEMORY_LIMIT', '256M' );
define( 'WP_MAX_MEMORY_LIMIT', '512M' );

Thanks.

Looking back at my original post and your suggestions two things hit me:

  1. "The only way to resolve this is to create a new installed, and;
  2. from your suggestion, “Reset your security keys.”

Of course whenever I’d reinstall a new security key set would be generated in wp-config.php.

And, voila! This indeed helped us to get past the problem. If there is anyone getting this message, especially as an admin, then temporarily getting around it is to indeed go into wp-config.php and reset your security keys.

One can get a new set of keys by visiting this address, which will generate them for you.
https://api.wordpress.org/secret-key/1.1/salt/

BUT, Notice I said this is a way to temporarily get around the problem rather than solve the problem. Since getting around it, this has happened again on a fresh install with no plugins enabled, and just the PRO theme enabled.

This thread is very helpful in helping better understand the problem: Something is happening in PRO that corrupts WP NONCE system and leads to an invalid SESSION_TOKEN in the wp_usermeta table

From my observations, this is happening when the saving process doesn’t fully complete on the front end (When the green bar goes across the screen.)

Sometimes this process hangs. It will get to about 99% and just freezes. So we hit refresh or go back to the Dashboard. Subsequently, trying to add new content results in this error and the corrupted database entries.

Hopefully this helps shed some light on the problem, but I’ll also continue to investigate.

But, we know now that to safely get back to a working state, here is what a person has to do:

  1. In the mysql cli, "delete from wp_posts where post_title=“Auto Draft” " (these are orphaned entries)

  2. … “delete from wp_posts where post_title=”" " (this will delete the ghost entries)

  3. In your post or page list, the page you tried to create will not be listed but it will be listed in the database as an orphaned entry. You need to delete any page you tried to create from the db. If the page was called “Shopping” for example then clean it up with "delete from wp_posts where post_title=“Shopping”. (repeat this for any titles you see in the database but aren’t listed in the Page or Post list in Wordpress)

  4. edit the wp-config.php file to delete all existing security salts; replace them with the new security salts that you generated from the API link I mentioned above.

These steps have to be repeated each time this process happens.

Hi there,

Thank you for the detailed information. Ther are two points I saw on your message which I want consult:

  1. Saving goes to 90% and stay there: That shows there is a problem on the hosting service provider settings. Kindly make sure that the server mod_security rules are not including the Pro Builder URLs. Also if you have services like CloudFlare you need to add Rules to avoid using them in Pro URLs. For more information:

https://theme.co/apex/forum/t/popular-questions/204

  1. Pro version: The draft page addition is changed in the new version. Please kindly make sure you use the version 1.1.1.

Hope it helps.

I’m not sure what you mean here. I am the hosting service. I have 100% control over the dedicated host server. There is nothing enabled other than mod_rewrite for apache, beyond what’s typically installed when I do “apt-get install apache2” which installs apache 2.4.

What do you recommend I set mod_security settings to be? If this were a real concern or requirement, wouldn’t it be part of the PRO install documentation to set mod_security to something compatible?

If you are going to actually advise me to alter the core configuration of a major linux service, can you please be a bit more specific in what and why this would be helpful?

Furthermore, my website works fine until we randomly receive this bug. which is 90% of the time. If apache configuration were a problem, it would never work.

I don’t use cloudflare or other CDN services. This is a development machine - no caching, no CDN, no nothing…

Also, I don’t understand your link to help me solve my problem. Why would you suggest this? It has absolutely nothing to do with what I am reporting.

Finally, I am using version 1.1.1. I did not say 90%; I said 99%.You read the thread thoroughly and watched all of the video, right?

I’m sorry, but nothing you have suggested has been helpful.

Hi there,

What we gave are the just general assumption and possible causes, we can’t provide support for server related configuration assuming that the hosting provider knows the configuration.

With this, I can’t provide further answer since I’m confused with the issue too. It’s best if I could test it myself, would you mind providing your admin and FTP login credentials in a secure note?

Thanks!