We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29181
    • 480 Posts
    Nearly always when I create a new template, the Quick Edit bar at the top doesn’t display. The Edit content button appears like



    What do I need to embed into the template to get them to appear properly?

    I copied the header from one of the preinstalled templates, hoping that would resolve the problem so it looks like:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>[(site_name)] | [*pagetitle*]</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <base href="[(site_url)]" />
    <script src="[(base_url)]manager/media/script/scriptaculous/prototype.js" type="text/javascript"></script>
    <script src="[(base_url)]manager/media/script/scriptaculous/scriptaculous.js" type="text/javascript"></script>
    <link href="[(base_url)]assets/templates/rf/rf.css" rel="stylesheet" type="text/css">
    <script src="[(base_url)]manager/media/script/scriptaculous/prototype.js" type="text/javascript"></script>
    <script src="[(base_url)]manager/media/script/scriptaculous/scriptaculous.js" type="text/javascript"></script>
    <script type="text/javascript" src="[(base_url)]assets/templates/modxhost/moo.fx.js"></script>
    <script src="[(base_url)]assets/templates/modxhost/drop_down_menu.js" type="text/javascript"></script>


    without any success.

    Anyone have a solution please?

    Cheers,
    Taff
      Adrian Lawley: www.adrianlawley.com
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      The QuickEdit plugin will install its own javascript and CSS files just before the closing </head> tags. Your template has absolutely nothing to do with it.

      It looks as if the plugin’s files (assets/modules/quickedit) didn’t get uploaded properly. Try re-uploading just that folder.

      What does a "view source" show has been added to your template for the finished page? It should look something like this:

              
      <!-- Start QuickEdit headers -->
      <script type="text/javascript" src="/manager/media/script/scriptaculous/prototype.js"></script>
      <script type="text/javascript" src="assets/modules/quick_edit/javascript/Cookie.js"></script>
      <script type="text/javascript" src="assets/modules/quick_edit/javascript/Drag.js"></script>
      <script type="text/javascript" src="assets/modules/quick_edit/javascript/moo.fx.js"></script>
      <script type="text/javascript" src="assets/modules/quick_edit/javascript/QuickEdit.js"></script>
      <link type="text/css" rel="stylesheet" href="assets/modules/quick_edit/styles/toolbar.css" />
      <!-- End QuickEdit headers -->
      </head>
      <body>
      
      <!-- Start QuickEdit toolbar -->
      <div id="QE_Toolbar">
       <h1>QuickEdit</h1>
       <ul>
       <li>Content
        <ul>
         <li><a href="javascript: qe.open('content');" title="Edit Document content">Document content</a></li><li><a href="javascript: qe.open('description');" title="Edit You can enter an optional description of the document here.">Description</a></li><li><a href="javascript: qe.open('introtext');" title="Edit Type a brief summary of the document">Summary (introtext)</a></li><li><a href="javascript: qe.open('longtitle');" title="Edit Here you can enter a longer title for your document. This is handy for search engines, and might be more descriptive for your document.">Long title</a></li><li><a href="javascript: qe.open('pagetitle');" title="Edit Type the name/ title of the document here. Try to avoid using backslashes in the name!">Title</a></li>
      
        </ul>
       </li> <li>Settings
        <ul>
         <li><a id="QE_ShowLinks" class="checked" href="javascript:qe.toggleLinks();">Show links</a></li><li><a href="javascript: qe.open('alias');" title="Edit Here you can select an alias for this document. This will make the document accessible using:\n\nhttp://yourserver/alias\n\nThis only works if you're using friendly URLs.">Document's alias</a></li><li><a class="unchecked" href="javascript: qe.ajaxSave('cacheable', 'cacheable', '');" title="Edit Leaving this field checked will allow the document to be saved to cache. If your document contains snippets, make sure this field is unchecked.">Cacheable</a></li><li><a class="checked" href="javascript: qe.ajaxSave('hidemenu', 'hidemenu', '1');" title="Edit Select this option to show document inside a web menu. Please note that some Menu Builders might choose to ignore this option.">Show in menu</a></li><li><a href="javascript: qe.open('menuindex');" title="Edit Menu Index is a field you can use for sorting document in your menu snippet(s). You can also use it for any other purpose in your snippets.">Menu index</a></li><li><a href="javascript: qe.open('menutitle');" title="Edit Menu title is a field you can use to display a short title for the document inside your menu snippet(s) or modules.">Menu title</a></li><li><a class="unchecked" href="javascript: qe.ajaxSave('published', 'published', '');" title="Edit Check this field to have the document published immediately after saving it.">Published?</a></li><li><a class="unchecked" href="javascript: qe.ajaxSave('searchable', 'searchable', '');" title="Edit Checking this field will allow the document to be searched. You can also use this field for other purposes in your snippets.">Searchable</a></li><li><a href="javascript: qe.open('template');" title="Edit Here you can select which template the document uses.">Template</a></li>
      
        </ul>
       </li> <li>Go
        <ul>
         <li><a id="QE_Manager" href="/manager/">Manager</a></li><li><a id="QE_Help" href="http://www.modxcms.com/quickedit.html">Help</a></li><li><a id="QE_Logout" href="index.php?id=1&QuickEdit_logout=logout">Logout</a></li>
        </ul>
       </li>
       </ul>
      
      </div>
      <!-- End QuickEdit toolbar -->
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 29181
        • 480 Posts
        Firstly, thanks for answering.
        Hardly any of that is in my source code.

        <a href="#" onclick="javascript: qe.open('content'); return false;" title="Edit Document content" class="QE_Link">« Edit content</a>


        appears to be the only thing which is getting created that has anything to do with Quick edit. I reuploaded the quick_edit folder too.

        The funny thing is that it works for this site correctly if I use one of the templates that are shipped with the 095 files.

        Thanks for any more help you can offer. If you have the time I would be pleased to give you admin rights so you can look at the backend.

        Not sure if it makes any difference but the site is currently in a subdirectory.

        Cheers,
        Taff

        [UPDATE]The plot thickens...For the fun of it I duplicated the ModxCSS template, clicked on Edit and deleted everything out of the template and inserted the markup from the template which wasn’t displaying correctly...and it displays correctly. I’m lost as to why[/UPDATE]
          Adrian Lawley: www.adrianlawley.com
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Are you sure your template had a closing </head> tag? I’ve missed basic stuff like that before, and banged my head for hours trying to figure out what the problem was.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 29181
            • 480 Posts
            There was a head tag. I think the problem was something like a " missing thus not having closed a style attribute correctly. After redoing it line for line, it seems to be sorted. That’s what happens when you try to save 20 minutes by using the original template instead of rebuilding it...

            Thanks as always for your help Susan.

            Taff
              Adrian Lawley: www.adrianlawley.com
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Yeah, it’s usually a good idea to run your page through the W3C validator when it’s doing weird stuff. Although now Firefox shows most basic HTML errors in red in the View Source window, which is very handy.
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 29181
                • 480 Posts
                Yeah, I don’t know where I would be without that and the "View Style Information" in the Developers toolbar....good ol’ Firefox
                  Adrian Lawley: www.adrianlawley.com