I get this error when I click on the "send to phone" link that shows up on the event content type after I enabled the smsframework module.

Error: [] operator not supported for strings in social_landing_page_form_alter() (line 19 of drupal-8.5.2/html/profiles/contrib/social/modules/social_features/social_landing_page/social_landing_page.module)

#0 drupal-8.5.2/html/core/lib/Drupal/Core/Extension/ModuleHandler.php(539): social_landing_page_form_alter(Array, Object(Drupal\Core\Form\FormState), 'sms_sendtophone...')#012

#1 drupal-8.5.2/html/core/lib/Drupal/Core/Form/FormBuilder.php(830): Drupal\Core\Extension\ModuleHandler->alter('form', Array, Object(Drupal\Core\Form\FormState), 'sms_sendtophone...')#012

#2 drupal-8.5.2/html/core/lib/Drupal/Core/Form/FormBuilder.php(272): Drupal\Core\Form\FormBuilder->prepareForm('sms_sendtophone...', Array, Object(Drupal\Core\Form\FormState))#012

#3 drupal-8.5.2/html/core/lib/Drupal/Core/Controller/FormController.php(74): Drupal\Core\Form\FormBuilder->buildForm('sms_sendtophone...', Object(Drupal\Core\Form\FormState))#012

Comments

SocialNicheGuru created an issue. See original summary.

socialnicheguru’s picture

Status: Active » Needs review
StatusFileSize
new735 bytes
jaapjan’s picture

Hi SocialNicheGuru,

I can't reproduce this on PHP 7.1.11.

Which PHP version do you use? It might be good to update to the latest 7.1 or 7.2.

jaapjan’s picture

Anyway, I think this code might solve the issue:
https://github.com/goalgorilla/open_social/pull/865

Your patch also removes the node_landing_page_edit_form part and we should check for that, because we want to have the library attached for both node/add and node/edit landing pages.

jaapjan’s picture

Title: Error: [] operator not supported for strings in social_landing_page_form_alter() (line 19 of drupal-8.5.2/html/profiles/contrib/social/modules/social_features/social_landing_page/social_landing_page.module » Attach library only for correct forms in social_landing_page_form_alter()
jaapjan’s picture

Status: Needs review » Fixed

Merged it, thanks for your contribution!

Status: Fixed » Closed (fixed)

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