I have a multilanguage site. When giving a range of values to a text/select list using PHP code to translate its content and creating or editing a new node, it only shows the entries that doesn't have any special character. In the report error log it shows the error from the title for each element that fails the translation.
Everything worked correctly until the last update to the latest CCK (2.8).
For example I have the following in the PHP section of Allowed Values of a CCK field:
return array(
'monumentos' => t('monuments'),
'guia' => t('visit the city with a guided tour'),
'cronologia' => t('chronology of Valencia')
);
The translations are:
- monuments: monumentos
- isit the city with a guided tour: visitar la ciudad con un guía
- chronology of Valencia: cronología de valencia
When editing a content associated to this CCK Field it only shows the entries without any special character.
In this particular example it shows:
<select name="field_categoria_historia[value]" class="form-select required" id="edit-field-categoria-historia-value">
<option value="monumentos">monumentos</option>
<option value="guia"></option>
<option value="cronologia"></option>
</select>
Comment | File | Size | Author |
---|---|---|---|
#18 | cck-warnings-894880-2.patch | 981 bytes | nsciacca |
#9 | cck-warnings-894880.patch | 467 bytes | yched |
Comments
Comment #1
irean CreditAttribution: irean commentedI have the same problem. And maybe you're right - I updated CCK too. Did you try to return previous version of CCK?
And, by the way, my site isn't multilanguage.
Comment #2
laurent@usineb.com CreditAttribution: laurent@usineb.com commentedI have the same problem. But it appear only if the view used to referenced node used the row style : field and if i put in the fields : title and Body.
If I use only the "title" field in the view, the problem doesn't appear.
My web site is multilingual.
L.
Comment #3
pixelpreview@gmail.com CreditAttribution: pixelpreview@gmail.com commentedI have a lot of warning in watchdog
htmlspecialchars(): Invalid multibyte sequence in argument ... in bootstrap.inc
after upgrade
I have a multilangual site portal in french and arabic
somebody has a solution ?
I will investigate this solution :
http://drupal.org/node/837322#comment-3617716
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedI have the same problem.
It's displayed only when I made "Page" at "View module".
My web site is multilingual.
I install an optional module in only CCK and Views in the following environment.
MySQL 5.0.51a
Apache/2.0.63 (Red Hat)
PHP 5.2.6
Drupal 6.19
Views 6.x-2.11
CCK 6.x-2.8
Comment #5
MaxMendez CreditAttribution: MaxMendez commentedHi I have a same problem my url use ñ and show this errors:
warning: htmlspecialchars() [function.htmlspecialchars]: Invalid multibyte sequence in argument in C:\inetpub\drupal2\includes\bootstrap.inc on line 857.
warning: htmlspecialchars() [function.htmlspecialchars]: Invalid multibyte sequence in argument in C:\inetpub\drupal2\includes\bootstrap.inc on line 857.
warning: htmlspecialchars() [function.htmlspecialchars]: Invalid multibyte sequence in argument in C:\inetpub\drupal2\includes\bootstrap.inc on line 857.
Comment #6
Duke Nukem CreditAttribution: Duke Nukem commentedSame problem for me when i add a Taxonomi term
Comment #7
dcdace CreditAttribution: dcdace commentedI had the same problem. I am using Drupal 6.20 (it was the same with D 6.19 too).
I got rid of "htmlspecialchars(): Invalid multibyte sequence in argument in /PATH/includes/bootstrap.inc on line 857" warning by replacing check_plain function with the same function from Drupal 6.16 bootstrap.inc file.
Respectively, I replaced this
with this
Don't know how good it is to do it like this, but seems that it has worked fine.
Comment #8
xandeadx CreditAttribution: xandeadx commentedSame problem
Comment #9
yched CreditAttribution: yched commentedI committed the attached fix to both 6.x-2.x and 6.x-3.x branches.
Comment #11
brunorios1 CreditAttribution: brunorios1 commentedsame problem here in 6.x-2.9...
the problem started when i added a nodereference field in a content type...
warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/brunorios/wshared/www/fipierredev/includes/bootstrap.inc on line 857.
Comment #12
brunorios1 CreditAttribution: brunorios1 commentedsolution: http://info4admins.com/warning-htmlspecialchars-expects-parameter-1-be-s...
Comment #13
brunorios1 CreditAttribution: brunorios1 commentedComment #14
pfrenssenbrunorios1, that is a bad solution which just suppresses the error message rather than fix the problem.
Comment #15
brunorios1 CreditAttribution: brunorios1 commentedi agree... but i can't found the solution yet...
Comment #16
jlballes CreditAttribution: jlballes commentedSame problem!!
Comment #17
ChrisLaFrancis CreditAttribution: ChrisLaFrancis commentedSubscribe
Comment #18
nsciaccaIn addition, cck/content.module needs to be updated just like yched's fix:
I attached a patch, not really sure how to submit it for inclusion for the next release....
Comment #19
kscheirerIf folks are still reporting this issue and writing patches, it doesn't look fixed to me.