Skip to content Skip to sidebar

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 -

Supporter timezone: Asia/Singapore (GMT+08:00)

Tagged: 

This topic contains 59 replies, has 0 voices.

Last updated by davidP-136 2 months, 3 weeks ago.

Assisted by: Kor.

Author Posts
July 17, 2025 at 3:16 pm #17246925

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience. We would like to request access to your server's phpMyAdmin database. Could you please share the credentials in your next private reply?

Alternatively, you can install the Adminer plugin so that we can check the database directly from your WordPress dashboard.

Let us know which option works best for you.

July 24, 2025 at 7:03 am #17266066

davidP-136

Hi Kor,

I'm checking with the team for providing all details. Can you hold for a while?

July 24, 2025 at 8:33 am #17266453

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply. Sure, please let me know how it goes.

July 28, 2025 at 5:16 am #17273698

davidP-136

Hi Kor,
Does it work if we share the DB SQL file with you?

July 28, 2025 at 8:20 am #17274052

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply. I can share this with our 2nd Tier Support and will let you know if it’s sufficient for troubleshooting.

However, it would be much better if we could have access to a staging site where the database can be accessed. This would allow our team to troubleshoot the issue directly and more effectively.

August 4, 2025 at 8:43 am #17292242

davidP-136

Hello Kor,

Yes, as we already shared, you have access to our staging site. However, we are unable to provide direct database access. If needed, we can share the database SQL file with you.

Also, we’ve reported another issue related to the Preview functionality, which is also connected to WPML.
Ticket ID: https://wpml.org/forums/topic/preview-functionality-breaks-when-wpml-multilingual-cms-plugin-is-active/
This issue is also intermittent and occurs only on certain pages.

August 4, 2025 at 9:12 am #17292316

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply. Yes, you may share a copy of the database and I will forward this to our 2nd Tier Support.

August 5, 2025 at 12:28 pm #17296398

davidP-136

Hi Kor, can I get an email address where I can share the DB file?

August 8, 2025 at 3:18 pm #17305837

davidP-136

Hi Kor,
I have send an email of DB file to chai.kc@onthegosystems.com. Please check,
Note: The DB does not have user tables.

August 11, 2025 at 1:03 am #17308024

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply. I've shared the DB copy to our 2nd Tier Support and I will come back to you once I've feedback.

August 12, 2025 at 4:58 pm #17314331

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience. I have some feedback from our 2nd Tier Support. This is what they mentioned and some steps that required to perform from your end.

I imported your SQL file into a local test site and investigated.

I found two autosaves from July (for post IDs 338786 and 263301), but I’m not certain what actions triggered them.

From further research, “disabling” autosave only stops the periodic autosaves (e.g., every 30 seconds of inactivity). It does not stop autosaves triggered by specific actions, such as previewing a post. These actions can create autosave revisions via the autosave REST API endpoint, and Divi also has its own autosave system, which is poorly documented.

To help identify the cause, I suggest adding tracking code that logs details whenever an autosave is created. This will allow us to capture a call stack and request information in the debug.log for review.

Please ensure WP debugging is enabled, then add the following code to your theme’s functions.php file:

add_action( 'wp_creating_autosave', function( $new_autosave, $is_update ) {
    $server = [
        'REQUEST_METHOD'        => $_SERVER['REQUEST_METHOD']    ?? '',
        'REQUEST_URI'           => $_SERVER['REQUEST_URI']       ?? '',
        'QUERY_STRING'          => $_SERVER['QUERY_STRING']      ?? '',
        'HTTP_REFERER'          => $_SERVER['HTTP_REFERER']      ?? '',
        'HTTP_USER_AGENT'       => $_SERVER['HTTP_USER_AGENT']   ?? '',
        'HTTP_ORIGIN'           => $_SERVER['HTTP_ORIGIN']       ?? '',
        'HTTP_X_REQUESTED_WITH' => $_SERVER['HTTP_X_REQUESTED_WITH'] ?? '',
        'HTTP_X_WP_NONCE'       => isset($_SERVER['HTTP_X_WP_NONCE']) ? substr($_SERVER['HTTP_X_WP_NONCE'], 0, 8) . '…' : '',
        'REMOTE_ADDR'           => $_SERVER['REMOTE_ADDR']       ?? '',
        'PHP_SAPI'              => PHP_SAPI,
        'DOING_AJAX'            => defined('DOING_AJAX')   && DOING_AJAX,
        'REST_REQUEST'          => defined('REST_REQUEST') && REST_REQUEST,
        'REQUEST[action]'       => $_REQUEST['action'] ?? '',
    ];

    $server['IS_ADMIN_AJAX']          = strpos($server['REQUEST_URI'], 'admin-ajax.php') !== false;
    $server['LOOKS_LIKE_REST_AUTOSAVE'] = (bool) preg_match('#/wp-json/wp/v2/(posts|pages)/\d+/autosaves#', $server['REQUEST_URI']);

    $autosave_info = [
        'is_update'       => (bool) $is_update,
        'post_parent'     => $new_autosave['post_parent']  ?? null,
        'post_type'       => $new_autosave['post_type']    ?? null,
        'post_status'     => $new_autosave['post_status']  ?? null,
        'title_len'       => isset($new_autosave['post_title'])   ? strlen($new_autosave['post_title'])   : null,
        'content_len'     => isset($new_autosave['post_content']) ? strlen($new_autosave['post_content']) : null,
    ];

    $trace = array_map(function($f){
        $file = $f['file'] ?? '[internal]';
        $line = $f['line'] ?? 0;
        $func = ($f['class'] ?? '') . ($f['type'] ?? '') . ($f['function'] ?? '');
        return sprintf('%s:%d %s', $file, $line, $func);
    }, debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS));

    $log = "=== WP Autosave Tracer ===\n"
         . date('c') . "\n"
         . 'Autosave: ' . wp_json_encode($autosave_info) . "\n"
         . 'Request: '  . wp_json_encode($server) . "\n"
         . "Backtrace:\n- " . implode("\n- ", $trace) . "\n"
         . str_repeat('=', 28);

    error_log($log);
}, 10, 2);

When editing a post, if an autosave is unexpectedly created, please check the debug.log for an entry generated at that time and share it with us so we can investigate further.

August 13, 2025 at 9:02 am #17316144

davidP-136

Hi Kor,

Yes, correct — in the database, I found that only two autosave posts are saved.
We have added the logs to /themes/div-child/logs/custom_autosave.log.
I checked after setting up the logs by updating one page, and the issue happened as I shared previously.
Page: hidden link
Video: hidden link
The autosave does not happen all the time; it auto-removes on refresh, as I showed in the video. You can find logs as well from the WP file manager on the shared path.

If I check a page where the autosave is saved in the database ( 263301 ), the issue shown in the shared video above does not occur.
Page: hidden link

I suggest checking this directly on our site, as we have already shared the login details with you. You can also access the log file from the File Manager plugin, which is installed on the site.

We would like this to be resolved as soon as possible.

Let me know if you have any questions.

August 13, 2025 at 4:05 pm #17318530

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply. I've forwarded your response to our 2nd Tier Support and they will check and revert back to us as soon as possible.

August 14, 2025 at 4:14 pm #17321616

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply. I have some feedback from our 2nd Tier Support. This is what they mentioned.

We reviewed the logs and they give us some insight into the issue.

As I mentioned earlier, Divi appears to have its own custom autosave system, which isn’t well documented publicly. From the backtrace you shared (read from bottom to top), we can see that WordPress heartbeat AJAX requests are triggering Divi’s custom autosaves — specifically via the et_fb_heartbeat_autosave hook.

Backtrace: - /var/www/html/ecsdev.participaction.com/wp-includes/class-wp-hook.php:324 {closure} - /var/www/html/ecsdev.participaction.com/wp-includes/class-wp-hook.php:348 WP_Hook->apply_filters - /var/www/html/ecsdev.participaction.com/wp-includes/plugin.php:517 WP_Hook->do_action - /var/www/html/ecsdev.participaction.com/wp-admin/includes/post.php:2015 do_action - /var/www/html/ecsdev.participaction.com/wp-content/themes/Divi/includes/builder/core.php:2278 wp_create_post_autosave - /var/www/html/ecsdev.participaction.com/wp-content/themes/Divi/includes/builder/core.php:2421 et_fb_autosave - /var/www/html/ecsdev.participaction.com/wp-includes/class-wp-hook.php:326 et_fb_heartbeat_autosave - /var/www/html/ecsdev.participaction.com/wp-includes/plugin.php:205 WP_Hook->apply_filters - /var/www/html/ecsdev.participaction.com/wp-admin/includes/ajax-actions.php:3503 apply_filters - /var/www/html/ecsdev.participaction.com/wp-includes/class-wp-hook.php:324 wp_ajax_heartbeat - /var/www/html/ecsdev.participaction.com/wp-includes/class-wp-hook.php:348 WP_Hook->apply_filters - /var/www/html/ecsdev.participaction.com/wp-includes/plugin.php:517 WP_Hook->do_action - /var/www/html/ecsdev.participaction.com/wp-admin/admin-ajax.php:192 do_action

This means that while we’ve successfully disabled the standard WordPress autosaves, Divi’s system is still active. To prevent these, you would need to either:

-Disable Divi’s autosave system (I’m not aware of a direct method for this), or

-Disable or reduce the frequency of WordPress’ heartbeat API using a plugin.

So, while we now have a clearer understanding of what’s happening, it’s not an issue we can resolve from our side.

August 18, 2025 at 6:03 am #17326104

davidP-136

Hi Kor,
Thanks for the detailed update let me check and get back to you.

The topic ‘[Closed] Autosave happen in random page and posts’ is closed to new replies.