Adding chart (any type) dashlet gives fails.

Hey folks - Iā€™m brand-new to SuiteCRM on 7.0.1 (love the forking idea, so to speak) after coming from SugarCRM for my own needs as a solo consultant.

Iā€™m attempting to add any chart dashlet to my home screen and I received a popup indicating ā€œfailā€ (no other message) and then another indicating ā€œfailedā€ (again, no other message). The chart dashlet itself appears on the home screen, but is blank.

Has anyone seen this before and know of a fix?

Cheers,
Trevor

Hi ttownsend,

Did your SuiteCRM instance install without failure? Have you tried a quick repair & rebuild? Have you checked your sugarcrm.log file for errors?

Thanks,

Will.

Hi Will,

Yes, Iā€™ve tried several Quick R & Rs, but this behaviour persists, similar to popup wording undefined (another thread).
There are no indication (or errors at all) in sugarcrm.log so I am quite stumped.

The instance is with a shared hosting provider and they had to ā€œcorrectā€ some file permissions. I might just try a parallel test install, now that I know what the permissions problem was (see note below from my hosting provider), and see if I can recreate the behaviour.

Any other thoughts?

Keep up the good work!
Trevor

I forgot to include what I received from my ISP/hosting provider, which is below.

Cheers,
Trevor

Interestingā€¦Iā€™ve also just noticed that the ā€œMore >>ā€ item in the main menu bar is missing in my installation.
Very strangeā€¦

Hi Trevor,

Where did you obtain your version of SuiteCRM from? We have been developing bug fixes and the ā€œMore >>ā€ item was changed to allow ease of translation. If it is not appearing, the string for this should be built after a Quick R & R.

Thanks,

Will.

Hi Will,

Thanks for the help.

I got my install copy from here: http://suitecrm.com/suitecrm-download

Iā€™ve already done a few Quite R&Rs, but these original problems persist:

  1. Adding chart dashlets causes ā€œfailā€ and ā€œfailedā€ browser popups and blank charts;
  2. The ā€œsavingā€ popup says ā€œundefinedā€ instead; and
  3. The ā€œmore >>ā€ menu is missing entirely

I right now going to create a fresh install for testing under a different domain in the same hosting environment.

Should I be using an install copy from a different download source instead? Iā€™ll hold until I hear from you on that.

Thanks again!
Trevor

Hi Trevor,

The download link you are using is the most stable/current release. There is a GitHub where version 7.0.2 is available to fork/contribute to and this has had changes/fixes applied to it.

These sound like permissions issues. Please see the SuiteCRM documentation where you will find the SuiteCRM installation guide which has pre-requisites and permissions detailed.

Thanks,

Will.

Hi Will,

Yes, this does sound like permissions. Iā€™ve followed the install guide explicitly and have installed/tuned SugarCRM many times, so all good on that front.

Iā€™m wondering if this suPHP apache mod that my hosting provider is using could somehow be at fault.

Iā€™ll go ahead and install a test version of 7.0.1 and watch the logs. Iā€™ll ping back with what I find.

Cheers,
Trevor

I am also experiencing the same error with the charts where ā€˜failā€™ and ā€˜failedā€™ are returned and no chart can be displayed.

I have set the permissions per the instructions, but am also running on a shared server. I do not have the undefined errors. The undefined is clearly a permissions problem from my experience in configuring the installation though.

The error log returns:
Thu Jan 16 08:29:13 2014 [4243][1][FATAL] aor_reports for aor_report_aor_fields failed to load

Thu Jan 16 08:29:13 2014 [4243][1][FATAL] aor_reports for aor_report_aor_conditions failed to load

I was wondering if the Advanced OpenReports should show up under Advanced OpenAdmin on the Administrator panel. Basically, am I missing part of the installation?

I wanted to update this status for anyone else that comes across it. The fail error is a permissions problem, but iā€™m not sure why it occurred.

The permission file problem was in cache/xml/ where creating a new chart assigned the wrong permissions. The files were not writeable by the server. This is something that needs to be addressed when creating the file.

Final commentary on this I think. I had to change the config.php lines of assigning permissions to:

ā€˜dir_modeā€™ => 1533,
ā€˜file_modeā€™ => 436,

Previously the newly created charts were being assigned permissions of 660. Anyway, this fixed it. I donā€™t know if it was the correct way, but it works.

I tried your suggestion, but found that I was unable to login to my SuiteCRM install - the login page was blank (Chrome browser).

Once I changed the dir_mode and file_mode to their original values I was able to login again.
While logged in, if I changed those values to the ones you suggested then the pages go blank.

Iā€™m still not able to create charts, but will keep hammering at it.

Regarding the ā€˜undefinedā€™ error - can you suggest which permissions to look at for that?

Just a quick noteā€¦I was running ā€œtail -f error_logā€ via ssh when I logged off, and I saw this error:

PHP Warning: session_destroy() [function.session-destroy]: Trying to destroy uninitialized session in /home/<>/public_html/<>/core/SuiteCRM/modules/Users/authentication/SugarAuthenticate/SugarAuthenticate.php on line 317

That segment of php code is here:
/**
* Called when a user requests to logout
*
*/
function logout(){
session_destroy();
ob_clean();
header(ā€˜Location: index.php?module=Users&action=Loginā€™);
sugar_cleanup(true);
}

Is it possible that (somehow) the adding a chart throws permissions errors because I might be logged in but somehow not authenticated?

Hi,

Iā€™m not an expert at PHP or much of this at all so hopefully someone else can chime in. For your charts though, try going to the cache/xml directory and making sure the permissions on ALL files are set for the server to read them. This let me view the charts before I modified the permission settings in config.php. I set them for 666.

As far as the other permissions, I basically did the following through SSH:
chmod all files to 644
chmod all directories to 755
chmod directories cache custom modules themes upload to 775
chmod all files within directories above to 664

Iā€™m using hostgator.

1 Like

Okay - I did as suggested and set permissions as specified on the identified directories and files.

The ā€œundefinedā€ problem has vanished and the proper notification is given (i.e., ā€˜Loadingā€™, ā€˜Settings Savedā€™, etc.).
However, the original problem of not being able to add a chart of any type still persists.

By the way, I found a fantastic little shell script for managing permissions on files AND/OR directories uniquely (file is attached).

Edit: Seems that I canā€™t upload a file yet. Maybe Iā€™m too new. Code is below - save as a .sh file.


#!/bin/sh
# 
# chmodr.sh
#
# author: Francis Byrne
# date: 2011/02/12
#
# Generic Script for recursively setting permissions for directories and files
# to defined or default permissions using chmod.
#
# Takes a path to recurse through and options for specifying directory and/or 
# file permissions.
# Outputs a list of affected directories and files.
# 
# If no options are specified, it recursively resets all directory and file
# permissions to the default for most OSs (dirs: 755, files: 644).
 
# Usage message
usage()
{
  echo "Usage: $0 PATH -d DIRPERMS -f FILEPERMS"
  echo "Arguments:"
  echo "PATH: path to the root directory you wish to modify permissions for"
  echo "Options:"
  echo " -d DIRPERMS, directory permissions"
  echo " -f FILEPERMS, file permissions"
  exit 1
}
 
# Check if user entered arguments
if [ $# -lt 1 ] ; then
 usage
fi
 
# Get options
while getopts d:f: opt
do
  case "$opt" in
    d) DIRPERMS="$OPTARG";;
    f) FILEPERMS="$OPTARG";;
    \?) usage;;
  esac
done
 
# Shift option index so that $1 now refers to the first argument
shift $(($OPTIND - 1))
 
# Default directory and file permissions, if not set on command line
if [ -z "$DIRPERMS" ] && [ -z "$FILEPERMS" ] ; then
  DIRPERMS=755
  FILEPERMS=644
fi
 
# Set the root path to be the argument entered by the user
ROOT=$1
 
# Check if the root path is a valid directory
if [ ! -d $ROOT ] ; then
 echo "$ROOT does not exist or isn't a directory!" ; exit 1
fi
 
# Recursively set directory/file permissions based on the permission variables
if [ -n "$DIRPERMS" ] ; then
  find $ROOT -type d -print0 | xargs -0 chmod -v $DIRPERMS
fi
 
if [ -n "$FILEPERMS" ] ; then
  find $ROOT -type f -print0 | xargs -0 chmod -v $FILEPERMS
fi

FYI - I still have not managed to have charts (of any description or type) display on the home page.

Any more ideas?

Cheers,
Trevor

try switching off Ajax on the Home module, got to Admin->System Settings and select ā€˜Configure AJAX User Interfaceā€™, then drag Home to the disabled and save, then logout and in again