Problem/Motivation

The remote-video formatter applies the token-browser theme to its wrapper, losing the replacement-pattern section and its visibility rules. The entity token category can also be missing, and conditional settings do not work correctly in Views.

Steps to reproduce

  1. Enable GLightbox Media Video and Token.
  2. On a remote-video media type's Manage display page, select GLightbox Media Remote Video for the video URL field and open its settings.
  3. Select Custom (with tokens) for gallery, caption or caption description. Check the replacement-pattern section and browse the available tokens.
  4. Repeat in a View using the media video URL field. Switch between custom and non-custom options and check which controls remain visible.

Proposed resolution

Render the token link inside a details element, obtain the entity type from the field definition, and correct the visibility selectors and caption/description OR condition.

The equivalent fix for the main GLightbox module is #3628614.

Local testing

Browser checks on Drupal 11.4.8 pass using display and Views-style forms: the token dialog includes Media tokens, and gallery, caption and description-only visibility work.

Remaining tasks

Review MR (testing in the administration forms) then merge MR.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

nick hope created an issue. See original summary.

nick hope’s picture

Assigned: nick hope » Unassigned
Issue summary: View changes
Status: Needs work » Needs review
nick hope’s picture

levmyshkin’s picture

I need to check it for images inside Media, Media inside Paragraph, Paragraph in inside Paragraph and other variations.

levmyshkin’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

levmyshkin’s picture

Status: Fixed » Closed (fixed)