Problem/Motivation
I have a block with a Chart type field. The block is used in the Layout Builder. When I use the block and add/edit the Chart field value (in the off-canvas of the Layout builder or in a modal if the Layout builder modal module is used), the "Categories are identified by" options do not switch the inputs' structure below. The first option, called "First column," is applied by default, its inputs are shown below -- this is ok. When I select the "First row" option, the inputs below still belong to the "First column" option, but they must be restructured with Ajax for the First row" option.
The issue exists only on the Layout builder page. It works fine in other parts of the site.
Steps to reproduce
1. Create a block for Layout builder. The block should have a Chart type field.
2. Add the block to a page via the Layout builder.
3. Change the column/row categories switcher (see screenshot).
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | block-title-is-required.png | 147.02 KB | serhii-che |
| #5 | claro-lb-vide2.mov | 9.96 MB | serhii-che |
| #5 | gin-lb-vid1.mov | 16.43 MB | serhii-che |
| #4 | Configure-block-Debug.mp4 | 254.08 KB | dkmishra |
| categories.png | 110.11 KB | serhii-che |
Comments
Comment #2
andileco commentedThanks for reporting! Do you see any errors in the database log or the browser console?
Also, it looks like you may be using a patch to the data collector table. If so, can you try without that patch as well?
Comment #3
serhii-che commentedThere are no patches applied to my Drupal 11.3.11 project. I checked the browser console, and it's empty. The DB log shows no errors/warnings. I also try to disable the LB additional features, like Gin Layout Builder, and switch to the classy theme for both admin and a regular user, but the issue is still there.
Let me know what other information I can provide to help identify the problem. Thanks
P.S. I noticed that the "Chart type (Bar, Column, etc)" radio buttons have the same issue.
Comment #4
dkmishra commentedHi @serhii-che, I checked the issue and was able to reproduce it successfully.
Environment details:
- Drupal 11.3.11
- Charts 5.2.0
- Theme: Olivero 11.3.11 (default theme)
- Administration theme: Claro
- PHP 8.3
I have also attached a video demonstrating the issue. Please let me know if there is any specific configuration I should check to help reproduce the issue more accurately.
Comment #5
serhii-che commentedHope the videos might be more helpful.
1) My current setup:
Drupal 11.3.11 (no patches).
PHP 8.4
Layout Builder Modal
Gin Layout Builder
Gin Toolbar
Gin theme (admin)
Custom Front-end theme.
See video: gin-lb-vid1.mov
2) Tested w/o the modules listed above:
Switched to Claro (admin and front-end theme).
See video: claro-lb-vid2.mov
Comment #6
andileco commented@dkmishra - your video shows the expected behavior.
@serhii-che - I tried on an existing site but didn't get that behavior (I will try on a clean set-up soon). In the meantime, can you look at your browser console and/or database log and post any messages here?
Comment #7
serhii-che commentedI have checked the console and DB logs, but unfortunately, the console is empty, and there are no logs related to the issue (no errors, no warnings). Let me know if you have an idea what can conflict with this module. I'll try to install it on a clean setup too (Drupal 11.3.11, PHP 8.4) and compare.
Comment #8
serhii-che commentedI have found the source of the issue: it's an empty block title field, which I did not fill in first. If it is empty, the Chart options do not react to changes.
Thank you for responding so quickly and encouraging me to take a closer look at the issue.
Comment #9
dkmishra commented@serhii-che, Thanks for looking into this and identifying the root cause. It's helpful to know that the issue occurs only when the block title field is left empty. I appreciate you sharing the findings on the issue.
Comment #10
andileco commentedThank you both! I'm going to mark completed, but please let me know if you feel like there's a bug going on, and I can re-open.