We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16450
    • 15 Posts
    A quick search of the forums didn’t reveal this as already being discussed, but hopefully I’m not duplicating ...

    I’ve got Friendly URLs turned on and using QuickEdit ... the problem occurs when I’m on a page that is a few dirs within the site. The problem is that it doesn’t find the CSS or JS files properly. QuickEdit works fine when it’s at the root of the site because including the files in the head are declared relative to the current page and *not* the root of the site. There is the config option in the Modules section; however that doesn’t work at all becuase that is relative to the server path (and not site path).

    To overcome this, I tweaked /modules/quick_edit/output.class.php lines 231 - 235:
    <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>
    


    Note the difference is adding "{$modx->config[’base_url’]}". I also edited line 257 with the same:
     var qe = new QuickEdit({$module_id},{$doc_id},'{$manager_path}','{$modx->config['base_url']}{$qe_path}',$('QE_Toolbar'));
    


    This is just a quick fix and might be good to have done it automagically - if it hasn’t been addressed yet.

    Or maybe there’s something I’m missing ...
      • 7923
      • 4,213 Posts
      This has been discussed in several threads and the "fix" is to use <base href="[(site_url)]"></base> in the head section of your template.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 16450
        • 15 Posts
        Quote from: doze at Mar 21, 2007, 05:54 PM

        This has been discussed in several threads and the "fix" is to use <base href="[(site_url)]"></base> in the head section of your template.

        Could you please direct me to such a thread?? Because searching on "friendly url quickedit", ... or "base href quickedit" doesn’t bring back anything intuitive ... or close to describing the solution involving friendly urls - since that was where i experience the problem.
          • 7923
          • 4,213 Posts


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 16450
            • 15 Posts
            Oh hey would you look at that. Odd that I don’t get any of those when I do a search ... no seriously, I’m not just saying that ...

            I’ll have to file away the acronym of "FURL" as well ... never thought of that.