We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7923
    • 4,213 Posts
    take the extra space out of the &embedtype parameter value


      "He can have a lollipop any time he wants to. That's what it means to be a programmer."
      • 4749
      • 623 Posts
      OK, I actually caught that about two hours after I asked. Removing the space caused the scripts to load like I was hoping, but still no images. I was thinking it had to be something simple, but it didn’t work out huh

      In the source all the code seems to be there except for the code for the <a href> and <img>. I can’t figure this one out.
        The MODx has you...
        Utah Web Design
        • 4749
        • 623 Posts
        So, when I get the manage pictures button to show up. I can see the pictures are in the database, but they don’t show up. I will then try to manage the gallery. I make a small change, click "Save Changes" and "Resynch Gallery" but to no avail. Nothing shows up in the source. Then when I click "Back to Normal View" I get this error:

        « MODx Parse Error »
        MODx encountered the following error while attempting to parse the requested resource:
        « `[+id+]` is not numeric and may not be passed to makeUrl() »

        Parser timing
        MySQL: 0.0058 s (4 Requests)
        PHP: 0.0325 s
        Total: 0.0383 s

        Anyone have any ideas?
          The MODx has you...
          Utah Web Design
          • 7923
          • 4,213 Posts
          It seems that it’s not parsing the Ditto chunk at all times.. Try different caching settings, eg.

          Document cached with uncached Ditto call and cached maxigallery call in the chunk
          Document uncached with cached Ditto call and uncached maxigallery call in the chunk
          Document uncached with uncached Ditto call and cached maxigallery call in the chunk
          Document uncached with uncached Ditto call and uncached maxigallery call in the chunk

          There has been some bugs when PHx is used and this type of snippet setup is used that in some case all the calls are not parsed correctly.

          The issue that the image tags are in source code but do not show up in your page is a CSS problem. Try to use webdeveloper toolbar or firebug in firefox to figure out what’s wrong..


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 4749
            • 623 Posts
            Sorry Doze. What I was trying to say is that all the code is there EXCEPT the <a href> and <img> tags. They don’t show up on the rendered page or the source code. They’re non-existent.
              The MODx has you...
              Utah Web Design
              • 7923
              • 4,213 Posts
              In your services pages, the <a href> tags are in fact in the source, but <img> tags are not, and this is why the pictures do not show up:

              1. You have "display:none;" in "#tabs #data div" block in your site css file. The gallery is under this div.
              2. You have a javascript that is run when tabs are changed what hides all divs under the "tabs" container div (hideAllData) and then it brings some elements back to visible, but not all the divs that it hides. MaxiGallery thumbnails are wrapped in to a div element, so it’s hidden all the time because of that javascript. You need to make that better so that it hides only known elements and then brings them back when needed, do not hide all divs..


              function hideAllData() {
              oData = document.getElementById(’data’);
              oDivs = oData.getElementsByTagName(’DIV’);

              for (i = 0; i < oDivs.length; i++) {
              oDivs[i].style.display = ’none’;
              }
              }

              function doShow(o, pageId) {
              hideAllData();
              navAllInactive();
              o.className = ’active’;
              oData = document.getElementById(pageId);
              oData.style.display = ’block’;

              return false;
              }

              3. You had some custom templates in the MaxiGallery call &galleryPictureTpl and &galleryOuterTpl where the <img> tag was hidden.. you had probably copied the call what you did for another page from this guide. Also you were missing and ending ` from the &view_gallery parameter and you had both &view_gallery and &gal_query_ids parameters in the same call what disabled the manage button (because queried galleries cannot be managed). Etc..

              I changed the MaxiGallery calls, but you must fix those two above issues too.

              EDIT: and for the issue that the picture management does not work or you see the pictures in double when managing in the "portfolio" pages, that happens because you have two gallery calls on the document, but no &manage_target parameter.. so you need to add the &manage_target parameter to the call that render the pictures (first one).


                "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                • 4749
                • 623 Posts
                doze,
                You’re amazing! I don’t know what you did, but I got it working the way I wanted finally. The templates you removed were there to modify the default styling of MG. So, I put them back in, but I modified them a tiny bit. And Viola! It works exactly the way I wanted it to. I guess missing a back tick (`) or having conflicting parameters really stifled me this time. I knew having another set of eyes would help. When you fixed the MG call, I went into the source and saw what you were saying. Here’s what happened:

                SOLUTION:
                The javascript I had was telling all <div> tags to be hidden except for the one that was active. So, when MG put the <div class="thumbcontainer"> in there it was hiding all the content in that div too! That’s the reason I had the custom &galleryPictureTpl was to eliminate the <div> tags inside the tab that was active. Now, my custom templates don’t have any <div> tags and all is well. In sum, it was the CSS, but it wasn’t at the same time. I had already accounted for that problem, but I forgot the back tick and that messed up the MG call. Anyway, I’m very, very pleased. Doze, you are the best! Thanks for your patience and all of the help you provided. The ModX community is truly tops!
                  The MODx has you...
                  Utah Web Design