Home › Forums › WoodMart support forum › Woodmart + Relevanssi causes 3rd party plugin compatibility issue
Woodmart + Relevanssi causes 3rd party plugin compatibility issue
- This topic has 21 replies, 2 voices, and was last updated 3 years, 3 months ago by
Artem Temos.
-
AuthorPosts
-
October 4, 2021 at 12:03 pm #322972
FrozenParticipantWe are having an issue when we use Relevanssi along with a plugin called Show Single Variations from iconicwp.
I have been in contact with them, and they have narrowed the issue down to how the theme shows the search results when the product_variation post type is included in the main WP_Query.
Their plugin adds ‘product_variation’ as a post_type argument along with ‘product’ in the main WP_Query so that the variations would also appear in the loop.
What happens is then the search results are shown on a posts page with a right hand side bar, rather than the normal products results pages.
Checking query monitor shows that it still loads archive-product.php template but something in the theme internally changes the sidebar template in the presence of product_variation post type.
Any ideas on what might be causing such behavior.
Thanks
Attachments:
You must be logged in to view attached files.October 4, 2021 at 12:37 pm #322985
Artem TemosKeymasterHi,
Could you please send us a link to your website where we can see this issue? Also, send us a screenshot of how it works with the default WordPress theme so we can see the difference?
Kind Regards
October 4, 2021 at 1:49 pm #322998
FrozenParticipantLink to website attached
October 4, 2021 at 2:02 pm #323000
Artem TemosKeymasterPlease, send us your FTP access as well.
October 4, 2021 at 2:39 pm #323008
FrozenParticipantSFTP details attached
October 5, 2021 at 7:17 am #323099
Artem TemosKeymasterTry to edit the file
woodmart/inc/classes/Layout.php
and replace the following lineif( woodmart_woocommerce_installed() && ( is_product_taxonomy() || is_shop() || is_product_category() || is_product_tag() || woodmart_is_product_attribute_archive() ) ) {
with this one
if ( woodmart_woocommerce_installed() && ( is_product_taxonomy() || is_shop() || is_product_category() || is_product_tag() || woodmart_is_product_attribute_archive() || ( is_search() && isset( $_GET['post_type'] ) && 'product' === $_GET['post_type'] ) ) ) {
October 5, 2021 at 8:50 am #323115
FrozenParticipantThanks, that worked, and the correct sidebar is now showing, but it’s on the right rather than the left.
Any way to put it back on the left and side of the page?
October 5, 2021 at 11:56 am #323163
Artem TemosKeymasterSorry, you need to replace the following one as well
if( woodmart_woocommerce_installed() && ( is_shop() || is_product_category() || is_product_tag() || woodmart_is_product_attribute_archive() ) ) {
with
if ( woodmart_woocommerce_installed() && ( is_shop() || is_product_category() || is_product_tag() || woodmart_is_product_attribute_archive() || ( is_search() && isset( $_GET['post_type'] ) && 'product' === $_GET['post_type'] ) ) ) {
October 5, 2021 at 1:08 pm #323184
FrozenParticipantThanks that’s great. This fixed the issue.
In total there were three places where this change needed to be made.
Is this change likely to make it into the next update to Woodmart, or would I need to place this in my child theme?
Thanks again!
October 5, 2021 at 1:22 pm #323189
Artem TemosKeymasterYes, we will review this code and consider adding to our next theme update.
November 15, 2021 at 10:20 am #331891
FrozenParticipantHi,
Sorry for digging this up again, but i have discovered another issue affecting search for guest/non logged in users.
When not logged in, viewing the search page does not show any results. However when logged in, the search functions just fine.
Switching to the storefront theme resolves the issue, so i’m assuming that its Woodmart related.
Any ideas why this might be?
Thanks,
James
November 15, 2021 at 12:08 pm #331922
Artem TemosKeymasterHello,
Please, disable all external plugins temporarily so we can check what is wrong.
Kind Regards
November 15, 2021 at 1:31 pm #331968
FrozenParticipantIt’s the same issue as before, if I disable either WooCommerce Show Single Variations or Relevanssi, or Wholesale Prices Premium the search as a guest works.
When all are enabled, the search results are only shown when logged in.
All other plugins have been disabled
November 15, 2021 at 2:30 pm #331984
Artem TemosKeymasterPlease, turn off all external plugins temporarily including cache and optimization ones.
November 15, 2021 at 2:44 pm #331992
FrozenParticipantOK, all plugins have been disabled.
November 15, 2021 at 2:45 pm #331994
Artem TemosKeymasterAs we can see, cache is still enabled https://gyazo.com/fcd562258cea651bf826a07373e4e60e
November 15, 2021 at 3:41 pm #332009
FrozenParticipantThat appears regardless. Both OP Cache, and Object-Cache are disabled. If you log into the dashboard you’ll see.
November 15, 2021 at 3:43 pm #332010
Artem TemosKeymasterCould you please enable those plugins that cause this issue and check the same search link with a default WordPress theme?
November 15, 2021 at 3:54 pm #332013
FrozenParticipantDone. The Following plugins have been enabled.
https://i.imgur.com/UnLkua9.png
StoreFront Theme has been activated.
Issue does not exist
https://i.imgur.com/xUBKCCt.png
Thanks
November 16, 2021 at 8:15 am #332156
Artem TemosKeymasterPlease, provide us with your current FTP access so we can check it.
November 16, 2021 at 9:35 am #332187
FrozenParticipantSFTP details attached.
November 16, 2021 at 12:56 pm #332271
Artem TemosKeymasterThis plugin has a specific PHP code for the WoodMart theme. And if we remove the code from the plugin it starts working correctly. You need to contact plugin developers for help on this matter.
You can try to remove this code yourself in the filewp-content/plugins/show-single-variations-premium/inc/class-compat-woodmart.php
-
AuthorPosts
- You must be logged in to create new topics. Login / Register