We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38783
    • 571 Posts
    Thanks Bob
      If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

      email: [email protected] | website: https://andytough.com
      • 3749
      • 24,544 Posts
      Andy, could you go to System -> Access Control Lists and look on the Policy Templates tab. In the Template Group column, do you see the name 'Admin'?

        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 38783
        • 571 Posts
        After a fresh install of NewsPublisher on a site running 2.5.5 I have the following policy templates


        AdministratorTemplate
        Context administration policy template with all permissions.
        Admin
        174

        ContextTemplate
        Context Policy Template with all attributes.
        Object
        7

        ElementTemplate
        Element Policy Template with all attributes.
        Element
        9

        MediaSourceTemplate
        Media Source Policy Template with all attributes.
        MediaSource
        7

        NamespaceTemplate
        Namespace Policy Template with all attributes.
        Namespace
        3

        ObjectTemplate
        Object Policy Template with all attributes.
        Object
        5

        ResourceTemplate
        Resource Policy Template with all attributes.
        Resource
        14
          If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

          email: [email protected] | website: https://andytough.com
          • 38783
          • 571 Posts
          If I delete NewsPublisher 3 from the MODX 2.5.5 site and install newspublisher 2.1.0 I get these policy templates. But I do not get an upgrade option for newspublisher.


          AdministratorTemplate
          Context administration policy template with all permissions.
          Admin
          174

          ContextTemplate
          Context Policy Template with all attributes.
          Object
          7

          ElementTemplate
          Element Policy Template with all attributes.
          Element
          9

          MediaSourceTemplate
          Media Source Policy Template with all attributes.
          MediaSource
          7

          NamespaceTemplate
          Namespace Policy Template with all attributes.
          Namespace
          3

          NewsPublisherPolicyTemplate
          Administrator Access Policy Template extended by the 'allow_modx_tags' permission used by NewsPublisher
          Admin
          175

          ObjectTemplate
          Object Policy Template with all attributes.
          Object
          5

          ResourceTemplate
          Resource Policy Template with all attributes.
          Resource
          14
            If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

            email: [email protected] | website: https://andytough.com
            • 38783
            • 571 Posts
            Leaving the newspublisher 2.1.0 install in place, if I then do an install of NewsPublisher 3 I get the following installation log, which looks more promising.
            Console running...
            Attempting to install package with signature: newspublisher-3.0.3-pl
            Package found...now preparing to install.
            Grabbing package workspace...
            Workspace environment initiated, now installing package...
            Attempting to preserve files at /www/core/components/newspublisher into archive /www/core/packages/newspublisher-3.0.3-pl/modCategory/a2fde9c7f925eec5d716b6f5f2d9a428.0.preserved.zip
            Attempting to preserve files at /www/assets/components/newspublisher into archive /www/core/packages/newspublisher-3.0.3-pl/modCategory/a2fde9c7f925eec5d716b6f5f2d9a428.1.preserved.zip
            [Resource Resolver] Could not find parent: NewsPublisher
            [Resource Resolver] Could not find parent: NewsPublisher
            Setting template field for NewsPublisherEditor policy
            Setting template_group for NewsPublisherPolicyTemplate
            Could not set np_login_id System Settings; Set it manually to the ID of the Login page
            Successfully installed package newspublisher-3.0.3-pl


            I then have the following policy templates. (Identical to the previous list). I have not yet had time to test to see if the old NewsPublisherPolicyTemplate installed for version 2 actually works with version 3.


            AdministratorTemplate
            Context administration policy template with all permissions.
            Admin
            174

            ContextTemplate
            Context Policy Template with all attributes.
            Object
            7

            ElementTemplate
            Element Policy Template with all attributes.
            Element
            9

            MediaSourceTemplate
            Media Source Policy Template with all attributes.
            MediaSource
            7

            NamespaceTemplate
            Namespace Policy Template with all attributes.
            Namespace
            3

            NewsPublisherPolicyTemplate
            Administrator Access Policy Template extended by the 'allow_modx_tags' permission used by NewsPublisher
            Admin
            175

            ObjectTemplate
            Object Policy Template with all attributes.
            Object
            5

            ResourceTemplate
            Resource Policy Template with all attributes.
            Resource
            14
              If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

              email: [email protected] | website: https://andytough.com
              • 3749
              • 24,544 Posts
              I'm curious about how your Admin policy template get the ID of 174? AFAIK, it's the first one installed (and should have an ID of 1). I seems like you must have deleted it and re-installed it a long time later. Maybe you started with a really old version of MODX from before that template existed.

              That said, the installer looks for the policy template group by name ("Admin"), not ID, so it should still work. The part of the install code that installs the NP policy template hasn't changed for many versions, so I'm still at a loss. I'll have another look and see if it cares about the group's ID.

              I wish I could see the installation messages from when it failed to install the NP policy template.

              On the resolver failures, have you changed the name and or ID of the NewsPublisher page? That would explain the failure to find the page.

                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting
                • 38783
                • 571 Posts
                Hello Bob

                Apparently the number 174 is not an id number but the quantity of permissions listed in the policy.

                The process I went through on this most recent test site, which is MODX 2.5.7 and has had never had newspublisher 2 or NewsPublisher 3 installed before....


                1. Install newspublisher 2.1.0
                2. As no upgrade was available I installed NewsPublisher 3.0.3

                It is interesting to note that although version 3 was not available as an upgrade, when it was installed version 3.0.3, version 2.1.0 disappeared from my list of available packages.

                Today, in order to see if I can recreate the original error message I did the following


                1. Uninstalled and Force Removed NewsPublisher 3.0.3 (when I did this newspublisher 2.1.0 reappeared in my list of packages)
                2. Uninstalled and Force Removed NewsPublisher 2.1.0 - this caused the NewsPublisher Editor policy to be removed
                3. Downloaded and installed NewsPublisher 3.0.3 - this generated the installation log shown below

                Console running...
                Attempting to install package with signature: newspublisher-3.0.3-pl
                Package found...now preparing to install.
                Grabbing package workspace...
                Workspace environment initiated, now installing package...
                [Resource Resolver] Could not find parent: NewsPublisher
                [Resource Resolver] Could not find parent: NewsPublisher
                xPDOVehicle resolver failed: type php (/www/core/packages/newspublisher-3.0.3-pl/modCategory/aec67926ebe9745cd5629d938476708d.accesspolicy.resolver.resolver)
                Cannot get the NewsPublisherPolicyTemplate
                xPDOVehicle resolver failed: type php (/www/core/packages/newspublisher-3.0.3-pl/modCategory/aec67926ebe9745cd5629d938476708d.accesspolicytemplate.resolver.resolver)
                Could not set np_login_id System Settings; Set it manually to the ID of the Login page
                Successfully installed package newspublisher-3.0.3-pl


                I have been able to recreate this error on a few sites, with MODX version 2.2.5, 2.5.5 and 2.5.7.

                Bob, I have resolved the problem on the site that I need to user NewsPublisher on by creating my own policy, so don't pursue this if it is just to help me. But if you want to get the bottom of the problem I am very happy to continue with experiments.

                It occurs to me that if you are unable to recreate the problem, and I am able to recreate it on every installation across a range of different versions of MODX, then perhaps it is a problem caused by the configuration of my hosting? Having said that I haven't had a problem with package installation previously. If you think this is a possibility I am happy to set up a test site and provide you with admin/ftp access to it if you would like me to.
                  If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

                  email: [email protected] | website: https://andytough.com
                • discuss.answer
                  • 3749
                  • 24,544 Posts
                  Thanks Andy!

                  That helped me track it down. I see the problem. When I created the new build file to add the elFinder elements, I failed to transfer a few lines of code that install the policy and policy template. I'll release a new version soon.
                    Did I help you? Buy me a beer
                    Get my Book: MODX:The Official Guide
                    MODX info for everyone: http://bobsguides.com/modx.html
                    My MODX Extras
                    Bob's Guides is now hosted at A2 MODX Hosting
                    • 38783
                    • 571 Posts
                    I'm very glad that it helped.
                      If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

                      email: [email protected] | website: https://andytough.com