From: SourceForge.net <no...@so...> - 2005-12-06 05:23:04
|
Bugs item #1373224, was opened at 2005-12-04 21:59 Message generated for change (Comment added) made by richardc020 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108956&aid=1373224&group_id=8956 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Admin Group: v1.7 Status: Closed Resolution: None Priority: 5 Submitted By: Richard Chen (richardc020) Assigned to: Nobody/Anonymous (nobody) Summary: manage.php: wrong "Export Data" JavaScript Path Initial Comment: At http://hostname/.../phpESP/admin/manage.php?where=export, the 4th line "<script type="text/javascript" src="http://hostname/phpESP/js/default.js"></script>" should include the survey's full path, not just the path on the root. /phpESP/admin/manage.php's Line 105 Col 32's $ESPCONFIG['js_url'] should contain the full path not the root path perhaps because the esp_where function in Line 98 is undefined. This issue may be related to 1241273. ---------------------------------------------------------------------- >Comment By: Richard Chen (richardc020) Date: 2005-12-06 00:23 Message: Logged In: YES user_id=806592 My solution is to make admin/phpESP.ini.php's Line 23 $ESPCONFIG['base_url'] = $ESPCONFIG['proto'] . $_SERVER['HTTP_HOST'] . str_replace(basename($_SERVER['PHP_SELF']), '', $_SERVER['PHP_SELF']); instead to make $ESPCONFIG['base_url'] the full directory path not just the hostname and "/phpESP/". Not all surveys are installed at http://hostname/phpESP/index.php ---------------------------------------------------------------------- Comment By: Matthew Gregg (greggmc) Date: 2005-12-05 21:54 Message: Logged In: YES user_id=14116 The default phpESP.ini will not work for everyone. Since you're installation has files moved around, it is expected that manual configuration of phpESP.ini will need to be done to make sure all the paths are pointing to the correct locations. ---------------------------------------------------------------------- Comment By: Richard Chen (richardc020) Date: 2005-12-05 21:34 Message: Logged In: YES user_id=806592 These examples below are in 1.7.5. I've not edited any of http://voxel.dl.sourceforge.net/sourceforge/phpesp/phpESP-1.7.5.tar.gz's original files. I read admin/phpESP.ini.php Line 35 and Line 23 for those 2 lines, but I'll give examples of my problem. Without giving away my private URL, my $ESPCONFIG['base_url'] contains "http://hostname/". When used in admin/manage.php Line 105, that makes the src="http://hostname/phpESP/default.js". It should instead point to http://hostname/level1/level2/phpESP/js/default.js. Therefore, $ESPCONFIG['base_url'] lacks the pathname (the directories, since my survey isn't on the hostname's root folder. The same reason underlies why the 5 "tabbed" images ("General", "Questions", "Order", "Preview", and "Finish") are broken images. They're hotlinked to http://hostname/phpESP/images/filename.gif instead of to http://hostname/level1/level2/phpESP/images/filename.gif. ---------------------------------------------------------------------- Comment By: Matthew Gregg (greggmc) Date: 2005-12-05 20:01 Message: Logged In: YES user_id=14116 By default the Javascript link in phpESP.ini is: $ESPCONFIG['js_url'] = $ESPCONFIG['base_url'] . 'js/'; Where $ESPCONFIG['base_url'] is: $ESPCONFIG['base_url'] = $ESPCONFIG['proto'] . $server['HTTP_HOST'] . '/phpESP/'; This works for the majority of people. Perhaps your phpESP.ini has been edited in a way that has broken this? ---------------------------------------------------------------------- Comment By: Richard Chen (richardc020) Date: 2005-12-05 19:47 Message: Logged In: YES user_id=806592 The error is that admin/phpESP.ini.php's Line 35's $ESPCONFIG['base_url'] contains my http://hostname/ part only instead of the whole http://hostname/pathname/phpESP/filename so that the .js referred to in /phpESP/admin/manage.php's Line 105 points to http://hostname/phpESP/default.js instead of http://hostname/pathname/phpESP/js/default.js as it should. ---------------------------------------------------------------------- Comment By: Matthew Gregg (greggmc) Date: 2005-12-05 09:30 Message: Logged In: YES user_id=14116 I'm not sure I understand your bug. I agree that the JS for surveys should come from the public url path. I've added an additional variable to phpESP.ini in CVS and moved the "public" JS to phpESP/public/js/default.js and the "managment" JS path will remain the same. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108956&aid=1373224&group_id=8956 |