Home Forums WoodMart support forum Preview of drafts is not working

Preview of drafts is not working

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #528386

    b.brenner
    Participant

    Hi,
    HAPPY NEW YEAR! May Woodmart become the world’s best woocommerce theme! (-;
    The preview of the product drafts of variable products is not working anymore. This issue only occurs with variable products, with simple products it´s fine.
    I tested it on a staging with all plugins and the child theme deactivated. When I activate storefront it is working without problems.
    Below the admin access for the staging site.
    Best regards

    Attachments:
    You must be logged in to view attached files.
    #528570

    Artem Temos
    Keymaster

    Hello,

    Please, disable all plugins that are not related to our theme and provide us with your FTP access. You can leave only the following plugins that are required for our theme:
    WoodMart core
    WooCommerce
    Elementor/WPBakery page builder

    Thank you in advance

    #528602

    b.brenner
    Participant

    Hello,
    below the FTP access for the staging site. The plugins are disabled. I also give you admin access and FTP for the production site in case the issue can be solved.

    Best regards

    #528776

    Artem Temos
    Keymaster

    Try to add the following PHP code snippet to the child theme functions.php file to fix this. NOTE that it will work on your main website and not on the staging.

    if ( ! function_exists( 'wd_change_prev_post_type_link' ) ) {
    	function wd_change_prev_post_type_link( $link, $post ) {
    		$preview_pos = strpos( $link, 'preview' );
    
    		if ( 'product' === $post->post_type && ( $preview_pos || 0 === $preview_pos ) ) {
    			return home_url( 'borowski-shop/' . $post->post_name );
    		} else {
    			return $link;
    		}
    	}
    
    	add_filter( 'preview_post_link', 'wd_change_prev_post_type_link', 1, 3 );
    }
    #528941

    b.brenner
    Participant

    Thank you. For some reason it is working with one product draft and with another one not. Please check the links below.
    Best regards

    #529099

    Artem Temos
    Keymaster

    Hello,

    You can fix it by applying patch # 529092. To do this, go to Dashboard -> WoodMart -> Patcher, find the corresponding patch and click on the “Apply” button. Let us know if it works for you.

    Kind Regards

    #529101

    Artem Temos
    Keymaster

    Note that you need to remove the code we provided earlier.

    #529292

    b.brenner
    Participant

    Hello,
    thank you, the issue described is solved after applying the patch.

    Unfortunately after applying the patch there is another problem with the translation, see video. It is not possible anymore to view the English translation by using the language switch. This concerns product drafts and published variable products – but only products that I published after applying the patch.

    With the drafts of simple products the issue looks different, please see the second video. I have to click the language flag twice to load the translated page.

    Regards

    Attachments:
    You must be logged in to view attached files.
    #529376

    Artem Temos
    Keymaster

    We just tested this with the default theme on your staging website and it doesn’t work too. You can test it on your main website with the default theme as well.

    #532960

    b.brenner
    Participant

    Thanks a lot, the issue with the language switch is processed by WPML now.

    #533380

    Artem Temos
    Keymaster

    You are welcome. Feel free to contact us if you have any further questions.

Viewing 11 posts - 1 through 11 (of 11 total)