Rock Tech Bulletin

Your go-to source for key updates, alerts, and notes on Rock releases—covering features, fixes, and critical changes that may impact your system.

Alert v19.0

Changes to Lava Shortcode Variable Scoping

Rock v19 introduces a new Lava Shortcode setting that allows you to take control over how the variables defined within your custom shortcodes are scoped: whether they "leak" to the parent scope or remain isolated within the shortcode's inner Lava context.

The new setting is called Variable Scope Context and has the following options:

  1. Isolated: Keep variables contained within the shortcode, preventing them from affecting Lava outside of it.
  2. Shared: Allow variables defined in the shortcode to be accessible in the surrounding Lava after the shortcode runs.

Lava Shortcode Variable Scope Context Options

🚨 Because this is a new field stored in the database for the Lava Shortcode Entity, a default value of "Isolated" will be applied for all preexisting [LavaShortcode] records in your database upon upgrading to Rock v19.

You are highly encouraged to test and consider which of your custom shortcodes need to share their variables with their surrounding Lava and change them to "Shared" on an as-needed basis; this is entirely dependent on how you've crafted your custom shortcodes and their usages, so only you can make this determination.