We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17723
    • 221 Posts
    Hello,
    I've set up MIGX to manage my events (following Manage Events-Resources in a CMP tutorial). But I came across this problem that I can't save some resources. I've figured out that it was a problem of a duplicated alias. For managing events I don't need to crated a aliases because they are not a separated pages on my website.
    Please advice me how to find a way to save documents in my events folder even when they have a duplicated alias, or how to autocreate a uniuque alias, so the resource will save without any problem.
    Thanks
      Lucas from AroundCyprus.net
      • 4172
      • 5,888 Posts
      there are several ways.
      two of them:

      you could create a custom-processor, which doesn't run the modx-update/create - processors, but does the saving itself.
      or you can create a custom-processor, which creates an unique alias before calling the modx-update/create processors.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 17723
        • 221 Posts
        Do You thing that crating a plugin with onBeforeFormSave event that will crate a unique alias - will solve this issue as well?
          Lucas from AroundCyprus.net
          • 4172
          • 5,888 Posts
          I think a plugin for both onBeforeDocFormSave(setting a unique temp alias) and onDocFormSave (setting the final alias on basis of the id) could work as well.

          Or only onBeforeDocFormSave, just on a datetime-basis
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 17723
            • 221 Posts
            Thank's Bruno for Your support.
            I'll probably try with plugin first, since it seams easier.
              Lucas from AroundCyprus.net