-
AuthorPosts
-
July 17, 2019 at 3:12 pm #1119603
Hi there
We’re noticing an issue with compatibility between the Enfold theme Avia Layout Builder and plugin Popup Maker.
We recently updated the website and the code in functions.php below no longer executes.
// Add Avia Builder to Popup Maker function avf_alb_supported_post_types_mod( array $supported_post_types ) { $supported_post_types[] = "popup"; return $supported_post_types; } add_filter('avf_alb_supported_post_types', 'avf_alb_supported_post_types_mod', 10, 1);
WordPress 5.2.1
Popup Maker 1.8.6
*^ Works*Upgrading to WP 5.2.2
Popup Maker 1.8.10
broke the functionality
(renders nothing, blank)Below is the response from the plugin creator in terms of compatibility.
“We did change a few things between those versions, but it indicates that they are likely doing something in an unconventional way or one that simply wasn’t considering shortcodes being processed in the head.
If they are echoing or printing inside the shortcodes and expecting it to render immediately it won’t. But according to WP shortcodes should never do anything but return a string, never echo/print, so we can’t account for that, they’d need to correct it.
If they are not registering their shortcodes until after init they may not get rendered properly. Again WP says they should be registered immediately, not late, since plugins get loaded before init, and we process shortcodes in wp_head which comes after init, as long as they are done by then it won’t be an issue, if this is the problem they just need to adjust when they register their shortcodes.
Otherwise let them know this is how we handle it, see what they think may be going wrong.
1. In wp_head before wp_enqueue_scripts we process all popups that are targeted to the page being loaded.
2. Process all loaded popups content through do_shortcode, storing it for rendering.
– We capture the output if anything is echoed since we are in the head we can’t allow that to happen or it will generally break peoples sites from incorrectly created shortcodes.
3. In wp_footer we render the popups using the content processed in the head.”It looks like Enfold may need to coordinate and cooperate with popular plugin makers to ensure compatibility with plugins like this one in a future update.
Please advise, appreciate it.
July 21, 2019 at 9:10 pm #1120699Hi,
Which version of Enfold are you using? I attached the latest beta version of the theme in private content field. Could you please update the theme on your staging site and check if that helps?
Regards,
YigitJuly 22, 2019 at 3:20 pm #1120867Thanks, Yigit.
We have version 4.5.6 of Enfold.
Do you think this will solve the issue with Popup Maker not rendering content from the layout builder on the page?
July 23, 2019 at 9:58 pm #1121263Hi,
You need to try it, and let us know for the results :)
Best regards,
BasilisJuly 24, 2019 at 12:00 am #1121333No, unfortunately, the beta theme did not fix anything.
In fact, it caused more issues than expected:
– Popup Maker modal did not activate at ALL this time, instead of activating and showing blank content
– Other advanced CSS classes were eliminated or overwritten so text styling and tables were visually offBelow is what I mean regarding the second point in functions.php:
// Custom CSS for Advanced Layout Builder Elements add_theme_support('avia_template_builder_custom_css');
I think the above are possibly related.
Am I missing something?
Looks like there are still issues to sort out so that when you push your next theme version you don’t get any major conflicts.
- This reply was modified 5 years, 5 months ago by endregan.
July 24, 2019 at 2:33 pm #1121549OK, so the BETA handles the custom CSS classes a little differently. I activated this by adding “show and allow to edit classes”.
Popup Maker still does not work, not loading any of the avia visual builder elements – showing blank.
It’s just not executing for some reason.
The creator of the plugin was trying to jump in here but he needs a license to join in
Is there any way you can invite him or coordinate to get this resolved?
(Email address hidden if logged out)
Thanks
July 24, 2019 at 9:19 pm #1121742Hi,
Unfortunately there is no way, but if he provides a patch fix, we will be happy to find a way to include it.
Best regards,
BasilisJuly 24, 2019 at 9:54 pm #1121756All right well I’ve done everything I can on my end.
I dunno why you guys can’t coordinate at all so right now it’s just kind of a shrug and leave it up in the air?
Disappointing to say the least.
July 29, 2019 at 8:33 pm #1122906Hi,
Sorry for this, but unfortunately we cant cordinate with any plugin author, just to build compatibility with everything.
Most of the times plugin authord make sure they work with one of the top themes out there.Best regards,
BasilisAugust 28, 2019 at 10:53 pm #1131759// Add Avia Builder to Popup Maker function avf_alb_supported_post_types_mod( array $supported_post_types ) { $supported_post_types[] = "popup"; return $supported_post_types; } add_filter('avf_alb_supported_post_types', 'avf_alb_supported_post_types_mod', 10, 1);
This code made the advanced layout editor button appear when editing the popup, but then it does not work, the popup is empty also if i build a layout.
I tried also with this older code that i found here on the forums:`function add_builder_to_posttype($metabox)
{
foreach($metabox as &$meta)
{
if($meta[‘id’] == ‘avia_builder’ || $meta[‘id’] == ‘layout’)
{
$meta[‘page’][] = ‘popup’; /*Using ‘ as quotes*/
}
}return $metabox;
}But this does nothing.. does not even show the blue advanced editor button
So? What should we do?
September 3, 2019 at 5:04 am #1133191Hi,
@Leofiori: Can we access the site? Please open your own thread and post the necessary details in the private field. We’ll check the issue there.Best regards,
IsmaelApril 5, 2020 at 10:15 pm #1201015Has this issue been solved? Because I still encoutnter the same problem with Popup Maker the short code rom Avia does not get executed.
April 7, 2020 at 3:47 am #1201427Hi Glenn,
Please open a new thread and include WordPress admin login details in private so that we can have a closer look at your site.
Best regards,
RikardJanuary 20, 2021 at 10:53 pm #1274235Unfortunately this not solved. Even the Popupmaker isn´t rendering content of the popup.
/* Layouteditor for CPT´s - CPT UI auch Layouteditor verwenden **************************************************************************** Enfold - CPT UI */ function avf_alb_supported_post_types_mod( array $supported_post_types ) { $supported_post_types[] = 'theor_grundlagen'; $supported_post_types[] = 'grundlagen_planung'; $supported_post_types[] = 'orientierungsplan'; return $supported_post_types; } add_filter('avf_alb_supported_post_types', 'avf_alb_supported_post_types_mod', 10, 1);
but not for the posttype : popup
January 20, 2021 at 11:03 pm #1274238here you are — this is working: https://kriesi.at/support/topic/popup-maker-and-enfold-avia-layour-builder/
January 21, 2021 at 3:38 pm #1274392Hi Rafíyel,
We’re happy to hear that you found a working solution.
Let us know if you need further assistance.Best regards,
Nikko -
AuthorPosts
- You must be logged in to reply to this topic.