SWF Chart fails to load if file_directory_path changes

lmartin - October 8, 2009 - 18:41
Project:SWF Charts
Version:5.x-1.2
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

I am using a multi-site Drupal setup where the file system has a path like (sites/{domain}/files). When I originally set up the SWF Charts module everything worked as expected. A few weeks ago, I copied the database and all files and set up a clone of my original setup. When I went to test the SWF Charts module on the new site, I received an error and noticed that the path to the xml file was still pointed to my original site. I also had an error on the cron task. Discovered that a 'swfcharts_xmldir' variable was getting stored on the initial creation of a chart and then was always being used as subsequent calls were made. So, the path was wrong and would never be changed unless the variable ended up getting destroyed somehow and had to be recreated.

I am submitting a patch for this module that replaces the variable_get statements with the actual file_directory_path so that as the charts are built, they will pull the file system path from the admin settings in case the file system has been modified.

#1

lmartin - October 8, 2009 - 18:43

Here is my patch -

AttachmentSize
swfcharts-599370-1.patch 1.25 KB
 
 

Drupal is a registered trademark of Dries Buytaert.