- This topic has 13 replies, 2 voices, and was last updated 1 year, 9 months ago by David.
-
AuthorPosts
-
December 9, 2019 at 10:15 am #1098964wekhter
Hi, I was experiencing a strange issue when trying to customize my shop archive pages with Beaver Themer (official beaver builder plugin). When investigating where the issue was coming from, I realized that it happened whenever the GP Premium WooCommerce module was active.
Background info: Beaver Themer is an official add-on for Beaver Builder that lets you customize certain things that are normally restricted to theme template files. It has targeting rules similar to GP Premium Elements, but includes a visual interface and can target & customize the actual layouts of things like archive pages/search results.
Issue: While the GP Premium WooCommerce module is active, WooCommerce post archive modules end up losing a closing /div tag. This means that any elements added after a post archive are no longer editable/selectable in the builder interface, since they confuse the editor into thinking that those modules are part of the post archive module. Deactivating GP Premium WooCommerce module lets modules inserted after post archives to be editable again.
It seems like the archive customization options in GP Premium WooCommerce module is altering the archive in such a way that it’s going to Beaver Themer with either an additional opening tag somewhere, or missing an ending tag. Help appreciated!
December 9, 2019 at 12:59 pm #1099136DavidStaffCustomer SupportHi there,
are you able to share a link to an archive page with Beaver Themer and the GPP Woo module enabled so we can see if theres anything odd with the front end markup that may explain the issue.
December 9, 2019 at 2:21 pm #1099205wekhter@David Here’s a link: https://gozen.com/shop/
Also I wrote the issue slightly backwards in my first post, it’s not that there’s a missing closing /div tag, it’s that there’s an extra closing /div tag so modules after the archive posts aren’t nested properly. I was trying to be as specific as possible and got my explanation mixed up, oops!
The following screenshot shows that after each fl-module-post-grid (the post archive module), the next module moves up a level. Every single one of these modules is supposed to be contained within fl-col-content.
December 9, 2019 at 8:02 pm #1099395TomLead DeveloperLead DeveloperHi there,
The GPP WooCommerce module does add an opening div (
<div id="wc-column-container">
) and a closing</div>
later on to close it.Does the
wc-column-container
element exist on the page?December 10, 2019 at 6:26 am #1099764wekhter@Tom No, it does not (just did a ctrl+f in the source code)
December 10, 2019 at 5:30 pm #1100441TomLead DeveloperLead DeveloperHmm, so something in Beaver Themer is removing that element for some reason.
Is it possible to ask their support team if a hook like this would be removed when using themer?:
add_action( 'woocommerce_before_shop_loop', 'generatepress_wc_before_shop_loop' );
That function adds the opening div element.
Then we close the element with this (which I assume is still active on the page, causing this issue):
add_action( 'woocommerce_after_shop_loop', 'generatepress_wc_after_shop_loop' );
Perhaps they’re doing something with the
woocommerce_before_shop_loop
hook?December 12, 2019 at 12:58 pm #1102556wekhterThey gave this answer:
add_action( 'template_redirect', function(){ if ( FLBuilderModel::is_builder_active() ) { remove_action( 'woocommerce_before_shop_loop', 'generatepress_wc_before_shop_loop' ); remove_action( 'woocommerce_after_shop_loop', 'generatepress_wc_after_shop_loop' ); } });
Which just removes GP’s action when the builder is open. Not ideal since it still leaves the malformed divs on the site itself, but at least lets the pages be edited.
December 12, 2019 at 4:51 pm #1102717TomLead DeveloperLead DeveloperWhat’s strange is the first action is being removed by default it seems. I wonder if that solution would do the same thing with only the second
remove_action
?April 2, 2020 at 11:59 am #1223996markusAlso had this issue. This is working for me:
Create a page redirect from the assigned WooComm
shop
page to a page I can edit in my page builder (shop-editable
)i.e. redirect
/shop
to/shop-editable
April 2, 2020 at 12:02 pm #1224002LeoStaffCustomer SupportThanks for sharing 🙂
June 23, 2022 at 8:32 pm #2262846JamesHi Guys so is there a solution for this?
I would like to enable woocommerce module to control colours, but not so that it breaks my Beaver Builder Product Category Archive Layouts?
I don’t want to create a redirect of the shop page if possible.June 24, 2022 at 4:17 am #2263095DavidStaffCustomer SupportHi there,
unfortunately the OP didn’t reply to Toms last reply. What Tom was suggesting was this:
add_action( 'template_redirect', function(){ if ( FLBuilderModel::is_builder_active() ) { remove_action( 'woocommerce_after_shop_loop', 'generatepress_wc_after_shop_loop' ); } });
Which, if the issue you have is the same as the OPs, would remove the orphaned closing
</div>
June 26, 2022 at 7:12 pm #2265264JamesThanks David
I tried that fix but the issue is only half fixed…
The bit that fixed:
The product archive no longer tries to show the default display filters from woocommerceThe bit that didn’t fix:
When Generate press Woocommerce module is active, product archive layout in beaver breaks. Specifically my four columns content grid becomes a 2 column layout with large images not aligned…June 27, 2022 at 3:22 am #2265565DavidStaffCustomer SupportCan you raise a new topic where you can share a link to your site and where i can see the broken columns ?
-
AuthorPosts
- You must be logged in to reply to this topic.