<!-- Start QuickEdit headers --> <script type="text/javascript" src="{$manager_path}media/script/scriptaculous/prototype.js"></script> <script type="text/javascript" src="{$qe_path}/javascript/Cookie.js"></script> <script type="text/javascript" src="{$qe_path}/javascript/Drag.js"></script> <script type="text/javascript" src="{$qe_path}/javascript/moo.fx.js"></script> <script type="text/javascript" src="{$qe_path}/javascript/QuickEdit.js"></script> <link type="text/css" rel="stylesheet" href="/{$qe_path}/styles/toolbar.css" /> <!-- End QuickEdit headers -->
Just a quick question, why does the relative paths in output.class.inc.php call the javascript libraries without a forward slash?
Quote from: djhomeless at Mar 24, 2007, 10:59 PM
Just a quick question, why does the relative paths in output.class.inc.php call the javascript libraries without a forward slash?
What if I installed MODx in a sub-folder? I’m guessing that you configured MODx to use friendly URLs, because, otherwise, all your files would be served from the one and only index.php. Your problem has been documented and you simply need to add a <base href="http://www.mysite.com/"> tag in the head of your templates and everything should work A1.
Getting back to the main issue:
I have taken out the "{$qe_path}/javascript/" and replaced it with "/assets/modules/quick_edit/javascript/" and it works when FURL’s etc are activated. But there is a drawback, when im working localy and dont have FURL’s activated it doesnt work. So now ive got 2 documents one for local work and one for using on the live site.
So if there is a better workaround / dynamic workaround other than using <base href="[(site_url)]" /> or my solution then that would be great.
<!-- Start QuickEdit headers --> <script type="text/javascript" src="{$manager_path}media/script/scriptaculous/prototype.js"></script> <script type="text/javascript" src="{$modx->config['base_url']}{$qe_path}/javascript/Cookie.js"></script> <script type="text/javascript" src="{$modx->config['base_url']}{$qe_path}/javascript/Drag.js"></script> <script type="text/javascript" src="{$modx->config['base_url']}{$qe_path}/javascript/moo.fx.js"></script> <script type="text/javascript" src="{$modx->config['base_url']}{$qe_path}/javascript/QuickEdit.js"></script> <link type="text/css" rel="stylesheet" href="{$modx->config['base_url']}{$qe_path}/styles/toolbar.css" /> <!-- End QuickEdit headers -->
so, to sum it up: open file "assets/modules/quick_edit/output.class.inc.php" and go to line 230 and replace it with this:
<!-- Start QuickEdit headers --> <script type="text/javascript" src="{$manager_path}media/script/scriptaculous/prototype.js"></script> <script type="text/javascript" src="{$modx->config['base_url']}{$qe_path}/javascript/Cookie.js"></script> <script type="text/javascript" src="{$modx->config['base_url']}{$qe_path}/javascript/Drag.js"></script> <script type="text/javascript" src="{$modx->config['base_url']}{$qe_path}/javascript/moo.fx.js"></script> <script type="text/javascript" src="{$modx->config['base_url']}{$qe_path}/javascript/QuickEdit.js"></script> <link type="text/css" rel="stylesheet" href="{$modx->config['base_url']}{$qe_path}/styles/toolbar.css" /> <!-- End QuickEdit headers -->
<!-- Start QuickEdit headers --> <script type="text/javascript" src="{$manager_path}/media/script/scriptaculous/prototype.js"></script> <script type="text/javascript" src="/{$qe_path}/javascript/Cookie.js"></script> <script type="text/javascript" src="/{$qe_path}/javascript/Drag.js"></script> <script type="text/javascript" src="/{$qe_path}/javascript/moo.fx.js"></script> <script type="text/javascript" src="/{$qe_path}/javascript/QuickEdit.js"></script> <link type="text/css" rel="stylesheet" href="/{$qe_path}/styles/toolbar.css" /> <!-- End QuickEdit headers -->
If you add a base href to your template head, all problems should be solved. The base_url has been removed for the next release.
The output without <base href="[(site_url)]" /> :
DOMAINNAME.com/FILE.php#ANCHOR
The output with <base href="[(site_url)]" />:
DOMAINNAME.com/#ANCHOR