Open rupertj opened 2 hours ago
Are there any JS errors in the console? It was working for me, though either I happened to do it in the right order, or I've forgotten to commit a file!
Yes there are!
ResponseText: The website encountered an unexpected error. Try again later.Drupal\Component\Plugin\Exception\PluginNotFoundException: The "container" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 142 of core/lib/Drupal/Core/Entity/EntityTypeManager.php). Drupal\finders\Element\EntityBundles::processEntityBundles() call_user_func_array() (Line: 1006)
The "container" entity type does not exist
That sounds like the top-level form element in the custom form element plugin is somehow getting picked up as the value for the entity type.
Can you debug around line 100 of EntityBundles? $selected_entity_type_id is getting set to the wrong thing -- almost certainly because I frankencoded this class from Action Link module....
$selected_entity_type_id is getting set to 'container' on line 100, which is the case where it's not including 'container' in the element parents.
The chosen entity_type_is is in the formState's values at: $form_state->values["entries"]["container"]["entity_type_id"];
Thanks!
I know what's gone wrong -- in Action Link I added the method that gets the value for a form element, in an attempt to remove the 'container' nesting from the values -- which doesn't quite work. Without that, there's never a case when it's not nested like that. You can remove that clause completely.
Create a new Finder entity.
Choose the channel bundle entity type. Channel bundle content type does not appear.
If you choose the entry bundle entity type, then change the channel bundle entity type to something else, then back to Content, the Channel bundle content field does appear.