Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
when going to the admin/people/permissions/roles
at my Drupal 7.0 site (core language Russian, using
CentOS 5.5, PostgreSQL 8.4.7, PHP 5.3), I get the
following warnings (please also see the attached screenshot):
Warning: htmlspecialchars(): Invalid multibyte sequence in argument в функции check_plain() (строка 1476 в файле /var/www/html/preferans.de/includes/bootstrap.inc).
Warning: htmlspecialchars(): Invalid multibyte sequence in argument в функции check_plain() (строка 1476 в файле /var/www/html/preferans.de/includes/bootstrap.inc).
Warning: htmlspecialchars(): Invalid multibyte sequence in argument в функции check_plain() (строка 1476 в файле /var/www/html/preferans.de/includes/bootstrap.inc).
Warning: htmlspecialchars(): Invalid multibyte sequence in argument в функции check_plain() (строка 1476 в файле /var/www/html/preferans.de/includes/bootstrap.inc).
Warning: htmlspecialchars(): Invalid multibyte sequence in argument в функции check_plain() (строка 1476 в файле /var/www/html/preferans.de/includes/bootstrap.inc).
Thank you!
Alex
Comments
Comment #1
RoSk0+1 subscribing
Comment #2
parka CreditAttribution: parka commentedI've this problem as well, but it shows up only when a particular keyword is used as a search term.
E.g.
housing -> error
housing cost -> error
cost of housing -> no error
Puzzled.
Comment #3
sun-fire CreditAttribution: sun-fire commented+1 subscribing
Comment #4
pisajvmore CreditAttribution: pisajvmore commentedI have the same problem. But if i switch the language to English, everything is ok...
Comment #5
akanouras CreditAttribution: akanouras commentedAlso happens with Greek as core language, whatever the current used language is.
You get one warning for each role with non-English characters in its name - when you install in a language other than English, the built-in roles are translated as well.
System information:
Debian Squeeze
PHP 5.3.3-7+squeeze1
PostgreSQL 8.4.7-0squeeze2
Comment #6
AdamGS CreditAttribution: AdamGS commentedI receive a similar error when i search for words with the danish characters æø and å.
Comment #7
mightyiam CreditAttribution: mightyiam commentedsubscribe
Comment #8
Pacifik CreditAttribution: Pacifik commentedcore language Russian
subscribe +1
http://drupal.org/files/htmlspecialchars.png
So I did nothing yet added
Comment #9
Aleksey Zubko CreditAttribution: Aleksey Zubko commentedcore language Russian
subscribe +1
Comment #10
krak CreditAttribution: krak commentedsubscribe
Comment #11
lightstring CreditAttribution: lightstring commentedConfirming the issue. User Dock from Russian Drupal community site got some solution (though it require to patch the Drupal's Core, so you should only use it as a temporary one for the first time in case that warnings annoys you much).
Edit the bootstrap.inc file in the 'includes' directory in your Drupal installation, line 1476:
Comment this line:
return htmlspecialchars($text, ENT_QUOTES, 'UTF-8');
And insert next:
It helped me and other people, but the correct solution without any manual changing the Core files must be finded.
Comment #12
lightstring CreditAttribution: lightstring commentedThis issue still happens in version 7.2. As some code changed since 7.0 you'll need line 1354, not 1476 in case you'll decide to edit the bootstrap.inc.
Comment #13
droplet CreditAttribution: droplet commented#1062040: Fix role page weight title
Comment #14
krak CreditAttribution: krak commentedThis error not only for role. This error show when search text, for example.
Solution from http://drupal.org/comment/reply/1090290/4535306#comment-4485492 look better.
Comment #15
Emkas CreditAttribution: Emkas commentedI think exactly the same as krak. This solution looks very good for me.
Comment #16
droplet CreditAttribution: droplet commentedOkay. I suppose it may not same issue of #13
Comment #17
mefisto75 CreditAttribution: mefisto75 commentedsame here
upd. fixed per http://drupal.org/node/1062040
Comment #18
ChrisLaFrancis CreditAttribution: ChrisLaFrancis commentedSubscribe
Comment #19
Summit CreditAttribution: Summit commentedHi, I use module search404, http://drupal.org/comment/reply/1090290/4535306#comment-4485492 didn;t help and user module solution didn't help also..
EDIT: #11 did help me thanks, will this be added to D7.11 maybe?
greetings, Martijn
Comment #20
WhiplashInfo CreditAttribution: WhiplashInfo commentedThis solution fixed my problem!
Thanks / Tomas
Comment #21
Summit CreditAttribution: Summit commentedplease backport solution #11 to D7.dev or 7.11 maybe?
Greetings, Martijn
Comment #22
totap CreditAttribution: totap commentedHello.
I've had the problem with searching words on site with drupal 7.9 and 7.10
#11 / http://drupal.org/comment/reply/1090290/4535306#comment-4485492 / helped me :)
Thx a lot!
Comment #23
mmeytin CreditAttribution: mmeytin commentedComment in #11 fixed this for me as well - thanks! Can the fix be added into 7.x branch?
Comment #24
Richard.Li CreditAttribution: Richard.Li commentedComment in #11 fixed help me as well. -- thx
my issue is url encoded by utf8
Comment #25
bartmcphersonStill issue in Drupal 7.12. Moved to line 1572.
Changes in comment #11 corrected issue for me.
Comment #26
tecjam CreditAttribution: tecjam commentedIssue still here in d.7.14 - still in line 1572
Will #11 ever be committed?
Comment #27
Summit CreditAttribution: Summit commentedHi,
Also a +1 for committing #11, whats the downside of this? Otherwise it would already be committed right?
greetings, Martijn
Comment #28
droplet CreditAttribution: droplet commentedThe reported bug in this issue is fixed (see #13).
Please update or create a new issue:
- Needs steps to reproduce this bug
- Needs update the Issue Title & Summary
Comment #29
Heine CreditAttribution: Heine commentedDuplicate of #1062040: Fix role page weight title
Search excerpt UTF-8 issue was fixed in #987472: search.module doesn't consistently support multibyte characters
For other issues involving the 'invalid UTF-8 warning'; Please file an issue about the _source_ of the invalid data, not check_plain.
Comment #30
droplet CreditAttribution: droplet commented#393538: Document that check_plain() can issue PHP messages on invalid UTF-8 input
Comment #31
Jorgas CreditAttribution: Jorgas commented#11
Thanks a lot! It works for me. I faced same issue but after updating Drupal Commerce to 7.x-1.14 version, my Drupal version is 7.56, core language is Russian.