Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Home page dashboard boxs not loaded
#1
Hi,

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:
Code:
.../index.php?module=Home&action=HomeAjax&file=HomeWidgetBlockList&widgetInfoList=...

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?
Reply
#2
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
Joe
TSolucio
Reply
#3
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


Attached Files Image(s)
   
Reply
#4
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);

set

$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.
Joe
TSolucio
Reply
#5
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:
http://demo.corebos.com/index.php?module=Leads&action=CustomView&record=91&parenttab=ptab

the filter name is:

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

(Hebrew gibberish text)


Attached Files Image(s)
   
Reply
#6
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.
Joe
TSolucio
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)