We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 47562
    • 113 Posts
    I just created two system variables, both in exactly the same way.

    The first value shows up fine, with a last modified value of "Jun 22, 2014 01:46 PM" (which, aside from being east coast time, is correct). But for some reason, the second value seems to indicate a distortion in space-time, giving a last modified value of "Dec 31, 1969 04:00 PM".

    Any clues as to why this is? (And can such weirdness simply be ignored?)
      • 47562
      • 113 Posts
      It appears that this is because the value of the second setting is an email address, which contains an "@" that is causing grief.

      Should special characters be escaped somehow?

      Thanks.
        • 3749
        • 24,544 Posts
        I assume that you mean System Settings. Are you creating them in code, or in the Manager?
          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
          • 47562
          • 113 Posts
          Quote from: BobRay at Jun 23, 2014, 12:55 AM
          I assume that you mean System Settings. Are you creating them in code, or in the Manager?

          Yes, sorry, a system setting; I created the two values in the manager. As I say, both are text; the first is just a resource id, and the second is an email address.

          One thing that's interesting: if I update that second email setting, remove the at sign, and save it, the date shows correctly. If I then update it again and put the at sign back in, the date remains correct.
            • 3749
            • 24,544 Posts
            That suggests a problem with the create processor, but not the update processor. If I have time, I'll take a look at them. Thanks for working on this.

              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
              • 47562
              • 113 Posts
              Quote from: BobRay at Jun 23, 2014, 06:47 PM
              That suggests a problem with the create processor, but not the update processor. If I have time, I'll take a look at them. Thanks for working on this.


              Thanks Bob. Yes, nothing urgent, just something for the "when time permits" list. (And it's amazing how that list grows, no?) wink
                • 40045
                • 534 Posts
                I'm not completely sure if I understand the problem correctly, but where can you set the value of a system setting when creating it?? I don't see a field "value" to enter an E-Mail address when creating a system setting...

                EDIT: Ignore me...scrolling in the window helps...

                EDIT2: When I do that:

                1. go to system settings
                2. create new system setting
                3. key = email_setting
                name = E-Mail Setting
                area = test
                value = [email protected]
                4. save

                The last modified date is set to 0, e.g. 1.1.1970, as it is always...what am I doing wrong to reproduce this?
                  • 47562
                  • 113 Posts
                  Quote from: exside at Jun 24, 2014, 05:45 AM

                  EDIT2: When I do that:

                  1. go to system settings
                  2. create new system setting
                  3. key = email_setting
                  name = E-Mail Setting
                  area = test
                  value = [email protected]
                  4. save

                  The last modified date is set to 0, e.g. 1.1.1970, as it is always...what am I doing wrong to reproduce this?

                  Dunno.

                  Here's pretty much exactly what I did (Revo 2.2.14-pl):

                  1. go to system settings
                  2. create new system setting
                  3. key = pnf.mailto
                  name = setting_pnf.mailto
                  description = whatever
                  field type = Textfield
                  namespace = core
                  value = [email protected]
                  4. save

                    • 47562
                    • 113 Posts
                    Quote from: exside at Jun 24, 2014, 05:45 AM
                    The last modified date is set to 0, e.g. 1.1.1970, as it is always...

                    Not sure what you mean by "as it is always"; as mentioned, if I create a non-email system setting, the modified date shows up as the current (today's) date, as I'd expect...
                      • 40045
                      • 534 Posts
                      hm, for me it doesn't, when I create a "normal" text setting with value test, the date is also 0, e.g. 1.1.1970...what version of Revo are you on? (tested with latest git dev branch)