Steve Carter Report post Posted July 8, 2020 Hello, I am trying to render a Gantt chart in Wordpress. I am created the xml file on the fly with data from MySQL tables, saving the xml and then calling it with the new FusionCharts function. However, I am getting an "Error in loading data". I have the php files saved as template filed in a child directory under my theme directory and the script runs fine when creating the xml files. However, if I under the Network tab in the browser debugger, I am getting 404 errors when trying to read the xml files. The code that I am using to read them is $readchartfilename = "./wp-content/themes/uncode-lite/ocga_pages/".$chartname.".xml"; $columnChart = new FusionCharts("gantt", $chartId, "100%", 200, $chartname, "xmlurl", $chartfilename); If I run an echo on the getcwwd() - I get /home2/calypso/public_html/ogca and on $readchartfilename, I get - ./wp-content/themes/uncode-lite/ocga_pages/LadybirdFarms.xml. But the files that the FusionCharts function is under the folder of the page name (farm-crop-production) URL - http://mydomain.com/ogca/farm-crop-production/wp-content/themes/uncode-lite/ocga_pages/LadybirdFarms.xml Would appreciate any assistance. Thanks Steve Share this post Link to post Share on other sites
Ayan Bhadury Report post Posted July 8, 2020 Hi Steve, Based on the above problem it seems like the XML file is not loading properly, please check the implementation once also check if there is any firewall blocking it to load, also since you are using PHP if you could share $readchartfilename response that is the XML file, I could try it out at my end and share the observations. Thanks, Ayan Share this post Link to post Share on other sites
Steve Carter Report post Posted July 8, 2020 Ok, figured it out. It was a typo in my url. Thanks Steve Share this post Link to post Share on other sites