Problem/Motivation

Steps to reproduce

Given a Landing Page was configured to work with the Varbase Layout Builder
And a Block type has a media reference field in it to assign a media
And a the field widget is using the media library widget
When the user click on "Add block" in a section
And choose to Create a new inline block
And choose the block with media reference in it
Then the modal block will open
When the user click "Add media"
Then the "Add or select media" media library will open
When the user click or filter for media items
Then some AJAX + 414 errors
And the look of the pager is not styled in the right way.

Proposed resolution

Remaining tasks

  • ✅ File an issue about this project
  • ✅ Addition/Change/Update/Fix to this project
  • ✅ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support on feature change/addition
  • ➖ User Guide Documentation support on feature change/addition
  • ✅ UX/UI designer responsibilities
  • ✅ Accessibility and Readability
  • ✅ Code review from 1 Varbase core team member
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Update Release Notes and Update Helper on new feature change/addition
  • ✅ Release varbase-9.0.17, varbase_media-9.0.35, varbase-10.0.0-rc1, varbase_media-10.0.0-beta8

Varbase update type

  • ✅ No Update
  • ➖ Optional Update
  • ➖ Forced Update
  • ➖ Forced Update if Unchanged

User interface changes

After the fix:

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • Issue #3401833 by Ahmad Abbad: Fixed pager behavior and style in Media Library widget with or without AJAX issues in deep level 4 or 5 AJAxing

Comments

Ahmad Abbad created an issue. See original summary.

rajab natshah’s picture

Title: Fix pager in media library widget » Fix pager in Media Library widget from mini pager to full pager with or without AJAX issues in deep level 4 or 5 AJAxing
Issue summary: View changes
StatusFileSize
new711.17 KB
rajab natshah’s picture

Find out that the issue is in Drupal 10 + Layout Builder + Media Library + Block Type with media entity reference

It is a styling issues with AJAX issue on the front-end theme
the default from drupal is not switching to back-end theme or the AJAXing level

rajab natshah’s picture

Title: Fix pager in Media Library widget from mini pager to full pager with or without AJAX issues in deep level 4 or 5 AJAxing » Fix pager behavior and style in Media Library widget with or without AJAX issues in deep level 4 or 5 AJAxing
  • Keeping the default AJAX to yes from Drupal Core default config for the Media Library view.
  • Keeping the pager config to mini pager
  • Only deep AJAX fixes
  • Front-End fixes of styling over the Media Library widget dialog.
rajab natshah’s picture

It feels that it is the right time to switch to use something like Layout Builder iFrame Modal
Not to keep fixing issues for every project.

Maybe this module should be working in Drupal Core out of the box.
Maybe having part of the logic, not all the logic - only the part for Media Library under the Layout Builder

  • Rajab Natshah committed 5496a450 on 10.0.x
    Issue #3401833: Fix pager behavior and style in Media Library widget...

  • Rajab Natshah committed f1b43c0f on 10.0.x
    Issue #3401833: Fix pager behavior and style in Media Library widget...

  • Rajab Natshah committed 58acc7f0 on 9.0.x
    Issue #3401833: Fix pager behavior and style in Media Library widget...
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
Status: Active » Needs review
Issue tags: +varbase-9.0.17, +varbase_media-9.0.35, +varbase-10.0.0-rc1, +varbase_media-10.0.0-beta8
rajab natshah’s picture

Issue summary: View changes
Status: Needs review » Fixed
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

rajab natshah’s picture

Issue summary: View changes

✅ Released varbase-9.0.17

rajab natshah’s picture

Issue summary: View changes

✅ Released varbase-10.0.0-rc1