• Hi. I’m the author of a WP Full Picture plugin. One of the users of my plugin has reported that he is having issues with theme customizer, so I went to investigate.

    After a few hours of testing I finally found that OceanWP changes how the theme customzier loads controls. When using any other theme, Customizer loads all the fields and hides (with CSS) those which are hidden but shown under some conditions.

    When OceanWP is activated, the customizer does not load these fields to HTML at all and only adds them to the DOM when they should be shown. Unfortunately, this does not work for WP Full Picture.

    My question is, are you planning to revert this change in the future (and when)?

    My plugin is one of many that uses the customizer and I am sure that many more get broken because OceanWP changes how WordPress theme customizer functions.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Krzysztof Planeta

    (@chrisplaneta)

    Oh. And I forgot to mention that I also found a bug in your modification. If the first control in a section is set to be hidden with “active_callback” (return false;) then all the fields in this section are also hidden. And when this happens WordPress does not show the link to the section.

    Hello @chrisplaneta,

    Thanks for reaching out.

    This is indeed an odd issue and has never been reported before with any other plugin utilizing the Customizer, like WooCommerce, EDD, etc. However, the issue with your plugin is indeed there, as tested per report on your plugin support page.

    We’re already testing the dev version and will keep you in the loop.

    Kind Regards

    Thread Starter Krzysztof Planeta

    (@chrisplaneta)

    Hi Shahin

    Thank you very much. Just to give you some more info, my plugin WP Full Picture uses customizer to display settings for consent banner. However, the banner has quite a few conditionally shown fields, which are shown depending on the choices in other fields. Obviously, when these fields don’t load, the script breaks.

    Hi @chrisplaneta,

    Hope all is well on your end.

    Just wanted to correct you on one thing: we don’t change the core customizer / WP behavior. For dynamic sections (and options) display we use the active_callback method: https://developer.www.ads-software.com/reference/classes/wp_customize_control/active_callback/

    Further more, we apply that method to our own options alone ??

    However, there was a problem with your plugin but it relates to something else entirely. I wanted to inform you that we have released a new OceanWP version today which addresses the issue. Although we did our own tests, we would still appreciate if you give it a spin just in case and let us know if you notice anything else.

    You can inform us here or reaching out to us through our website.

    Really appreciate your heads up on this and the time you invested in this matter.

    Wishing you great success with your plugin.

    Have a great day

    Thread Starter Krzysztof Planeta

    (@chrisplaneta)

    Hi Marko.

    Thank you for the reply and trying to fix the issue. Nevertheless, I still experience some problems (although one has been fiexed). Let me explain.

    First, saving consent banner fields in the customizer now works. This is a good thing ??

    However, when I open the “Consent Banner” section in the customizer, I see 2 subsections, and not 4.

    There are 2 sections missing “Layout & Behaviour” and “Styling”.

    They don’t show up because the issue with the “active_callback” is still there. For testing purposes I changed the order of fields in my plugin so that the ones that are not hidden will come first, and the section showed up.

    But this is still not the end. Because even when the fields show up, they are unusable.

    When I check the HTML of the customizer controls and sections in any other theme, all the fields of WP Full Picture are in the HTML. Only when I use OceanWP they are not there and are added dynamically only when I open the section with the fields. Unfortunately, WP FP needs to have all the fields in HTML from the start, because depending on their state, its JS hides or displays other fields.

    If you want, I can record a video about all these issues. It may help you visualise it better.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Theme customizer options break’ is closed to new replies.