We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23299
    • 1,161 Posts
    Hi All,

    More newby problems: I can’t get MaxiGallery installed...

    I get the following error message when previewing the page:

    « MODx Parse Error »

    MODx encountered the following error while attempting to parse the requested resource:
    « PHP Parse Error »

    PHP error debug
    Error: Unknown(/Applications/MAMP/htdocs/modx-cruiserheads/assets/snippets/maxigallery/maxigallery.php): failed to open stream: No such file or directory
    Error type/ Nr.: Warning - 2
    File: /Applications/MAMP/htdocs/modx-cruiserheads/manager/includes/document.parser.class.inc.php(769) : eval()’d code
    Line: 76

    Parser timing
    MySQL: 0.0035 s (3 Requests)
    PHP: 0.0881 s
    Total: 0.0916 s


    I had a tough time following the instructions for MaxiGallery:

    Reading the following is confusing: Once I download the MaxiGallery folder then which folder goes where? This is for a MODX already installed locally using MAMP. Step 2 says to got the installation folder but that folder is gone? I am really confused with step 4.

    Installation is pretty straight forward:
    1. Extract the contents of the zip file to your computer
    2. FTP to your server an go to the modx installation folder
    3. Put the assets folder to the site root and the files will go to correct place
    4. Make the assets/galleries/ folder writable (CHMOD 777 unless you are in phpSuExec environment, in that case 755)
    5. Close your FTP program and go to the MODx manager
    6. Create a new snippet called "MaxiGallery" and paste the contents of maxigallery.txt to it
    7. Call the snippet on some document, check the available parameters at MODx Wiki.
    8. Go to the page that has the snippet call and you should see "Manage pictures" -button in there.
    note that you must be logged into the manager and have rights to edit the document (unless you have defined webusers/groups who can manage the callery and you are logged in at front-end)
    9. Upload some images to the gallery and see the results.

    Anyone have step by step install (hopefully written in simple English?)

    Thanks!
      • 23299
      • 1,161 Posts
      I have tried looking for solutions to this but no luck yet.

      The MODx install has its own assets folder. So does the MaxiGallery folder once it is unzipped on my desktop after downloading. The MaxiGallery assets folder has two folders, one called galleries and once called snippets. But then MODx folder also has a snippets folder. Does this mean I should extract the goodies from each of the MaxiGallery folders and place them into the corresponding MODx folders? Or does the entire Maxigallery folder go somewhere? I have read the instructions like six times and I can’t figure it out.

      MODx seems so great in many ways. Clearly written "how to" documentation is not one of them...

      I need a beer...
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        2. the MODx installation folder is where your MODx installation is. In your case, that’s modx-cruiserheads.

        4. Create a folder in your assets folder named "galleries", and make sure it’s writable by php. 777 means everybody has read/write access, 755 means only the owner has write access. You shouldn’t have to worry about it, MAMP works fine as it is.

        I’ve found that on a Mac just drag/dropping the assets folder from the archive will not work (it tends to overwrite the whole assets folder). Just go into the archive’s assets/snippets folder and drag the maxigallery folder into your site’s assets/snippets folder.
          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
          • 23299
          • 1,161 Posts
          Susan,

          Thanks for shedding light on #’s 2 & 4!

          I added a galleries folder to the installation assets folder. I then placed the downloaded MaxiGallery folder into the installation snippets folder. I created a snippet called MaxiGallery. I then added this to the document I am hoping to see the MaxiGallery in: [[MaxiGallery]]

          When I preview the document I get this message in the browser...

          « MODx Parse Error »

          MODx encountered the following error while attempting to parse the requested resource:
          « PHP Parse Error »

          PHP error debug
            Error: Unknown(/Applications/MAMP/htdocs/modx-cruiserheads/assets/snippets/maxigallery/maxigallery.php): failed to open stream: No such file or directory
            Error type/ Nr.: Warning - 2
            File: /Applications/MAMP/htdocs/modx-cruiserheads/manager/includes/document.parser.class.inc.php(769) : eval()’d code
            Line: 76

          Parser timing
            MySQL: 0.0030 s (3 Requests)
            PHP: 0.0858 s
            Total: 0.0888 s


          Any ideas from here?

          If I remove the [[MaxiGallery]] from the document it will then render the page just fine...

          Thanks!
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            That means it can’t find its files. Double-check to make sure the file is exactly where it says it’s looking for it, and make sure that the folder/files are readable.

            /Applications/MAMP/htdocs/modx-cruiserheads/assets/snippets/maxigallery/maxigallery.php
              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
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Ok, I just installed it in my MAMP installation.

              1. Unzip the archive.
              2. Navigate into the resulting folder to its assets/snippets folder and copy/paste or drag the maxigallery folder to my MODx installation’s assets/snippets folder.
              3. Navigate back out to the MaxiGallery folder and open the maxigallery.txt file, then copy/paste its content into a new snippet in the Manager.
              4. Create the assets/galleries folder.
              5. Put [!MaxiGallery!] in a document’s content.

              And I have the button to Manage Pictures on that page.

              I think you copied the whole unarchived folder with its assets/snippets folder to your own assets/snippets folder.

              The confusion here is because on a Mac, if you drag or copy the assets folder from the archive into the MODx installation’s root in Finder, it replaces the existing assets folder, so you have to go into it and only take the folders you want and put them exactly where you want them. If you’re uploading with FTP, it only adds what isn’t already there, or overwrites older versions with newer versions of what is there. It leaves everything else alone.

              Even if you use a terminal command line, cd into the unarchived MaxiGallery folder, and
              cp -R assets /Applications/MAMP/htdocs/modx
              it nicely copies just what you want and doesn’t overwrite everything else.
                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
                • 23299
                • 1,161 Posts
                Susan,

                That worked! I now get the "Manage Pictures" button like you have.

                I don’t know if your instructions were more Mac friendly but they sure were a LOT easier to read and follow: took ten seconds...

                Thank you so much. I am tired and I think I will quit while I am ahead...

                Max
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  Glad to help a fellow Mac user grin

                  Just make sure to call the snippet uncached ( [!MaxiGallery!] ) or the forms won’t work!
                    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