Emit doesn't work properly when using layout builder display

Created on 21 February 2020, about 5 years ago
Updated 8 February 2025, about 2 months ago

Problem/Motivation

I'm using a radioactivity field on a content type that's using Layout Builder β†’ (see field settings in attached screenshot).

When the page is viewed, drupalSettings.ra_emit_0 does not exist, but drupalSettings.ra_emit_1 does exists.

In radioactivity/js/triggers.js, it is assumed that drupalSettings.ra_emit_0 will always exist before any other incremental variations. If drupalSettings.ra_emit_0 doesn't exist, like in my case, emit data doesn't get pushed into the emits array, and never gets posted via ajax.

I've confirmed that the emitter works properly when Layout Builder is turned off for the content type.

πŸ› Bug report
Status

Needs work

Version

4.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States derekawalker

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024