Needs work
Project:
Page Title
Version:
6.x-2.5
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Feb 2012 at 21:49 UTC
Updated:
11 May 2012 at 21:59 UTC
Freshly installed Page Title gives me this warning on certain nodes types:
warning: htmlspecialchars() expects parameter 1 to be string, array given in /includes/bootstrap.inc on line 860.
The affected node types are all of the one type and all English language (which is not my default). In original language (Czech) warning is not appearing.
This node is tagged with number of localizable taxonomy terms (which are not always localized), though this could be unrelated with warning?
Please advise me what I can track and test to find culprit.
Comments
Comment #1
Plus commentedSame bug.
Languages:
Default: Russian without path prefix
Additional: English with path prefix 'en'
PHP 5.3.1, 5.3.3.
Comment #2
Plus commentedThis is incompatibility issue with i18n submodule 'Taxonomy translation'.
Steps to reproduce:
1. Install Drupal 6.25 (PHP >= 5.2.5)
2. Install modules:
* i18n (Internationalization + Taxonomy translation)
* page_title (Page Title)
* token (Token)
3. Configure 'Page' content type
admin/content/node-type/page
* Workflow settings:
* Multilingual support: Enabled, with translation
4. Add taxonomy vocabulary
admin/content/taxonomy/add/vocabulary
* Translation mode: Localize terms...
* Content types: Page
* Settings: Tags
5. Add some language
admin/settings/language/add
* Russian (for example)
6. Configure
admin/settings/language/configure
* Language negotiation: Path prefix only.
7. Add test page
node/add/page
* title:any, language: English, body: any. Save.
8. Translate test page
node/1/translate
* Russian: ---> [add translation]
Save.
9. Add some tag to the translated page
ru/node/2/edit
* add some tag: tag1
Save.
10. See dblog
admin/reports/dblog
* the bug
Now you can visit ru/node/2 to get the bug in dblog.
Page conditions for the bug:
Language: not default
Tags: 1 or more
Comment #3
abs commentedYes, this is it!
Comment #4
Plus commentedIt seems setting taxonomy vocabulary's 'Translation mode' (see step 4) to 'Per language terms...' or 'Set language to vocabulary' solves the problem, if using of 'Translation mode: Localize terms' is not obligatory.
Comment #5
vasrush commentedThis error is fixed for me by applying the patch in the following thread.
http://drupal.org/node/1316786
Comment #6
nicholasthompsonI think I'll need a patch here - you might find luck in #1518348: Warning: htmlspecialchars() expects parameter 1 to be string, array given in check_plain(), but I dont know where this bug is caused in PT...
Comment #7
abs commentedTried patch #1518348 and the error is gone. Everything seems to work fine now.