25 or more images breaks layout builder media upload.

Created on 29 June 2023, 12 months ago

25 or more images breaks layout builder media upload.

This is using a clean install of 10.0.x-dev or alpha version--everything is selected at the time of web install (except internationalization). Tested on 2 different Centos 7 servers. PHP 8.1

Steps to reproduce

1. Add 25 or more images using any media upload method (e.g. admin/content/media, or directly inside layout builder)

2. Edit varbase home layout (or any layout builder node) --> add block --> create content block --> select whatever --> try uploading an image (it doesn't matter how).

3. No modal (popup or anything), except an error at the top of page "Oops, something went wrong. Check your browser's developer console for more details.

In chrome dev console we get:

Failed to load resource: the server responded with a status of 500 () /layout_builder/add/block/overrides/node.3/1/blb_region_col_1/inline_block%3Avarbase_featured_card_block?_wrapper_format=drupal_dialog&ajax_form=1&_wrapper_format=drupal_ajax:1

If you open this, you'll get a false positive saying you exceeded the maximum fie size (it's definitely not this)...

"[{"command":"add_js","selector":"body","data":[{"src":"\/core\/assets\/vendor\/once\/once.min.js?v=1.0.1"},{"src":"\/themes\/contrib\/gin\/dist\/js\/messages.js?rwzlne"}]},{"command":"insert","method":"prepend","selector":null,"data":"\n\u003Cdiv data-drupal-messages class=\u0022messages-list\u0022\u003E\n \u003Cdiv class=\u0022messages__wrapper\u0022\u003E\n \n \u003Cdiv role=\u0022contentinfo\u0022 aria-labelledby=\u0022message-error-title\u0022 class=\u0022messages-list__item messages messages--error\u0022\u003E\n \u003Cdiv role=\u0022alert\u0022\u003E\n \u003Cdiv class=\u0022messages__header\u0022\u003E\n \u003Ch2 id=\u0022message-error-title\u0022 class=\u0022messages__title\u0022\u003E\n Error message\n \u003C\/h2\u003E\n \u003C\/div\u003E\n \u003Cbutton type=\u0022button\u0022 class=\u0022button button--dismiss\u0022 title=\u0022Dismiss\u0022\u003E\u003Cspan class=\u0022icon-close\u0022\u003E\u003C\/span\u003EClose\u003C\/button\u003E\n \u003Cdiv class=\u0022messages__content\u0022\u003E\n An unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (1 GB) that this server supports.\n \u003C\/div\u003E\n \u003C\/div\u003E\n \u003C\/div\u003E\n \u003C\/div\u003E\n\u003C\/div\u003E\n","settings":null}]"

Now... the hilarious part is, if you take away 1 image, and have 24 or less total media images, everything works as expected...

Proposed resolution

The workaround is to go to each "block type" --> Manage form display --> field_image : and select anything BUT "Media library".

Then media uploads inside layout builder nodes will work as expected...

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
  • ❌ 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 update type

  • βœ… No Update
  • βž– Optional Update
  • βž– Forced Update
  • βž– Forced Update if Unchanged

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • N/A
πŸ› Bug report
Status

Active

Version

10.1

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States duntuk

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

Comments & Activities

Production build 0.69.0 2024