BUG - V4.* - Currency flags are displayed in the Layout Editor but missing in Preview and Players

Hello,

I noticed an issue with the native Currency module templates.

The currency flags are displayed correctly inside the Layout Editor. However, they are not displayed in the Layout Preview or on the Player.

The issue also occurs with the original Xibo Currency module and the native currency_logo element, so it does not appear to be related to a custom data provider.

Steps to reproduce

  1. Add the native Currencies widget to a layout.

  2. Use currencies such as USD, EUR and GBP.

  3. Apply an element-group template that includes the native Currency Logo element, such as Currency - Group 2.

  4. Confirm that the flags appear correctly in the Layout Editor.

  5. Open the Layout Preview or publish the layout to a Player.

Expected result

The flags should be displayed in the Preview and on the Player, matching the Layout Editor.

Actual result

The currency names and values are displayed correctly, but the flags are missing.

Additional findings

The Preview HTML includes the native assets correctly:

<link rel="stylesheet" media="screen" href="/module/asset/flagsCSS?preview=1">

The sprite is also loaded correctly:

<img src="/module/asset/flags?preview=1"
     class="flag-icon flag-icon-{{url}}">

The generated Handlebars template also contains:

data-extends-override="url"
data-extends-with="data.NameShort"

The sprite file /modules/assets/currency/flags.webp is accessible and the CSS rules for classes such as .flag-icon-USD, .flag-icon-EUR and .flag-icon-GBP are present.

The Player console confirms that the elements are parsed and rendered:

Called onElementParseData for element > element_currency_logo_...
Called onTemplateRender for element > element_currency_logo_...
<<<END>>> of renderDataElements for widget

The issue appears to be related to the rendering or clipping of the native flag sprite in Preview and Player environments.

Environment

  • Xibo CMS: <4.2.*

  • Affected environments:

    • Layout Preview

    • Player

  • Working environment:

    • Layout Editor

I can provide screenshots and the generated Preview HTML if needed.

tested on beta CMS as well: Xibo Digital Signage

Layout editor OK:

Preview and player render flag problem it’s the same:

Thank you, I have passed onto our dev team for further investigation.

Just correcting a misunderstanding:
The bug is in the stencils (elements), not in the static templates.