Only with the bootstrap theme do I get this error.

Steps to Reproduce:

Set Bootstrap as theme,
Remove Seven as Admin theme.
Make sure that content is NOT using Admin theme
Create a content type that has an entity reference to a taxonomy term.
Make sure you have at least one term in the vocabulary you set up in the reference.
create content setting the value of the entity reference

User error: "value" is an invalid render array key in Drupal\Core\Render\Element::children() (line 102 of core/lib/Drupal/Core/Render/Element.php).
Drupal\Core\Render\Element::children(Array, 1)
Drupal\Core\Render\Renderer->doRender(Array, )
Drupal\Core\Render\Renderer->render(Array)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1)
__TwigTemplate_5405c9a27e0f62ca5cca2def0872135aeaa867e3a2baa56693fb7a90a30b9b11->doDisplay(Array, Array)
Twig_Template->displayWithErrorHandling(Array, Array)
Twig_Template->display(Array)
Twig_Template->render(Array)
twig_render_template('themes/contrib/bootstrap/templates/input/textarea.html.twig', Array)
Drupal\Core\Theme\ThemeManager->render('textarea', Array)
Drupal\Core\Render\Renderer->doRender(Array)
Drupal\Core\Render\Renderer->doRender(Array, )
Drupal\Core\Render\Renderer->render(Array)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1)
__TwigTemplate_9a4de685b446003e6c2147f02cb08e32fea24915f2490d6646630db67c06f99e->doDisplay(Array, Array)
Twig_Template->displayWithErrorHandling(Array, Array)
Twig_Template->display(Array)
Twig_Template->render(Array)
twig_render_template('themes/contrib/bootstrap/templates/field/field-multiple-value-form.html.twig', Array)
Drupal\Core\Theme\ThemeManager->render('field_multiple_value_form', Array)
Drupal\Core\Render\Renderer->doRender(Array)
Drupal\Core\Render\Renderer->doRender(Array)
Drupal\Core\Render\Renderer->doRender(Array, )
Drupal\Core\Render\Renderer->render(Array, )
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1)
Stack\StackedHttpKernel->handle(Object, 1, 1)
Drupal\Core\DrupalKernel->handle(Object)

Comments

generalredneck created an issue. See original summary.

carolpettirossi’s picture

@generalredneck I could not reproduce the bug that you reported above.
I'm using 8.x-3.0-beta2. Is it only happens in dev version?

generalredneck’s picture

Status: Active » Postponed (maintainer needs more info)

yeah it happens on beta2 as well for me.

I fired up simplytest.me and tried to make it happen over there and failed to reproduce as well... though I get really strange behavior when I'm using the minimal profile to start with. I'll make that a new issue however... Until then let me see if I can narrow down my specific scenario and get use some better steps to reproduce and symptoms.

chegor’s picture

Priority: Normal » Major

Confirming error with drupal 8.0.5 and bootstrap 8.x-3.0-beta3

My users can't use bootstrap's subtheme for editing and creating new content on site.

User error: "format" is an invalid render array key in Drupal\Core\Render\Element::children() (line 102 of /var/www/html/drupal/core/lib/Drupal/Core/Render/Element.php).

JeroenKool’s picture

Same here, D805, Bootstap 8.x-3.0-beta3

User error: "format" is an invalid render array key in Drupal\Core\Render\Element::children() (line 102 of /sites/int/www/core/lib/Drupal/Core/Render/Element.php).

adamkudrna’s picture

I can confirm the same error with Drupal v8.1.1 and Bootstrap theme v8.3.0-beta3. Due to this error our users cannot use neither Bootstrap theme nor its sub-themes for editing their content so we must use the Seven theme which is not that comfortable.

Error message:

User error: "value" is an invalid render array key in Drupal\Core\Render\Element::children() (line 97 of core/lib/Drupal/Core/Render/Element.php).
User error: "format" is an invalid render array key in Drupal\Core\Render\Element::children() (line 97 of core/lib/Drupal/Core/Render/Element.php).
User error: "value" is an invalid render array key in Drupal\Core\Render\Element::children() (line 97 of core/lib/Drupal/Core/Render/Element.php).
User error: "format" is an invalid render array key in Drupal\Core\Render\Element::children() (line 97 of core/lib/Drupal/Core/Render/Element.php).

Unfortunately, I do not have enough knowledge to be able to fix it but if there is a way I could provide some support leading to solution of this issue, I will be glad to help.

frankcarey’s picture

It seems like the bootstrap theme is incorrectly handling the render of some element types.

This same type of error comes up when rendering a preview of a comment, where '#value' in the render array is an array with keys ('format', 'value') instead of the string that it expects.

To recreate:
- Create a comment for any node
- Click 'preview' instead of 'save'
- If you have errors turned on, you should see the error on the page
- You may also see the format setting string being added to the preview markup.

Either bootstrap doesn't handle this properly, or perhaps it set's this #value in a preprocess incorrectly?

markcarver’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

@frankcarey, I cannot reproduce your steps above. Furthermore, I haven't seen this error at all with the sites I've been using (which use entity references).

It sounds like some other module isn't playing nice since a fresh install of latest core/this project cannot reproduce.

RaSpirit’s picture

I'm having the same issue with the following scenario.

  1. There is a node with fields: textarea, node reference, image, file.
  2. I've added a custom form template via form alter.
  3. If I print form elements with {{ form|without('form_build_id', 'form_token', 'form_id', 'actions') }}, I'm getting multiple messages with error:

    User error: " in Drupal\Core\Render\Element::children() (line 97 of core/lib/Drupal/Core/Render/Element.php).

    It started happening since I had added field with type file to the node (other fields already existed there and I did not have error for the case). If I print every form element with {{ form.field }} I don't get an error.

Could you make sure there is no issue with bootstrap theme itself? If I do it with theme seven it works without issues.

RaSpirit’s picture

Status: Closed (cannot reproduce) » Needs work

Reopening since it still happens.

markcarver’s picture

Status: Needs work » Closed (cannot reproduce)

@RaSpirit, the error you're mentioning doesn't even resemble this issue; nor does it really pertain to this issue since you're modifying forms/templates manually (which indicates that it's a user/developer error). Please don't hi-jack issues.

RaSpirit’s picture

@markcarver I don't aggree with you on this. If it works fine with core's themes but it breaks with bootstrap theme, then this is definitely bootstrap theme bug. This seems to be weird that it can't render form variable in template properly.

markcarver’s picture

If it works fine with core's themes but it breaks with bootstrap theme, then this is definitely bootstrap theme bug.

Using core themes as a "test" against a contrib base theme is like comparing a bicycle (core) with a car (contrib). Core implements the absolute minimum of "APIs" and implementation. It is the biggest misconception of Drupal: just because core "works" the fault must lie with contrib. False.

For example: the without twig filter is provided by core. You are creating a custom template and using the APIs provided by core. The issues you are having are a direct correlation to your customization.

The kind of "support" you are asking for definitely falls outside the scope of this project and is, in fact, not related to this issue or this project at all.