Hello!
When creating a field based on the Block Field Type and a different value have been selected 3 times (with both the list and radio widget) then the "class" of #entity_builders will get replaced with a string e.g. revision_information.
How to reproduce:
- Install a standard Drupal Installation.
- Add a single value Block field to a content type.
- Create a new node and select 3 different blocks on the same single value field.
- Submit the node.
If you have set the error level to verbose (you can also find it in the logs and under the PHP type) then should see a message similar to the following:
Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'xxx' not found i Drupal\Core\Entity\EntityForm->buildEntity() (line 297 on /var/www/web/core/lib/Drupal/Core/Entity/EntityForm.php).
I think it can be resolved by forcing ajax requests to rebuild the form (even though I believe you're already trying to enforce this). If the form hits the rebuildForm method in FormBuilder::processForm then the entity builders seems to be correct.
Comments
Comment #2
kallehauge commentedComment #3
xanoThanks for reporting this!
With regards to step 2, are we talking about a configurable field (created through the UI) or a base field (defined on the entity type's class itself)?
About step 3: how do we add three values to a single-value field?
Comment #4
kallehauge commentedHi Xano!
2: We're talking about a configurable block field, created through the UI :) - (Go to a content type and add a new field and select the "block" field type - like you can select long text, number, etc).
3: In my case it was a dropdown that I changed the value of. So it's not 3 simultaneous selections but a single value that have been changed multiple times
/ Kallehauge
Comment #5
xanoI was unable to immediately reproduce this problem locally. Can you write down for us how to reproduce this problem into as much detail as you can? We need information about how to set up the environment (less dependencies is better) using a clean Drupal installation, and highly specific instructions for reproducing the problem once all dependencies have been installed. This means we need specific versions or commit hashes, and instructions need to assume the reader is an unfamiliar with any of this, so even the smallest and obvious steps will need to be included.