We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30223
    • 1,010 Posts
    I haven’t come across this before. 

    user1 is part of SnrEditor group, SnrEditor group is linked with protectedDocGroup
    user2 is part of no group at all.

    I have a parent document which is placed in protectedDocGroup with several children documents which are public. user2 can edit the child document. He can duplicate the child document and he can delete them. However he can not create new documents within that parent. I can understand this although it is inconsistent as there are ways open to him to create new document within the protected folder.

    The issue is however that when creating a new document in the protected folder an error occurs instead of a getting a message that he lacks teh permissions:

    « 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; check the manual that corresponds to your MySQL server version for the right syntax to use near ’AND sc.deleted=0 ) AND (1=’4’ OR sc.privatemgr=0) ’ at line 3 »
          SQL: SELECT DISTINCT sc.* FROM `modx0963`.`cms_site_content` sc LEFT JOIN `modx0963`.`cms_document_groups` dg on dg.document = sc.id WHERE (sc.id IN (9) AND sc.published= AND sc.deleted=0 ) AND (1=’4’ OR sc.privatemgr=0) GROUP BY sc.id LIMIT 1
          [Copy SQL to ClipBoard]

    EDIT: Oops, sorry this is in modx 0.9.6.3, mysql 5.0.45, php 5.2.5 apache 2.2.6
      • 36416
      • 589 Posts
      Quote from: TobyL at Feb 09, 2009, 07:27 AM

      The issue is however that when creating a new document in the protected folder an error occurs instead of a getting a message that he lacks teh permissions:

      Yeah, one of the editors here just told me about the same problem, and sure - there is similar error recorded in System Events log.
      Still investigating where SQL syntax error (published value empty in where clause) is coming from...
        • 36416
        • 589 Posts
        Quote from: TobyL at Feb 09, 2009, 07:27 AM

        EDIT: Oops, sorry this is in modx 0.9.6.3, mysql 5.0.45, php 5.2.5 apache 2.2.6

        Your site is probably using Inherit Selected Template plugin?
          • 30223
          • 1,010 Posts
          Nope, I am not. It’s a pretty straight forward install with only a minimal set of plugins.

          Dooh,... Yes I am and indeed disabling it get’s rid of the error although sadly I can’t create documents sad but that’s another matter. I’ll look into the plugin code later when I have more time.
            • 30223
            • 1,010 Posts
            Ok, one problem solved. New release of Inherit Selected Template

              • 1526
              • 72 Posts
              Sorry to post here, but I couln't reach the "Discuss Extra" from the "Inherit Selected Template 0.2.0" page.
              This is a feature request:
              I would like to have the "template variable" showing up in the "Settings" tab of the document, instead than the "General" tab.
              This would let the editors less prone to error.
              Thank you
                MODx evo 1.5~1.6 ✪ Apache v 2.2.22 ✪ PHP v 5.3.10 ✪ MySQL v 5.1.61
                <°'iiii);