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

Comments

serhii-che created an issue. See original summary.

andileco’s picture

Thanks 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?

serhii-che’s picture

There 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.

dkmishra’s picture

StatusFileSize
new254.08 KB

Hi @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.

serhii-che’s picture

StatusFileSize
new16.43 MB
new9.96 MB

Hope 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

andileco’s picture

@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?

serhii-che’s picture

I 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.

serhii-che’s picture

StatusFileSize
new147.02 KB

I 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.

dkmishra’s picture

@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.

andileco’s picture

Category: Bug report » Support request
Status: Active » Closed (works as designed)

Thank 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.

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.