@hpvd opened this issue on November 21st 2013

As already described in #4221 there are error messages looking at old visits e.g. from March-Oktober in vistor log and visitor profile.

This seem to be fixed now but only for new data logged with Piwik 2.0b (November?).

Looking at the old data or e.g. the full year there are plenty of them with latest Piwik beta 2.0b8

As figured out in the mentioned ticket, these Errors seem to/may result from German Umlauts in pagetitle.

the message again is the same error line like at the bigging we talked about this problem:

There is an error. Please report the message (Piwik 2.0-b8) and full backtrace in the Piwik forums (please do a Search first as it might have been reported already!).

Warning: htmlspecialchars() [function.htmlspecialchars]: Invalid multibyte sequence in argument in /html/piwik/vendor/twig/twig/lib/Twig/Extension/Core.php on line 925

Backtrace -->

#0 Piwik\Error::errorHandler(...) called at [:]
#1 htmlspecialchars(...) called at [/html/piwik/vendor/twig/twig/lib/Twig/Extension/Core.php:925]
#2 twig_escape_filter(...) called at [/html/piwik/tmp/templates_c/57/26/f50133f3038ccbfc28e1ecc8d3b1b89982619950037a3321ccfb9c3ede32.php:313]
#3 __TwigTemplate_5726f50133f3038ccbfc28e1ecc8d3b1b89982619950037a3321ccfb9c3ede32->doDisplay(...) called at [/html/piwik/vendor/twig/twig/lib/Twig/Template.php:264]
#4 Twig_Template->displayWithErrorHandling(...) called at [/html/piwik/vendor/twig/twig/lib/Twig/Template.php:238]
#5 Twig_Template->display(...) called at [/html/piwik/tmp/templates_c/b4/a1/a35ef731cdf931ecd4994401b308abd53b13fd3c1ed013a537523891a337.php:589]
#6 __TwigTemplate_b4a1a35ef731cdf931ecd4994401b308abd53b13fd3c1ed013a537523891a337->doDisplay(...) called at [/html/piwik/vendor/twig/twig/lib/Twig/Template.php:264]
#7 Twig_Template->displayWithErrorHandling(...) called at [/html/piwik/vendor/twig/twig/lib/Twig/Template.php:238]
#8 Twig_Template->display(...) called at [/html/piwik/tmp/templates_c/f6/f4/6ed24a7d9ed3e245fa01550d6ed4e014f32f8bce916134512d56978f453c.php:117]
#9 __TwigTemplate_f6f46ed24a7d9ed3e245fa01550d6ed4e014f32f8bce916134512d56978f453c->doDisplay(...) called at [/html/piwik/vendor/twig/twig/lib/Twig/Template.php:264]
#10 Twig_Template->displayWithErrorHandling(...) called at [/html/piwik/vendor/twig/twig/lib/Twig/Template.php:238]
#11 Twig_Template->display(...) called at [/html/piwik/vendor/twig/twig/lib/Twig/Template.php:249]
#12 Twig_Template->render(...) called at [/html/piwik/vendor/twig/twig/lib/Twig/Environment.php:296]
#13 Twig_Environment->render(...) called at [/html/piwik/core/View.php:241]
#14 Piwik\View->renderTwigTemplate(...) called at [/html/piwik/core/View.php:236]
#15 Piwik\View->render(...) called at [/html/piwik/core/Plugin/ViewDataTable.php:276]
#16 Piwik\Plugin\ViewDataTable->render(...) called at [/html/piwik/core/Plugin/Controller.php:228]
#17 Piwik\Plugin\Controller->renderReport(...) called at [/html/piwik/plugins/Live/Controller.php:96]
#18 Piwik\Plugins\Live\Controller->getLastVisitsDetails(...) called at [/html/piwik/plugins/Live/Controller.php:90]
#19 Piwik\Plugins\Live\Controller->indexVisitorLog(...) called at [:]
#20 call_user_func_array(...) called at [/html/piwik/core/FrontController.php:114]
#21 Piwik\FrontController->dispatch(...) called at [/html/piwik/index.php:58]


please see also attachment

=> If not only new data should be usable with piwik 2.0 we may should have a look at this again...

@hpvd commented on November 21st 2013
@hpvd commented on November 21st 2013

to go the direct way to more details within the ticket mentioned above use this link: #4221

@tsteur commented on November 22nd 2013

In 76f538a46ff5319414495d455b9be0b9acf287d5: refs #1816 #4330 label is already escaped by safeDecodeLabel, to not escape: otherwise error message non utf8 character might occur

@mattab commented on November 28th 2013

Do you still experience the issue with 2.0-b10?

@hpvd commented on November 28th 2013

yes unfortunately it's still there with the b10 from master :-(

@mattab commented on December 8th 2013

Do you experience it for all days or only one particular day?

could you try to upgrade to PHP 5.5 or 5.4?

Does it not happen with new data?

@hpvd commented on December 8th 2013

updated to latest piwik version from master 8.12.13 12:00 europe: it's still there - and in many many days.. php is latest from 5.3=>5.3.27 sorry an update to a newer version is not possible on this server since some other software relay on 5.3 doesn't work well with 5.4/5

@mattab commented on December 9th 2013

Thanks for the follow up! in the meantime you can replace the htmlspecialchars by @htmlspecialchars at the 3 lines around 925 #1 htmlspecialchars(...) called at [/html/piwik/vendor/twig/twig/lib/Twig/Extension/Core.php:925]

this will silent the error.

I'm still un-sure of the fix. Maybe we should catch this particular php warning and ignore it, maybe a bug in php 5.3.x.

@hpvd commented on December 21st 2013

installed Piwik 2.02 => the error message changed a little bit:

There is an error. Please report the message (Piwik 2.0.2) and full backtrace in the Piwik forums (please do a Search first as it might have been reported already!).

Warning: htmlspecialchars() [function.htmlspecialchars]: Invalid multibyte sequence in argument in /html/piwik/vendor/twig/twig/lib/Twig/Extension/Core.php on line 968

Backtrace -->

#0 Piwik\Error::errorHandler(...) called at [:]
#1 htmlspecialchars(...) called at [/html/piwik/vendor/twig/twig/lib/Twig/Extension/Core.php:968]
#2 twig_escape_filter(...) called at [/html/piwik/tmp/templates_c/e1/3e/861e3fd02fc14c73bba288b177deeb8274a429bcb91c2400f69ebe9dc578.php:207]
#3 __TwigTemplate_e13e861e3fd02fc14c73bba288b177deeb8274a429bcb91c2400f69ebe9dc578->doDisplay(...) called at [/html/piwik/vendor/twig/twig/lib/Twig/Template.php:276]
#4 Twig_Template->displayWithErrorHandling(...) called at [/html/piwik/vendor/twig/twig/lib/Twig/Template.php:250]
#5 Twig_Template->display(...) called at [/html/piwik/vendor/twig/twig/lib/Twig/Template.php:261]
#6 Twig_Template->render(...) called at [/html/piwik/vendor/twig/twig/lib/Twig/Environment.php:292]
#7 Twig_Environment->render(...) called at [/html/piwik/core/View.php:253]
#8 Piwik\View->renderTwigTemplate(...) called at [/html/piwik/core/View.php:248]
#9 Piwik\View->render(...) called at [/html/piwik/plugins/Live/Controller.php:157]
#10 Piwik\Plugins\Live\Controller->getVisitorProfilePopup(...) called at [:]
#11 call_user_func_array(...) called at [/html/piwik/core/FrontController.php:117]
#12 Piwik\FrontController->dispatch(...) called at [/html/piwik/index.php:71]

@mattab commented on January 3rd 2014

See also: #4410 The string to escape is not a valid UTF-8 string

Can you try the following: in config.ini.php set the following below [database] section:

[database]
charset = utf8

Then do you see the error for old visits? and for new ones?

please comment there as I think it's the same issue: #4410

@mattab commented on January 22nd 2014

A similar issue was reported in the Visitor profile http://forum.piwik.org/read.php?2,110352

@mattab commented on May 13th 2014

Invalid multibyte sequence in argument in /html/piwik/vendor/twig/twig/lib/Twig/Extension/Core.php on line 927

This bug has occurred again in Piwik 2.2.2. I created ticket at #5157

This issue was closed on May 13th 2014
Powered by GitHub Issue Mirror