We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12512
    • 42 Posts
    Hi,

    I made some customization to plugins for example TinyMCE, CodeMirror and others which are stored in the default propery set as this seems the only way to customize these plugin-ins.

    Now the day comes when these packages need to be upgraded and all my customizatios are lost. I know I can export and re-import those property sets, but the danger is that this is easily forgotten. Is there a better way to preserve customizations between upgrades of installed packages?

    • The intention is that you do not change the default properties. You should create Property Sets to isolate your custom properties so that upgrades of Extras can adjust the default properties as appropriate. You can then use those Property Sets on your Elements. For Plugins, these are assigned when you register the Plugin with a specific Event.
        • 12512
        • 42 Posts
        Quote from: OpenGeek at May 27, 2011, 06:26 PM

        For Plugins, these are assigned when you register the Plugin with a specific Event.

        Thank’s a lot!

        That was the missing pointer. I knew that for snippets you assign custom sets when you call them using the @operator but for plugins I was a bit lost.

        Recommend to add to the documentation something like:

        "To customize plugins like TineMCE’s editor settings create a new property set and assign the new property set in the event tab to all checked events. That way your customisation are preserved when upgrading your plugins via package management."

        Such a hint can be added to the doc for plugins like TinyMCE or CodeMirror and to the generic property set documentation.
          • 38290
          • 712 Posts
          Not entirely related, but I'm looking for a way to package Property Sets, with say a Chunk. I'm using PackMan 1.2.0 but it doesn't seem to include the non-Default Property Sets.
          Jason, is it consider bad practice to include Property Sets with addons because of the preserving customization issue? Should I rather make setting any convient Package Sets part of the Installation Process and do things like provide import scripts?
            jpdevries
            • 3749
            • 24,544 Posts
            The new version of MyComponent will package Property Sets (if it ever gets finished). wink


            ------------------------------------------------------------------------------------------
            PLEASE, PLEASE specify the version of MODX you are using.
            MODX info for everyone: http://bobsguides.com/modx.html
              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
            • I don't see anything wrong with packaging Property Sets as examples or standard configuration options, though it might be good to be careful with naming conventions when doing so. It WILL be imperative that users know they are bundled Property Sets, and that creating their own based on these rather than modifying them would be preferred, unless they intend to automatically get the new Property Sets applied to their site when upgrading.

              Setting the values of a property set on Install is an interesting idea, but I've never tried such.
                • 3749
                • 24,544 Posts
                It's relatively easy to do in a resolver, as long as the property set and all the objects the settings refer to are installed before the resolver runs.

                The new version of MyComponent has a built-in resolver that automatically connects Property Sets to Elements.


                ------------------------------------------------------------------------------------------
                PLEASE, PLEASE specify the version of MODX you are using.
                MODX info for everyone: http://bobsguides.com/modx.html

                  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