Joomla plugin Spreadsheet: Wrong library path.

I installed the Joomla Spreadsheet plugin in Joomla 2.5.3 successfully. There were no errors during the installation. The tables in the SQL database look OK. After I activated the plugin and included the spreadsheet tag into an article, no spreadsheet was displayed.

When I looked at the html output of the article page I recogniced, that the library path was not set correctly:

<script src='http://www.mydomain.deplugins/content/spreadsheet/codebase/spreadsheet.php?load=js' type='text/javascript' charset='utf-8'></script>
<link rel='stylesheet' href='http://www.mydomain.deplugins/content/spreadsheet/codebase/dhtmlx_core.css' type='text/css' charset='utf-8'>
<link rel='stylesheet' href='http://www.mydomain.deplugins/content/spreadsheet/codebase/dhtmlxspreadsheet.css' type='text/css' charset='utf-8'>
<link rel='stylesheet' href='http://www.mydomain.deplugins/content/spreadsheet/codebase/dhtmlxgrid_reset.css' type='text/css' charset='utf-8'>

<script>var dhx_sh;
function onload_func_986991() {
	window.setTimeout(function() {
		var cfg = {
	sheet: '1',
	dhx_rel_path: 'http://www.mydomain.deplugins/content/spreadsheet/codebase/',
	parent: 'spreadsheet_box_986991',
	load: 'http://www.mydomain.deplugins/content/spreadsheet/spreadsheet_data.php',
	save: 'http://www.mydomain.deplugins/content/spreadsheet/spreadsheet_data.php',
skin: 'dhx_skyblue',
math: false,
autowidth: false,
autoheight: false

dhx_sh = new dhtmlxSpreadSheet({
			load: cfg.load,
			parent: cfg.parent,
			autowidth: cfg.autowidth,
			autoheight: cfg.autoheight,
			math: cfg.math,
			icons_path: cfg['dhx_rel_path'] + 'imgs/icons/',
			image_path: cfg['dhx_rel_path'] + 'imgs/'
		dhx_sh.load(cfg.sheet||'1', cfg.key||null);
	}, 1);
dhtmlxEvent(window, 'load', onload_func_986991);</script><div id='spreadsheet_box_986991' style='width: 600px; height: 400px; background-color:white;'>

I could’nt find the place in the source code of the plugin, where the path is assambled. What can I do to correct the incomplete path string?

I have to say, that I am not a software developer and not really familiar with PHP programming. I can’t say, if the problem is caused by Joomla or by the plugin itself. Thank you for your help!

please, open file plugins/content/spreadsheet/spreadsheet.php and find the follow line:

$url = "http://".$_SERVER['SERVER_NAME'].str_replace($root, "", $path).'/';

Replace it with:

$url = "http://".$_SERVER['SERVER_NAME'].'/'.str_replace($root, "", $path).'/';

Thank you very much. The path is now correct and the plugin works fine => problem resolved! Just wondering, why noone else has the same problem :confused:

it depends of web-server configuration.
Fix is added in plugin.