Media can only be upload when Claro is the admin theme

Created on 10 July 2025, 16 days ago

Overview

- Set Stark or Olivero as the default and admin theme
- Add a media item in XB e.g. through the image component
- The "Alternative text" box is unable to be written in (though it isn't disabled) and so the image cannot be saved

there is currently a workaround in the tests for this here: https://git.drupalcode.org/project/experience_builder/-/blob/0.x/tests/s...

Proposed resolution

User interface changes

πŸ› Bug report
Status

Active

Version

0.0

Component

… to be triaged

Created by

πŸ‡¬πŸ‡§United Kingdom justafish London, UK

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

Comments & Activities

  • Issue created by @justafish
  • πŸ‡¬πŸ‡§United Kingdom justafish London, UK
  • πŸ‡¬πŸ‡§United Kingdom justafish London, UK

    This actually also happens when you don't have media installed and with Claro enabled πŸ€”

    (double field bug filed at https://www.drupal.org/project/experience_builder/issues/3535220 πŸ› Two upload fields are shown when Media isn't enabled Active )

  • πŸ‡¬πŸ‡§United Kingdom justafish London, UK
  • πŸ‡ΊπŸ‡ΈUnited States bnjmnm Ann Arbor, MI

    This is a duplicate (or perhaps could be called a subset) of πŸ“Œ Support Image Widget fully in page data form Active . That said, every issue I've closed recently that doesn't include a merge gets reopened so I'll leave the possible official closing to those with a better macro perspective on the project.

    Details
    For an input to be React-controlled, it needs to have the 'data-form-id' attribute, which is added recursively to everything in the form array in \Drupal\experience_builder\Hook\ModuleHooks::formAlter

    However, inputs such as alt are not part of this array, as they are added later in a #process callback. This may be a simple as running FormIdPreRender::addAjaxAttribute at a later stage in the render process.

  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    Is this when applying the recipes? Because since ✨ Add automated image optimization to image component Active the recipes no longer enable xb_stark - I wonder if that's related?

    We fixed the attribute addition in ✨ Add a Video prop type to the Code Component editor Active - so this might be solved - can you retest and advise?

  • πŸ‡ΊπŸ‡ΈUnited States bnjmnm Ann Arbor, MI

    Is this when applying the recipes? Because since #3515646: Add automated generation the recipes no longer enable xb_stark - I wonder if that's related?

    We fixed the attribute addition in #3534601: Add a Video prop type to the Code Component editor; requires adding `file` as default `StaticPropSource`, `FileWidget` support and various infrastructure improvements - so this might be solved - can you retest and advise?

    I have a working fix in πŸ“Œ Support Image Widget fully in page data form Active , which is not specific to recipes. Rather, any element that is added via a #process callback does not get run through FormIdPreRender::addAjaxAttribute and as a result does not have the form-identifying attribute needed for the inputs to get an onChange listener added. Without that, they can't receive input.

  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    Rather, any element that is added via a #process callback does not get run through FormIdPreRender::addAjaxAttribute and as a result does not have the form-identifying attribute

    Yes, @effulgentsia pointed me towards that when I had a similar issue in ✨ Add a Video prop type to the Code Component editor Active - the same issue was occurring with the generic file widget. A form of that went in with that issue, so this may be resolved now.

  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    Per #8, let's ask Mayur or Neha to manually test this πŸ™

Production build 0.71.5 2024