Skip to content

Fix: Flip Box and Slide Box show dummy text when description is cleared using BB Lite #282

Description

@dhruvlmao

Summary

When using BB Lite, clearing the description field in either the Flip Box or Slide Box module and saving/publishing causes the dummy placeholder text to appear on the frontend instead of nothing.

Root Cause

Beaver Builder Lite does not persist an empty string when an editor field is cleared. It falls back to the field's registered default value. The current rendering check in frontend.php for both modules is:

```php
if ( '' !== $settings->desc_front ) {
```

This only guards against a true empty string ''. When BB Lite saves a cleared editor field, it may save <p></p> or <p><br></p> rather than a true empty string, or it reverts to the default Lorem Ipsum text entirely. Either way, the check passes and the dummy text renders on the live page.

This issue does not reproduce with BB Pro, which correctly persists empty editor values.

Fix

Replace the empty string check with trim( wp_strip_all_tags() ) in the frontend.php of both affected modules. This strips all HTML tags and whitespace before the check, so <p></p>, <p><br></p>, and similar empty HTML structures are treated as empty and not rendered. Real content — including the Lorem Ipsum placeholder on freshly added modules — continues to render correctly.

Files changed:

  • modules/flip-box/includes/frontend.phpdesc_front and desc_back checks
  • modules/slide-box/includes/frontend.phpdesc_front and desc_back checks

Diff:
```diff

  • if ( '' !== $settings->desc_front ) {
  • if ( '' !== trim( wp_strip_all_tags( $settings->desc_front ) ) ) {
    ```
    (same change applied to desc_back in both modules)

Steps to Reproduce

  1. Install BB Lite + UABB Lite (no other plugins, default theme)
  2. Add a Flip Box or Slide Box module to a page
  3. Clear the description field completely
  4. Save and publish
  5. Visit the live page — Lorem Ipsum dummy text appears

Expected Behaviour

No description rendered when the field is empty.

Environment

  • UABB Lite: 1.6.10
  • BB Lite: 2.10.1.5
  • WordPress: latest
  • PHP: 8.x

Related support ticket: #1467956

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions