Full Version: Home page dashboard boxs not loaded
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

In my installation all users dashboard boxs not loaded automatically.
One need to press the reload icon on a specific box in order to load it.

Its look like:

not return json string

In the browezr console I got this error:
Quote:VM2127:1 Uncaught SyntaxError: Unexpected end of JSON input
   at JSON.parse (<anonymous>)
   at Object.<anonymous> (Homestuff.js:381)
   at i (jquery.js:2)
   at Object.fireWith [as resolveWith] (jquery.js:2)
   at y (jquery.js:4)
   at XMLHttpRequest.c (jquery.js:4)

How wo fix it?
in the inspector panel, go to the network tab and find the call to retrieve the widget contents, you should see there some PHP warnings or similar. You should be able to see those same messages in the apache error.log

Share the warnings here, so we can understand what it is complaining about and fix it.

If you just want to ignore it, you can set error_reporting to 0 and it should work, but it would be nice to try to fix it
I found the cause of the problem

The function json_encode in modules/Home/HomeWidgetBlockList.php fail

PHP Code:
echo json_encode($widgetHTML); 

json_last_error() returns Malformed UTF-8 characters, possibly incorrectly encoded

In my case $widgetHTML contain non Latin charters.

Some lines in $widgetHTML (like filter name in key metric box) are truncate.
... (3 dots) added to the filter names, probably because of global parameter like: Application_ListView_Max_Text_Length.

Look like the truncation is not UTF8 safe and break the string encoding.

Attach screenshot
I don't think it is the truncate, I'd say the problem is with the characters themselves. Can you add this line before the json_encode

global $log; $log->fatal($widgetHTML);


$LOG4PHP_DEBUG = true;

in your config file and reproduce the error.
then in the file logs/vtigercrm.log you should see the text that cannot be converted. See if you can share that with us.
I just reproduce the problem in the Corebos demo.

Created long non Latin filter name and select  "List in Metrics"

Attach screenshot from Corebos demo.

Here is a direct link to the filter:

the filter name is:

   עכגעכג עכגעכג עכגעכג ע כגעכגעכגעג עכגעכג עכג ע כג עכג

(Hebrew gibberish text)
you were right, it was the cut, but because that part of the application was using a non-standard method. I converted it to the standard and it works correctly now. Update and give it a try.