Home › Forums › WoodMart support forum › Preview of drafts is not working
Preview of drafts is not working
- This topic has 10 replies, 2 voices, and was last updated 11 months ago by Artem Temos.
-
AuthorPosts
-
January 9, 2024 at 6:08 pm #528386
b.brennerParticipantHi,
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 regardsAttachments:
You must be logged in to view attached files.January 10, 2024 at 11:12 am #528570
Artem TemosKeymasterHello,
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 builderThank you in advance
January 10, 2024 at 12:40 pm #528602
b.brennerParticipantHello,
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
January 10, 2024 at 5:35 pm #528776
Artem TemosKeymasterTry 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 ); }
January 11, 2024 at 10:41 am #528941
b.brennerParticipantThank you. For some reason it is working with one product draft and with another one not. Please check the links below.
Best regardsJanuary 11, 2024 at 6:35 pm #529099
Artem TemosKeymasterHello,
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
January 11, 2024 at 6:36 pm #529101
Artem TemosKeymasterNote that you need to remove the code we provided earlier.
January 12, 2024 at 1:07 pm #529292
b.brennerParticipantHello,
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.January 12, 2024 at 4:14 pm #529376
Artem TemosKeymasterWe 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.
January 24, 2024 at 10:14 am #532960
b.brennerParticipantThanks a lot, the issue with the language switch is processed by WPML now.
January 25, 2024 at 11:18 am #533380
Artem TemosKeymasterYou are welcome. Feel free to contact us if you have any further questions.
-
AuthorPosts
- You must be logged in to create new topics. Login / Register