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

    I’ve spent quite a few hours trying to get this to work but am about to give up. I’ve searched the forums and the only thing I see about this has to do with www.xyz.com vs xyz.com I’ve been very careful to make sure that I log into the backend manager as www.xyz.com and then view the particular page as www.xyz.com/page
    (and this seems to work correctly as if I leave out the www then I do not get quickedit links on that page).

    I’ve tried this also with no page template on the gallery call page; I’ve also tried a number of different calls, all of them either from the maxigallery page or these forums yet never do I get the upload.

    I’ve also tried this from IE, Safari and Firefox.

    I’m probably being a blockhead, but I really don’t have a clue what to look at next.

    Thanks
      • 7923
      • 4,213 Posts
      Have you tried just [!MaxiGallery!] ?

      And have you checked that the cases are ok in the snippet name, eg. if you have saved it with "maxigallery" and not "MaxiGallery".

      Also, enter the calls with editor set to "none" in MODx manager to be sure that the snippet call isn’t malformed some way by the RTE.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 3024
        • 6 Posts
        Yes, cases match up and I have also put it in without editor. I’ve also tried enclosing it in its only div tags.
        zilch. In addition, I’ve gone to the actual php file, maxigallery.php, added the line

        echo "HELLO WORLD";

        and that does indeed print when the page in question is refreshed so the call is being made, I’m just
        getting nothing back as far as the upload stuff.
          • 7923
          • 4,213 Posts
          What modx version are you using? There has been some fixes to the document permissions checking in newest MODx versions.

          You can find the permission checking function from maxigallery class file, somehow it thinks that you do not have edit permissions for the document and does not give you rights to upload pictures.


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 3024
            • 6 Posts
            0.9.6.3 is the version. ive played around a little bit just trying to find where im getting booted. I preface this with the fact I’m not very skilled in php and certainly not in the internals of modx or this snippet. However, from the maxigallery.php code, around about line 288:

            if($mg->checkPermissions($_SESSION['mgrInternalKey'],$mg->pageinfo['id'])) {
                    if($_REQUEST['mode']=="admin" || ($mg->mgconfig['manage_gallery']!="" && $mg->mgconfig['manage_target']=="")) {
            


            I make it past the first if, but not the second. $_REQUEST[’mode’] appears to come back empty.

            Further, from the maxigallery.class.inc.php

                    //function to check access permissions, fix provided by TobyL
                    function checkPermissions($userid,$docid){
                            global $modx;
                            if($userid) {
                                    //if user is logged in from backend, check user-document permissions
                                    include_once $modx->config['base_path'].'manager/processors/user_documents_permissions.class.php';
                            $udperms = new udperms();
                            $udperms->user = $userid;
                            $udperms->document = $docid;
                            $udperms->role = $_SESSION['mgrRole'];
                            if ($udperms->checkPermissions()) {           <------ I can make it here (twice it goes here in fact)
                                    return true;
                            }
            


            which seems to indicate I have the proper permission? I’m really at a loss now.
            if you have a suggestion on something to add to the code for debuggin purposes, please let me know. Speaking of that, I added the &debug to the MaxiGallery call and it seems to be outputing the debug code for the thumbnail section which makes sense if its not treating me as a privledged user.

            Cheers
              • 3024
              • 6 Posts
              just for good orders sake, I never did figure out why it would not work. I’ve instead gone with a shockwave based photoviewer which seems to be working well enough for my light needs. Hopefully if there was a bug it will all get sorted out in the next release.