We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8214
    • 28 Posts
    Hi All, I am loving my modx installation, and I have been cleaning it up and organizing.

    But I just found that its not unpublishing resources when I ask it too. I tried logging out and back in but no go.

    I should be able to do that right? Seems like I have done it many times before...
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      If you’re using Evo (1.0.x) check your mm_rules (or mm_demo_rules) chunk. I usually either remove it altogether or just comment out most of the rules, and the problem goes away. I think it’s related to this rule
      mm_default('pub_date');

      However, using the Resource Tree menu’s unpublish option will work.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 8214
        • 28 Posts
        Cool, thanks much! laugh

        I was betting on user error myself tongue

        See ya,

        Dun
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          It’s definitely that rule. When you create a new resource, the pub_date is automatically set by that rule; on saving the resource normally that date keeps it from being unpublished. If you clear the pub_date field then you can unpublish; the date will not be automatically set again.

          I believe that rule was put in the demo rules chunk to go along with the demo site’s blog capabilities. The only rule I leave after installation is the
          mm_widget_showimagetvs

          so that image TVs will have a nice thumbnail of the uploaded/selected image.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 8214
            • 28 Posts
            Oh! So I can just clear the pub_date field? That’s a bit easier for me to handle right now, so I think I will just do that.

            I don’t want to delete the resources because I’ve got a thing for numbers and if I delete it, that number is gone.

            Thanks again for the info, very helpful and lets me understand Modx a little more deeply.

            I really do love the software, been using it regularly for six months and I don’t have a single complaint...
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              I don’t delete resources, I just unpublish them and move them to a "storage" resource/parent/folder and re-use them as I need new resources.

              Anyway, you should comment out that line in the chunk "mm_demo_rules", otherwise every new resource you save will need to be edited to clear the pub_date before you can unpublish it.

              //mm_default('pub_date');
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 8214
                • 28 Posts
                Yeah, that’s what I do too, I just have a folder for reusable resources. They are ’resources’, right? You shouldn’t waste them! Haha silly I suppose.

                Ok, I will follow your advice about the mm rules. Will put me in a better position going forward.

                Thanks so much, Susan. Wonderful assistance.

                Peace!
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  Actually they are called "resources" to comply with W3C naming standards... as in Universal Resource Locator = URL. A "resource" is anything that the browser will request from the web server (using a URL or URI) such as web pages, image files, files for download, .css or .js files, etc.

                  Following this naming standard, files or elements internal to the CMS processing are not strictly speaking "resources", so templates, snippets, chunks, etc are now called "elements", as they are the elements out of which the resource is built.
                    Studying MODX in the desert - http://sottwell.com
                    Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                    Join the Slack Community - http://modx.org
                    • 8214
                    • 28 Posts
                    Ok, I thought it was just good use of language. Which it is, but on the part of the W3C rather than modx.

                    I am still on my way to understanding the tvs and all that. In fact, I just implemented a 4 template system, all because I don’t understand tvs!

                    I noticed that you also told me another way to unpublish, which is through the tree menu. Very handy, that.

                    Rgrds & Etc.,

                    Dun
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                        Studying MODX in the desert - http://sottwell.com
                        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                        Join the Slack Community - http://modx.org