Unable to add dashlet at home page screen

while adding dashlet at home page, clicking on any of the Menuā€™s getting no response

I have a similar problem/behaviour. The dashlet window opens, but clicking on a dashlet does nothing (no way to add a dashlet). Adding a Tab refreshes the screen, but no Tab is added. I have the number of dashlets permitted set to 25. There are 7 currently enabled (by default?). This behaviour is consistent with various user logins on multiple machines.

Anyone there who can help us on this as far i am unable to resolve this issue and critically struck on this.

Required a urgent help by top professional of this community

I have the exact same problem with suitecrm 7.1.2 on lamp. Canā€™t add a dashlet nor a tab. If I click on e.g.ā€œMy open taskā€ nothing happen and the error I get from the Console of Chrome is Uncaught TypeError: Cannot read property ā€˜getAttributeā€™ of null referred to the file include/MySugar/javascript/MySugar.js at rows

var fillInDashlet=function(data){ajaxStatus.hideStatus();if(data){current_dashlet_id=SUGAR.mySugar.currentDashlet.getAttribute(ā€˜idā€™);dashlet_guid=current_dashlet_id.substr(ā€˜dashlet_entireā€™.length);if(data.responseText.indexOf(dashlet_guid)<0&&data.responseText!=SUGAR.language.get(ā€˜app_stringsā€™,ā€˜LBL_RELOAD_PAGEā€™)){return false;}

This happens with every user and chrom/explorer/firefox

I think itā€™s a permissions issue.

Set the permissions to 775 for folders cache custom data modules and themes and 664 for the files in them including config_override.php.

Please set the required permissions and see if it works.

Permissions are set correctly, anyway I have changed everything to 777 to clarify that this is NOT a permissions issue .

As a temporary solution I have found that by clicking on the ā€œSuite Dashboard tabā€ it now recognizes which is the current dashlet and the object SUGAR.mySugar.currentDashlet is not null anymore

If you are using PHP 5.4 there is a warning message that will prevent you from adding a dashlet to your home screen.

Look in /custom/include/MySugar/MySugar.php around line 135.

Look for this line:

array_unshift($pages[$_SESSION['current_tab']]['columns'][0]['dashlets'], $guid);

Add this peice of code above it:


                if (!is_array($pages[$_SESSION['current_tab']]['columns'][0]['dashlets'])) {
                        $pages[$_SESSION['current_tab']]['columns'][0]['dashlets'] = array();
                }
2 Likes

My php version is 5.3.4. I have tried what you suggested but is does not change the behaviour. Thanks anyway.

Did anyone figure this out? I have the same problem, on a new install that should have no problems at all. Iā€™m getting very tired of trying to make this software work, itā€™s one problem after another.

  1. Make sure your permissions, owner etc are set correctly for your setup (https://suitecrm.com/wiki/index.php/Installation)
  2. If you are using php 5.4+ change the error reporting level to:-
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
  1. Check any modifications made arenā€™t causing any issues, like having line after ?> can cause issues (should probably avoid using it if not required)

  2. If you are still having issues check the error logs, if you are using a decent browser, get it to show any JavaScript errors etc in its console and report back

Ok, well, I donā€™t want to have to fix the flaws of a new program by messing with the script, Iā€™m the end user, makes no sense. Can I pay someone to fix it? Itā€™s nothing Iā€™ve done, I installed it automatically through Cpanel, and it just doesnā€™t workā€¦

Hey folksinger,

Check what php version you are using in Cpanel (it should be listed in stats). I bet the issue is your running php 5.4+ which causes this bug. If this is the case there are two solutions to fix it above (we can help implement them), or you can downgrade your php to 5.3.

Installation can be tricky and if you donā€™t install it to a compatible environment with the proper permissions it wont work properly. Cpanel might of messed something up in the installation, who knows. If you donā€™t want to mess with debugging i would recommend the SuiteCRM on demand version.

Had the same problem on my local instance despite having all the right permissions and so on. The only solution was to reinstall SuiteCRM. Now it works. But only if i first click the default dashlet before i try to add anything.

the problem is in the first tab if you add more tabs you can add dashlets to this new tabs, after that if you return to the default dashlet now you colud add dashlets

I found an error in the file /var/www/suitecrm/custom/include/MySugar/MySugar.php in line 116, array_unshift($pages[$_SESSION[ā€œcurrent_tabā€]][ā€œcolumnsā€][0][ā€œdashletsā€], $guid);

when you first load suitecrm the key current_tab does no exits in $_SESSION, when you add more tabs and access those new tabs it is created and for the first tab takes the value ā€˜0ā€™

to solve this issue you must add this code to the file before line 116

if(!array_key_exists(ā€˜current_tabā€™,$_SESSION)){
$_SESSION[ā€œcurrent_tabā€] = ā€˜0ā€™;
}

sorry about my english

4 Likes

This worked for my installation. Thanks! I also came across the following link which did NOT work for me Canā€™t Add Chart Dashlets, Dashboard Blank

The fix submitted by adesimone worked for me.

I checked the current codebase and the fix wasnā€™t there yet so I propsed pull request #184 to fix this in master.

https://github.com/salesagility/SuiteCRM/pull/184

Many thanks for the fix.

Hello all!
I have exactly the same problem in Suitecrm 7.3
But this fix not working anymore.

Can someone help me?

Hi, my solution was added to suitecrm so the problem is not present anymore

Perhaps you must dig on logs to find the trouble

Ok, guys.
I found the reason of that problem!

On all my instanses was installed Asterisk Connector module. When i delete this module, all dashlets are creates normally.

1 Like