XB editor controller does not render libraries placed into the footer

Created on 26 August 2025, 2 days ago

Overview

\Drupal\experience_builder\Controller\ExperienceBuilderController::HTML doesn't have a placeholder for JS assets placed in the footer

Proposed resolution

Add <js-bottom-placeholder token="{{ placeholder_token }}"> before </body>

User interface changes

πŸ› Bug report
Status

Active

Version

1.0

Component

… to be triaged

Created by

πŸ‡ΊπŸ‡ΈUnited States mglaman WI, USA

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

Comments & Activities

  • Issue created by @mglaman
  • πŸ‡ΊπŸ‡ΈUnited States effulgentsia

    Within the preview/canvas iframe, global assets are rendered via drupalSettings.xb.globalAssets, which includes jsFooter. Can you clarify steps to reproduce the bug you're seeing?

  • πŸ‡ΊπŸ‡ΈUnited States mglaman WI, USA

    We're adding extra libraries to the editor using KernelEvents::RESPONSE => ['onRespond', 50] for $route_name === 'entity.xb_page.edit_form' || $route_name === 'experience_builder.experience_builder' and:

            $response->addAttachments([
              'library' => [
                'module/our-library',
              ],
            ]);
    
  • πŸ‡ΊπŸ‡ΈUnited States mglaman WI, USA
Production build 0.71.5 2024