We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28042 ☆ A M B ☆
    • 24,524 Posts
    Indeed, modules used to run instead of edit from the list links, before the modules entry was added to the top menu. At the time, it was an annoyance having to click on the icon to edit instead of run. But now there are getting to be so many "user-centric" modules, instead of just for the convenience of the developer, that it looks like it might be better to switch the functionality back again!
      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
      • 25663 MODX Staff
      • 12,272 Posts
      I’ve spent the last few hours squishing bugs, cleaning up the public beta 5 thread, and prioritizing the bugtracker. It looks like we’re in really good shape!

      Biggest issues are the non-completed critical and high priority bugs. Any help there would be tremendously appreciated.

      Paul and Toby: how’s the permissions review and overhaul coming (nice addition a few posts back Toby).

      Finally, there’s been more additions and alterations to the language files so it might behoove us to slim down the number of default languages to ensure we have complete sets and no snippets fail. (Speaking of which, all languages should default back to English if the native one is not available I suppose ... but do they?) If we need to trim some languages out for the release, which ones are critical other than English and French (since I know those two are effectively complete now)?
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 30223
        • 1,010 Posts
        I haven’t looked into the appropriate code but I think it wouldn’t be all that difficult to add the limitation that you cannot raise your own or anyone else’s permissions (using roles) beyond your own role.

        I have now and it turned out to be very easy to change, at least the save_roles.processor.php part. I’ve attached a patch file (as I don’t have anywhere to put it myself). This simply resets any posted values if the mgr-user doesn’t have the particular permission (her/him)self. It doesn’t give any error or indication but silently adjusts the values. I reckon that’s ok if the mutate_role.dynamic.php is adapted as well so that any imappropriate permissions are disabled (or not shown at all).

        What do you think?

        Edit: oops, forgot the attachment smiley

        Edit: 6:25pm (local)

        Here’s a zip file with both save_roles_processor.php and mutate_roles.dynamic.php.
        To test:
        1. Create a new role and give all ’role manegement’ & ’user management’ permissions plus ’permissions management’ -> access permissions. Leave some of the other unchecked.
        2. Create a manager uer with this new role and log in as this new user
        3. Try creating a new role - All the ones you don’t have permission for yourself should now be disabled.

        I don’t know if any explanation should be given on teh page, I think it’s pretty self-evident but who knows.

          • 6726
          • 7,075 Posts
          Just a quick note about something which had me perplexed (cache not working), until Garry made it clear to me : if you install the DisableCache plugin upon install, it’s activated by default. I really don’t think this should be the case. My understanding was this plugin was intended as a convenient way to deactivate the cache either for development/testing purposes or as a complement to the template switcher plugin.

          If I was dumb enough to overlook this tongue , I guess we could end up with a few (if not a lot) of support request...
          I filed this into FlySpray : http://modxcms.com/bugs/task/614
            .: COO - Commerce Guys - Community Driven Innovation :.


            MODx est l'outil id
            • 10487 MODX Staff
            • 1,535 Posts
            I agree, I wonder how many people testing the betas have already installed it without realising.

            In terms of the DisableCache plugin, the main reason it has been included is so that the TemplateSwitcher plugin functions correctly - so, can the DisableCache plugin not be merged in with the TemplateSwitcher plugin? The two plugins run off the same event and it’s only a one-line addition.

            And then, either remove the DisableCache plugin altogether or offer it in the install but have it disabled by default (could be explained in the plugin summary that it needs to be manually activated)
              Garry Nutting
              Senior Developer
              MODX, LLC

              Email: [email protected]
              Twitter: @garryn
              Web: modx.com
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              That has been my intention, to catch the parser before it goes off to look at the cache, and delete that document’s cache file and set its cachable status off.
                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
                • 6726
                • 7,075 Posts
                Quote from: garryn at Oct 27, 2006, 06:50 AM
                I agree, I wonder how many people testing the betas have already installed it without realising.

                I think this will be brought up sooner or later, indeed...

                Quote from: garryn
                In terms of the DisableCache plugin, the main reason it has been included is so that the TemplateSwitcher plugin functions correctly - so, can the DisableCache plugin not be merged in with the TemplateSwitcher plugin? The two plugins run off the same event and it’s only a one-line addition.

                Why not ?

                But I’d like to have the DisableCache plugin available in the repository, pretty handy when you’re developping a new website smiley

                Quote from: garryn
                And then, either remove the DisableCache plugin altogether or offer it in the install but have it disabled by default (could be explained in the plugin summary that it needs to be manually activated)

                If you add disable cache capabilities to the template switcher, I don’t think you need to bundle the DisableCache plugin with MODx. But it’s definitely a tip for developpers to let them know it exist. And it should be in the repository : I remember finding this in a thread as a tip, but it sure has escaped a lot of people I guess...
                  .: COO - Commerce Guys - Community Driven Innovation :.


                  MODx est l'outil id
                  • 25663 MODX Staff
                  • 12,272 Posts
                  Let’s fix the template switcher plugin and not distribute Disable Cache. Anyone care to give it a quick go?
                    Ryan Thrash, MODX Co-Founder
                    Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    I’ve fixed the problem with the weblink and the Wayfinder snippet. I added this bit of code to save_content.processor.php around line 48:
                    if($type == "reference") {
                      if(is_numeric($content)) {
                        $content = $modx->makeUrl($content);
                      }
                    }
                    

                    Of course, this will break if you later switch from/to friendly URLs, but you can at least then go back and change the links in your internal weblinks if you have to.

                    Now, you can click on the document in the Tree to get the ID of the one you want to link to, and the bit in the save_content file will atuomatically change it to a valid URL for Wayfinder to use.

                    Alternately, the same code could be used in Wayfinder to make the URL if it’s just a numeric value...
                      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
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      Oh, yeah... I almost forgot. Upgraded sottwel.com to version 1815. In the installer, the footer text is cute... once. I would suggest modifying that before the wrong people see it and it causes some unpleasant feelings.

                      Also, I seem to recall reading something here about trying to log in after an upgrade, and another user has been in the system configuration. Because of my "guest" user, I got bitten by that; I ended up having to go to the database and clearing the active_users table before I could get in to the Manager.
                        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

                      This discussion is closed to further replies. Keep calm and carry on.