peebee,
You are correct. In my case, it stems from an ajax provider script in hooks that necessarily includes the AppGini files.
The error is triggered by datepicker.js (well, the packed version) starting at at line 35:
Code: Select all
// Load the appropriate language file
var scriptFiles = document.getElementsByTagName('head')[0].getElementsByTagName('script');
var loc = scriptFiles[scriptFiles.length - 1].src.substr(0, scriptFiles[scriptFiles.length - 1].src.lastIndexOf("/")) + "/resources/datepicker/js/lang/" + datePicker.languageinfo + ".js";
var script = document.createElement('script');
script.type = "text/javascript";
script.src = loc;
The way var loc is created, it references the folder where the parent (the php script) runs from. As you note, the resources folder is in the parent of hooks, so if you're loading AppGini files from hooks there is an uncaught variation in the path.
I suppose the datepicker code could be modified to check the last element of the derived path, and if it is hooks, then alter the path. Or, walk up the path until it finds the parent of 'resources/datepicker'. Either of those is probably the best long-term solution, and something for Ahmad to implement in the core package.
Meanwhile, if you're running a linux/unix host, there is a code-free solution. I have not tested this, but it should work.
Code: Select all
cd {app_root}/hooks
ln -s ../resources resources
You can also do this on a Windows host that supports mklink.