Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1009343

    I attempted to restore a page with the WordPress revision function after I made some adjustments. After I tried to restore the page, I get redirected to a product page with the message “Page restored to revision”. Often the restoration of the page works.

    After I removed the “Product Slider” element from the page the revision works properly and I do not get redirected to a product page. I think there is a conflict between the revision function and the product slider element from Enfold.

    #1009375

    Hey FelixB,

    Can you create me an admin account please – I’ll check if I can reproduce and debug the issue.

    Best regards,
    Peter

    #1009582
    This reply has been marked as private.
    #1010035

    Hi,
    Can you please post the password – I just see “Sorry, I’ve already forgotten that secret.” when I visit the page. You can use the private content field for the login credentials.

    Best regards,
    Peter

    #1010638

    Hello,

    Best regards
    Felix

    • This reply was modified 5 years, 6 months ago by Günter. Reason: Moved pwd to private section
    #1010831

    Hi,

    There is a plugin conflict. I created a testpage (copy from your page) and removed most of the content except product slider and a few simple elements.

    The problem persisted.

    After deactivating all plugins (except WooCommerce) switching between the revisions works fine.

    I reactivated all plugins again.

    But you should check your plugins because I get js errors in frontend and backend which break loading pages correctly.

    To figure out which plugin(s) cause(s) the problem deactivate all plugins and reactivate one after the other and check.

    Best regards,
    Günter

    #1012396

    Hello Günter,

    I’ve checked again and made some tests. Here are the results:

    1. Deactivate all plugins except for WooCommerce & Yoast SEO. The revision issue still appears.
    2. Deactivate all plugins except for WooCommerce. The revision work properly.
    3. Activate all plugins except for Yoast SEO. The revision work properly.
    4. Activate all plugins and switch theme to default theme (Twenty Seventeen). The revision work properly.

    So my conclusion, the theme Enfold conflicts with Yoast SEO plugin. Also i found the same issue in the forum support: https://kriesi.at/support/topic/yoast-wordpress-seo-plugin-causing-conflict/. Do you have any similar experience with that?

    Best regards
    Felix

    #1013024

    Hi,
    We’re not aware of incompatibility issues regarding Yoast SEO and Enfold but it seems to be a problem with WooCommerce, Yoast and Enfold used together. Yoast uses the_content filter on revisions which doesn’t make much sense with WooCommerce shortcodes. The WooCommerce class is not fully loaded and this triggers the redirect. To fix the issue add this code to your child theme functions.php:

    
    add_filter('the_content', 'avia_restore_revision_yoast_fix_strip_shortcodes', 1, 1);
    function avia_restore_revision_yoast_fix_strip_shortcodes($content)
    {
    	if(is_admin() && class_exists('WPSEO_Link_Watcher') && !empty($_REQUEST['revision'])) $content = strip_shortcodes( $content );
    	return $content;
    }
    

    Best regards,
    Peter

    #1014105

    Hello Peter,
    thank you. That worked perfect!

    Best regards
    Felix

    #1014524

    Hi Felix,

    Great, glad you got it working. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

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