We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21112
    • 156 Posts
    I feel like a fool, but no matter what I do, MaxiGallery simply won’t appear on my site. I followed the instructions on "creating your first gallery" on the wiki. This is an excellent guide by the way, without it, I’d have been lost with the minimal instruction that came with the files.

    When I visit the page with the MaxiGallery snippet, it is simply just empty. The content area is blank, and there is no code whatsoever in the source, only a few blank lines. Since I followed the instructions as closely as I could, twice, I don’t know where to start looking for a solution.

    My snipet code is unmodified from the source, my snippet calls are exactly as described in the tutorial, so there isn’t really any code I can paste.

    Here’s the page the snippet is called from: http://www.vicphysics.org/gallery.html This is the subpage as described in the tutorial: http://www.vicphysics.org/gallery1.html

    I have had called the AjaxSearch snippet at one stage, but I disabled that in case there was a conflict. I’m using Wayfinder to build the menu and DateTime to display the date. I have SMF installed, as well as the bridge module, but whether I’m logged in or not makes no difference. The template is all done with positioned CSS, called from a .css file.

    This is my template:

    <!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" />
    <link rel="stylesheet" href="stylenew.css" type="text/css" media="screen" />
    <link rel="stylesheet" type="text/css" href="flyout.css" />
    <link rel="stylesheet" type="text/css" href="flyout_ie.css" />
    </head>
    
    <body>
    
    <div id="main">
    <div id="header">
    <div id="headtop">
    <p style="position:absolute; top:20px; right:10px;"><a href="[~1~]">Back to Main Page</a>    |    <a href="[~11~]">About Us</a>    |    <a href="[~12~]">Community</a>    |    <a href="[~13~]">RSS Feeds</a>    |    <a href="[~14~]">Log In</a></p>
    </div>
    <img src="images/header-banner.jpg" />
    <div id="headbot">
    <p id="communitydatetime">[[DateTime? &format=`%b %d`]]</p>
    </div>
    </div>
    <div id="body">
    
    <div id="leftcol">
    [[Wayfinder? &startId=`0` &level=`3` &parentClass=`hide` &parentRowTpl=`cssplay_parentRow` &outerTpl=`cssplay_outer` &innerTpl=`cssplay_inner` &rowTpl=`cssplay_row` &outerClass=`menu` &cssTpl=`cssplay_flyout`]]
    <br clear="all"  />
    
    </div>
    
    <div id="content">
    [*content*]
    </div>
    
    <br clear="all" />
    </div>
    <div id="footer"><p id="footerlinks"><a href="[~24~]">Disclaimer</a> | <a href="[~25~]">Privacy Policy</a> | <a href="[~26~]">Contact Us</a> | <a href="http://www.vicphysics.org/forums">Forum</a> | <a href="[~3~]">Events</a> | <a href="[~4~]">Teachers</a> | <a href="[~5~]">Students</a> | <a href="[~6~]">Careers</a> | <a href="[~7~]">Links</a> | <a href="[~8~]">News</a></p>
    <p id="footertext">All content on this page Copyright AIP 2000-2007. Documents provided on this site are for reference only. Every effort is made to ensure that all material is accurate at time of publishing, however AIP is not responsible for any loss incurred through use of or reliance upon materials provided. Links outside this site are not under the control of the AIP and thus AIP cannot be held responsible for their content. If you have any questions, please email Dan O'Keeffe at <a href="mailto:[email protected]">[email protected]</a>. Site design by <a href="http://www.orionvisuals.com" target="top">Orion Visuals</a>.</p>
    </div>
    </div>
    
    </body>
    </html>


    I can’t think of naything else to add, please let me know if there’s anything else I can give you to help solve the problem. I’m completely stumped!

    Thanks for your help.
      • 7923
      • 4,213 Posts
      Make sure that you have spelled the snippet name correctly in the snippet call. The names are case sensitive. Also see that the snippet call is on one line and that the RTE has not messed up the call.

      What you should see in the newly created gallery documents is a "manage pictures" button when you are logged in and nothing more. To try out that is MaxiGallery even running, you can temporarily add this to the snippet call &galleryOuterTpl=`@CODE:hello` and you should see "hello" on the page if MaxiGallery is running. If you see that, but not the manage pictures button, it means that you don’t somehow have rights to manage the gallery. If you don’t see that, it means that MaxiGallery isn’t running at all. Then you have probably installed it wrong, spelled the snippet name incorrectly, or have something wrong with the snippet call.

      Start with the simplest snippet call first [!MaxiGallery!]


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 21112
        • 156 Posts
        Thanks for the reply.

        In order:
        - I triple checked the spellign and case, all good.
        - I don’t use the RTE - raw code all the way for me! smiley
        - I tried adding the "hello" pref to the snippet call, nothing.
        - To be sure I downloaded MaxiGallery again and uploaded all the files and double checked the permissions.
        - I re-pasted the snippet code from the text file in the download.
        - Still not working, "hello" still not displaying.
        - Tried again with the basic call, no luck.

        I’m really getting scared that I’ve done something inanely stupid and I just cant see what or where... I’ve gone over the instructions step by step at least five times now, and I can’t see where I’m going wrong.

        Any more suggestions?
          • 7923
          • 4,213 Posts
          Hmm.. sounds odd.. Well, if you replace the content of MaxiGallery snippet in MODx manager with just <?php return "hello"; ?> and see the page, then it should definitely show that "hello" string on the page. If that works, then something in MaxiGallery code is not working for you.. In that case, you could see the MODx error log to see if there’s some parse error.

          Or you can do those in the reversed order, first check the error log in MODx manager..



            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 21112
            • 156 Posts
            Please excuse my ignorance, but I searched the manager, documentation and forums, but I can’t see where the MODx error log is. Could you point me to it please?

            Replacing the MaxiGallery code with <?php return "hello"; ?> worked. The page shows the text "hello". I’ll let you know what I find in the error log, once I find it smiley
              • 7923
              • 4,213 Posts
              Reports > System events


                "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                • 21112
                • 156 Posts
                Thanks for that. I restored the MaxiGallery snippet to it’s original state and visited the page with the snippet call. Nothing appears once again, and when i check the error log, there are no entries at all.

                Perhaps I need to share my login information with someone who knows better than I to do take a look around?
                  • 7923
                  • 4,213 Posts
                  You can send the login information to me via PM and I’ll take a peek..


                    "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                    • 26876
                    • 12 Posts
                    I came across this post because I couldn’t get MaxiGallery to work either, with also not showing anything.

                    In my case, I traced it back to the following: I used a Snippet that creates a database connection to another database. Now, MODx document parser handles this poorly but I noticed that MaxiGallery didn’t work either because of this. Disabling the Snippet in question brought MaxiGallery back to life.

                    Partial reason in MaxiGallery can be lead to the use of a raw mysql_query function on line 241 in maxigallery.php, using the last created database connection instead of the one that MODx uses ($modx->db->query).

                    Hope this helps.
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      That’s right, MaxiGallery or any other snippet that makes calls to the database will fail if the last opened database was a foreign database. I’ve had occasion to query foreign databases, and always had to be very careful to close it and re-open the MODx database when I was finished with the query.
                        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