I want to prepopulate mailchimp signup form in this way (Drupal 8):
newsletter?edit[mergevars][EMAIL]=test@test.com
The result is the following error message (check_plain() function is not part of Drupal 8!):
Error: Call to undefined function Drupal\prepopulate\Controller\check_plain() in Drupal\prepopulate\Controller\prepopulateController->_prepopulate_request_walk() (line 66 of modules/prepopulate/src/Controller/prepopulateController.php).
Drupal\prepopulate\Controller\prepopulateController->_prepopulate_request_walk(Array, 'test@test.com') (Line: 57)
Drupal\prepopulate\Controller\prepopulateController->_prepopulate_request_walk(Array, Array) (Line: 57)
Drupal\prepopulate\Controller\prepopulateController->_prepopulate_request_walk(Array, Array) (Line: 35)
prepopulate_after_build(Array, Object)
call_user_func_array('prepopulate_after_build', Array) (Line: 1053)
Drupal\Core\Form\FormBuilder->doBuildForm('mailchimp_signup_subscribe_page_newsletter_form', Array, Object) (Line: 557)
.....
I think
SafeMarkup::checkPlain() should be used instead.
Right?
Comments
Comment #2
znak commentedComment #3
znak commentedAdded patch for fix this problem.
Comment #4
drupalfan2 commentedThank you for your patch.
In the meantime I solved my problem without prepopulate module using some custom jQuery code.
There seems to be another problem prepopulationg mailchimp: https://www.drupal.org/node/2890440
Comment #5
colanHtml::escape() makes sense as per the documentation.
I need this for #2849432: Simplify Prepopulate implementation with the Entity API (so maybe don't commit this directly).
Please review the patch over there.
Comment #6
damienmckennaThis needs to be rerolled after #2849432 was committed.
Comment #7
damienmckennaActually, I think this is no longer an issue as "check_plain" no longer exists in the codebase.