• Resolved Kristijan Lukšič

    (@kikiluksic)


    Hi team,

    When generating a CSV feed, the plugin logs repeated warnings because
    simplexml_load_file() is called on a temporary CSV file (_tmp.csv).

    Redacted log:
    [2025-08-20 18:21:39 UTC] PHP Warning: simplexml_load_file():
    /wp-content/uploads/woo-product-feed-pro/csv/_tmp.csv:1:
    parser error : Start tag expected, ‘<‘ not found
    in /wp-content/plugins/woo-product-feed-pro/classes/class-get-products.php on line 755
    [2025-08-20 18:21:39 UTC] PHP Warning: simplexml_load_file():
    [id,title,description,availability,condition,price,link,image_link,sale_price, …]
    in /wp-content/plugins/woo-product-feed-pro/classes/class-get-products.php on line 755
    [2025-08-20 18:21:39 UTC] PHP Warning: simplexml_load_file(): ^
    in /wp-content/plugins/woo-product-feed-pro/classes/class-get-products.php on line 755

    Facts:

    • Feed format is CSV, stored under /uploads/woo-product-feed-pro/csv/
    • The temp file begins with UTF-8 BOM + “id,title,…” (valid CSV)
    • Despite CSV, an XML validation step runs and triggers the warnings
    • Final CSV (without _tmp) is created, but logs get spammed and sync can stall

    Steps to reproduce:
    1) Create a CSV feed in Product Feed PRO.
    2) Click Generate/Regenerate.
    3) While _tmp.csv exists, plugin calls simplexml_load_file() on it.

    Expected:

    • XML parsing should run only for XML feeds (or files starting with ‘<‘)
    • CSV files—especially *_tmp.csv—should be skipped

    Environment/notes:

    • WooCommerce + Action Scheduler active
    • Page cache excluded for /wp-json/* and /wp-admin/admin-ajax.php
    • Cron is working (jobs run)

    Could you guard the XML parse by extension/first byte and ignore _tmp. files for CSV outputs?
    Happy to test a patched build. Thanks!

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Jeff Alvarez

    (@superlemon1998)

    Hi @kikiluksic ,

    I’m unable to replicate the error log you mention. What PHP version are you currently running and have you already run a basic debug to confirm that there aren’t any 3rd party theme or plugin conflict?

    https://ibb.co/MkWykYsn

    And if you haven’t yet, try creating a new feed and see if that fixes things.

    Thread Starter Kristijan Lukšič

    (@kikiluksic)

    Hey @superlemon1998,

    after further testing I found that the issue only happens when generating CSV feeds.

    • When the feed format is set to CSV, the plugin throws multiple errors like: PHP Warning: simplexml_load_file(): parser error : Start tag expected, '<' not found ... This happens because the plugin is trying to parse the CSV file as XML.
    • When I switch the feed format to XML, the feed generates successfully and works fine with Facebook/Meta Catalog.

    Environment:

    • PHP: 8.1.33
    • WooCommerce + WordPress updated to latest versions
    • Error appeared only after the latest plugin update
    • No 3rd party conflicts detected in logs

    It looks like there is a bug in the current version where CSV feeds are not handled correctly. Could you please confirm if this is a known issue and whether a fix is planned?

    Thank you for helping me,
    Kristijan

    Plugin Support Jeff Alvarez

    (@superlemon1998)

    Hi @kikiluksic,

    Thanks for that information but I’m still unable to replicate the error. I’ll consult our developers about this but I’m still unable to replicate the error: https://www.loom.com/share/de005a8cd64444baae721a79c89e912e

    Is there a specific step you did to replicate the error and have you tried creating a new feed and see if that still causes the error?

    I’ll consult with our developers regarding this as a potential bug but without an accurate way to replicate the behavior it’s hard for us to quickly apply a fix.

    Plugin Support Jeff Alvarez

    (@superlemon1998)

    Could you also please send a recording of the error or how you replicate it? The video may give us some clues on how you are facing this issue

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.