Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alex_optim created an issue. See original summary.

alex_optim’s picture

Assigned: alex_optim » Unassigned
Status: Active » Needs review
FileSize
548 bytes

On "Edit context" page, when click button "Add reaction" error occurs
Warning: Cannot use a scalar value as an array in Drupal\Core\Render\Element\RenderElement::preRenderAjaxForm() (line 315 of...
Create patch how fixed this error.

icurk’s picture

Status: Needs review » Postponed (maintainer needs more info)

I can't reproduce this error. Are you still having this issue? Which version of Drupal core are you using? If you still have this issue, better patch would be to delete this line '#ajax' => TRUE since ajax is already triggered by use-ajax class on link.

johnhuang0808’s picture

Version: 8.x-0.x-dev » 8.x-1.x-dev
Status: Postponed (maintainer needs more info) » Active
FileSize
141.79 KB

I also encountered the same issue when clicking the "Add reaction" button.

Edit: The Drupal core is 8.3.4.

johnhuang0808’s picture

Status: Active » Needs review
FileSize
502 bytes

According to @icurk's suggestion, I remove the '#ajax' => TRUE. It works for me.

jayemel’s picture

Same issue here on 8.4.4. Removing '#ajax' => TRUE does not solve it for me.

Janez Zibelnik’s picture

Status: Needs review » Reviewed & tested by the community

It is working for me on 8.4.4. Removing the "#ajax" removes the element from the if statement that contained the switch statement that was throwing the error in the first place.

KarimBou’s picture

Same issue here with 8.4.4, 8.5.0-beta1 and 8.5.0-rc1

nkoporec’s picture

Version: 8.x-1.x-dev » 8.x-4.x-dev
FileSize
799 bytes

Have the same issue, running latest drupal and context dev branch.Created a patch with a fix that was suggested by icurk.

interdruper’s picture

I can confirm that #5 or #9 fix the issue, Drupal 8.5.0 and Context 8.x-4.0-beta2+11-dev.

boshtian’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.