Site logo

[Support request] is_xml_preprocess_enabled Snippet causing errors with GeneratePress

Home Forums Support [Support request] is_xml_preprocess_enabled Snippet causing errors with GeneratePress

Home Forums Support is_xml_preprocess_enabled Snippet causing errors with GeneratePress

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2095166
    Peter

    https://www.wpallimport.com/documentation/troubleshooting/encoding/

    As per the advice of WPAllImport, a major WooCoomerce plugin, this snippet is needed to avoid errors with XML import files:
    add_filter( 'is_xml_preprocess_enabled', 'wpai_is_xml_preprocess_enabled', 10, 1

    Whilst it works in other themes, it causes the website to crash (have a critical error) in GeneratePress. Can you please advise?

    #2095199
    Leo
    Staff
    Customer Support

    Hi there,

    I can’t quite see how GP can be the issue here.

    What is the critical error you are getting?

    I do see that your code above is missing a closing bracket ) and ; when comparing to the documentation link you’ve provided.

    #2095205
    Peter

    My apologies for the typo above, however, the snippet was inserted correctly in my functions file.

    I still get this error:

    There has been a critical error on this website.
    Learn more about troubleshooting WordPress.

    Where can I view an error log to get to the bottom of this? The thing is, it works fine on Royal Shop and StoreFront.

    #2095268
    Fernando
    Customer Support

    Hi Peter,

    Just to confirm, how are you disabling XML preprocessing through wpai_is_xml_preprocess_enabled? Were you able to add this function as well?

    You’ll need to define this function for the filter you added to work. Kindly confirm with WPAllImport if this code is correct:

    function wpai_is_xml_preprocess_enabled($is_enabled){
    return false;
    }

    As for debugging, you’ll need to set WP_DEBUG and WP_DEBUG_LOG to “true”. Then, you’ll be able to find a debug.log file in your website’s wp-content folder. You may also ask assistance from your hosting provider regarding this.

    You may refer to this link for assistance regarding this: https://wordpress.org/support/article/debugging-in-wordpress/#wp_debug_log

    Hope this helps! If you’ll need further assistance, kindly get back to us with a screenshot of the error and a copy of the error log. Thank you!

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.