We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 577
    • 132 Posts
    Revo 2.0.4

    All my resource (docs and containers) are resolving even when unpublished. I have made sure I was not logged into manager but still resolves.

    These are not published

    http://modxrev.pmmsystem.net/test (doc in root)

    http://www.pmmcarsites.com:8009/seo/santa-monica-ford (doc in container... both unpublished)

    Thanks ~Adam
      "One of these days I will get around to my own website... Its only been about 12 years... maybe tomorrow smiley"
      • 3749
      • 24,544 Posts
      Did you clear the site cache and your browser cache/cookies?

      Sometimes it helps to look from a completely different browser.
        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
        • 577
        • 132 Posts
        Yes for sure and 10 times over smiley

        Try the links above yourself they should resolve. Already tested with other remote, never visited users and its public.
          "One of these days I will get around to my own website... Its only been about 12 years... maybe tomorrow smiley"
          • 28215
          • 4,149 Posts
          Did you mess around with the access policies at all?

          Are these in Contexts other than web?
            shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
            • 577
            • 132 Posts
            I am testing in "Web" to keep it simple and have these results but overall it is happening across all context.

            I have not user messed with any Resource Groups in any way yet (all default). I have worked in the User Groups and Roles but those were copies of admin and have in no way adjusted anonymous users.
              "One of these days I will get around to my own website... Its only been about 12 years... maybe tomorrow smiley"
              • 577
              • 132 Posts
              Going to do a brand new install and see what happens... please hold
                "One of these days I will get around to my own website... Its only been about 12 years... maybe tomorrow smiley"
                • 577
                • 132 Posts
                Ok with a fresh install all seems well. System with issues was originally a 2.0r2 that has been upgraded along the way. Not sure if that could be it or not. Any chance someone could point me in the proper direction to understanding how an resource is qualified as published or unpublished (ie: System Event, code line, file etc) so that I might be able to isolate what 3rd party item might be causing this to happen.
                  "One of these days I will get around to my own website... Its only been about 12 years... maybe tomorrow smiley"
                  • 3749
                  • 24,544 Posts
                  Are the resources actually changing from unpublished to published, or are unpublished resources being shown?
                    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
                    • 577
                    • 132 Posts
                    They remain unpublished by all account but are still accessible.

                    *UPDATE*

                    Ok I have found the HOW (and its not in modx directly) but have not found the WHY yet.

                    Long story short I am in the middle of a huge migration of a HomeGrown system into MODx. This system has its own application singleton object that I hope to support inside of MODx to reduce the amount of things I need to port in the beginning to get up and running. With the object included I can do what I need to and can access my object from within snippets, but somehow this issue is a side effect.

                    What is the actual underlying determination for published?

                    Aside from the flag in the DB (which remains zero) there must be a condition that acts off that flag. It almost seems like my code is somehow using a reserved var/const that is faking out the condition and allowing the unpublished through.

                    Since I am going outside the "sandbox" with my own object I will need to solve this one myself but will report back. I have not found a bug but the fact that I found a way to bypass the published mechanism so easily may be of use to others that find themselves in the same pickle.
                      "One of these days I will get around to my own website... Its only been about 12 years... maybe tomorrow smiley"
                      • 577
                      • 132 Posts
                      * I HAVE THE HOW *

                      Ok this is all it takes to repeat my issue.

                      Add session_start(); to the top of the index.php page and all unpublished items become publicly viewable.

                      I was able to trace through my object and found this to be the issue. Then removed my include from the top of the index.php file and simply started the session instead and had the exact same results.

                      Now huh

                      Should this be considered a bug or simple a by-product of trying to work outside of the modx "world".


                      Note: I have been working with this session set for at least a month now and this unpublish issue is the only issue I have run across so I lean towards bug.

                      If almost feel like the final condition to a resource being published is "if(isset($_SESSION)){ then resource is published... }

                      Anyone got an opinion?
                        "One of these days I will get around to my own website... Its only been about 12 years... maybe tomorrow smiley"