29.0.7: template design options in BeBuilder (popup Height) are not saved

Hi,


Since 29.0.7 a design option on a template is not saved when I change it in BeBuilder. It works in 29.0.5.


I tested on a clean local install with no plugins: WordPress 6.9.12, PHP 8.3, Betheme 29.0.7.


(1) Open a Popup template in BeBuilder.

(2) Click the gear icon, and under Popup options > Design type 400px in Height.

(3) Click Update and reload the builder.


Height is empty again after the reload, and nothing is stored for it. A setting in the same panel that is not a design field does save: I set Position to Top Left in the same visit and it was kept.


I then put 29.0.5 on the same install and did the same thing with a new popup template. Height was still 400px after the reload.


On 29.0.7, with WP_DEBUG on, the PHP log got this warning when I changed the field:


wp_strip_all_tags expects parameter #1 ($text) to be a string, array given


So I looked at mfnvb_savepostoption() in visual-builder/visual-builder.php. In 29.0.7, line 1656 runs wp_strip_all_tags($value) on every value. For this field the builder sends an array (selector, style, val), so it comes back as an empty string and line 1665 has nothing left to save. 29.0.5 does not have that line. From the code it also looks like the empty value then goes to delete_post_meta, so changing a field could remove a value that was saved before the update. I have not tested that part.


I only tested the popup Height field. From the code I would expect the other popup and side menu design fields that are saved the same way to be affected too, but I have not tried them.


Could you take a look?


Thank you.

Comments

Sign In or Register to comment.
This website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Cookies are small text files that can be used by websites to make a user's experience more efficient.

The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website.

Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your consent.