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

    When logging in as Administrator QuickEdit works perfect.

    But when I log in as a User (that should have enough permissions to edit the document) and click on the quickedit button next to the main content then I get the following error in the popup window:

    « MODx Parse Error »
    MODx encountered the following error while attempting to parse the requested resource:
    « Execution of a query to the database failed - You have an error in your SQL syntax near ’)) LIMIT 1 ’ at line 4 »
    SQL: SELECT DISTINCT sc.* FROM `netsolutioncms`.modx_site_content sc LEFT JOIN `netsolutioncms`.modx_document_groups dg on dg.document = sc.id WHERE (sc.id IN (41) AND sc.published=1 AND sc.deleted=0 ) AND (1=’2’ OR sc.privatemgr=0 OR dg.document_group IN (,)) LIMIT 1
    [Copy SQL to ClipBoard]


    What could be the problem?

    Thanks,

    Anand


      • 1764
      • 680 Posts
      Hmmm, looks like it’s having a problem pulling in your document groups. I’ll try to test some of this and see if I can figure out what the problem is. I assume you’re running MODx version 0.9?
        • 1448
        • 15 Posts
        Yes, it’s the most recent version.

        Looking forward to your ideas!

        Thanks,
        Anand
          • 1764
          • 680 Posts
          I’ve messed around quite a bit and havn’t been able to reproduce the problem you’re having. However, I’m working off of a pre-release version of 0.9.1 and I searched through the code and didn’t find a reference to the SQL that you are using anywhere that QuickEdit would use it so I have a feeling that your problem has already been fixed in the 0.9.1 release.

          If you like you can PM or email me a login for your site and I can give it a look.
            • 1448
            • 15 Posts
            Hello,

            I use the ManagerLogin snippet from

            http://modxcms.com/forums/index.php/topic,697.0.html

            Maybe this is part of the problem?

            Thanks,
            Anand
              • 1764
              • 680 Posts
              If it’s logging you in so you can edit fine through the backend then it shouldn’t be an issue. I’ll try to look through 0.9.0 and see if I can figure out where the problem is happening.
                • 1448
                • 15 Posts
                OK, thanks - I hope you find something.

                Some additional information: this is the url of the pop up window (that is displayed after clicking the "edit content" button):

                http://www.url.com/manager/index.php?a=112&id=1&doc=41&var=content



                  • 1448
                  • 15 Posts
                  I’ve done some more testing.

                  It seems that the ManagerLogin snippet is not working properly.

                  I can log in with the snippet, but when I change to the manager afterwards there is no username displayed on the top right corner and also when I choose Home >> Info the "You are logged in as:" is empty.

                  So no wonder QuickEdit does not work (because it works on public documents after logging in, but not on documents belonging to the document group the user group has access to).

                  So the question is now where is the problem with the ManagerLogin snippet (or do I better ask that somewhere else?)

                  Thanks,
                  A
                    • 1764
                    • 680 Posts
                    I wrote the manager login snippet a long time ago for an older version of MODx. I guess it’s time to go through it again. I’ll be using it quite a bit soon for a MODx conversion I’m working on now. So I’ll probably have it updated soon.
                      • 1448
                      • 15 Posts
                      That would be great...

                      I tried to show this to someone today and it was a bit embarassing because it did not work and I thought I’ve set everything up correctly... I was lost...

                      How soon do you think you could do it?

                      Thanks
                      A