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.
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.
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.
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.
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.
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.
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?
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
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
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