I just wanted to create a new comment on my test site and received the following error page:
The website encountered an unexpected error. Please try again later.
Error: Call to undefined function Symfony\Component\Validator\Constraints\iconv_strlen() in Symfony\Component\Validator\Constraints\LengthValidator->validate() (line 47 of vendor/symfony/validator/Constraints/LengthValidator.php).
It seems the "iconv" PHP extension is required for Drupal 8 (via the included symfony/validator package), but I couldn't find any place where this is documented. The site's "Status report" doesn't report any problems, the relevant handbook page also makes no mention of it.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 2678574-4.patch | 843.45 KB | dawehner |
| #4 | 2678574-4.patch | 383 KB | dawehner |
Comments
Comment #2
dawehnerUrgs, this changed with #2611816: Update to symfony 2.8
Wow: https://github.com/symfony/symfony/pull/16856
Comment #3
dawehnerI see, so we should add the new polyfill, see https://github.com/symfony/symfony/pull/16856/files
Comment #4
dawehnerThere we go.
Comment #6
dawehnerThis time with
--binaryComment #7
jibranLooks great. Thanks.
Comment #8
catchShould we be recommending iconv in hook_requirements() as well? Does not have to happen here.
Comment #9
catchComment #10
dawehnerYeah, why not
Comment #12
tic2000 commentedI think this should be in 8.1.x
Comment #15
catchCommitted/pushed to 8.2.x and cherry-picked to 8.1.x. Thanks!
Also retrospectively bumping this to critical since it would have been a fatal error updating between 8.0.x and 8.1.x for sites without the extension.
Comment #17
mr.baileysAdded #2703495: Simplify Unicode::convertToUtf8() now that core has iconv polyfill. as a follow-up.