Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter ms1980

    (@ms1980)

    Hi,

    Thank you for the quick response and the clarifying questions.

    Yes, this is a legacy backup job — it was created with an older version of BackWPup, long before the 5.x release. The job has been running continuously through multiple BackWPup upgrades over the years.

    Here are the specifics:

    • Job name: “Job with ID 1”
    • Job types configured: dbcheck, dbdump, file, wpexp, wpplugin
    • Storage: Local folder
    • Schedule: Daily at 03:00 via WP-Cron

    The wpexp (WordPress XML export) step is the one generating the warnings. The job was created when WXR export was still available in the BackWPup UI. After upgrading to 5.x, the job retained its original configuration including the WXR export step, even though the current UI no longer offers that option for new jobs.

    The WXR export code is still present in the plugin at inc/class-jobtype-wpexp.php and still executes for legacy jobs that have it configured. The issue is specifically in the wxr_post_taxonomy() method (around line 806), which calls get_post() without arguments — relying on the global post—buttheexportlooponlycallssetuppostdata(post — but the export loop only calls setup_postdata(post—buttheexportlooponlycallssetupp​ostdata(post_item) without first setting $GLOBALS[‘post’] = $post_item. Since setup_postdata() does not set the global $post (that’s done by WP_Query::the_post() in WordPress core), every call to wxr_post_taxonomy() triggers the warning.

    I’ve applied a one-line fix locally that resolves it completely:

    foreach ( $posts as $post_item ) {
    $GLOBALS[‘post’] = $post_item; // added this line
    setup_postdata( $post_item );
    }

    If the WXR export feature is considered deprecated in BackWPup 5.x, another valid fix would be to gracefully skip the wpexp step for legacy jobs, or provide a migration path to remove it from existing job configurations.

    Happy to provide any additional details.

    Best regards,

    Maik

Viewing 1 replies (of 1 total)