We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8609
    • 607 Posts
    hmm, my chunk code is identical to yours except for the select options for the language

    My snippet call differs in the chunk name, which I know is correct for me setup, and in the ?form. I’m thinking that’s where the issue lies. Hmmm, I’m stumped at the moment, going to keep hacking away at it.
      • 32344
      • 11 Posts
      thats strange Mary, good luck with it..

      if i can help in any way let me know. but since I learnt most of what i know about modx from your website im not sure how much help ill be! smiley

      it was a simple copy and paste job for me.

      If you haven’t tried this already try and create a new page (uncached) to test it in, because im sure the parse error was related to the site cache.

      Pete
        • 32344
        • 11 Posts
        just as a test I added ?&form= to my chunk instead of ?form= I received the same invalid form error. So I changed it back cleared the cache and it is working again.
          • 8609
          • 607 Posts
          Quote from: whodaman at Feb 11, 2010, 12:20 AM

          just as a test I added ?&form= to my chunk instead of ?form= I received the same invalid form error. So I changed it back cleared the cache and it is working again.


          Hmm, no matter what I do eliminating the & causes parsing errors. My page is uncached, was from the beginning. I just created another uncached page from scratch and tried again with the same results.

          I wonder if it’s just something really small I’m missing. I’ve tried it on sites on two different MODx installs on two different servers as well as on my wampserver. Blah! undecided
          • @einsteinsboi: Please can you try the attached snippet in place of your current subscribe snippet and see if that eliminates the parse errors. I’ve revised the detection of the $modx->placeholders array.

            I’ve tested the snippet locally on Evo 1.0.2 and the following snippet call construct works fine:
            [!mailchimpSubscribe?form=`mailchimpNewsForm_en`&listId=`d7c8e27095`!]
              Garry Nutting
              Senior Developer
              MODX, LLC

              Email: [email protected]
              Twitter: @garryn
              Web: modx.com
              • 8609
              • 607 Posts
              Garry
              I just tested this and it seems to be working fine! smiley Thank you!!
              What was the issue? I noticed the new conditional that you added. Is this something with Evo 1.0.2 or just some setups in particular?

              Thank you for rescuing me from hours of frustration!! grin

              mary

              Quote from: garryn at Feb 11, 2010, 02:35 PM

              @einsteinsboi: Please can you try the attached snippet in place of your current subscribe snippet and see if that eliminates the parse errors. I’ve revised the detection of the $modx->placeholders array.

              I’ve tested the snippet locally on Evo 1.0.2 and the following snippet call construct works fine:
              [!mailchimpSubscribe?form=`mailchimpNewsForm_en`&listId=`d7c8e27095`!]

              • What was the issue? I noticed the new conditional that you added. Is this something with Evo 1.0.2 or just some setups in particular?
                Although the document parser initiates the ’placeholders’ class variable, it never sets it’s type. So, it only gets the array type when the first placeholder is set. That was the problem with the parse errors. When I first developed the snippet, it must’ve been on a page where a placeholder had already been set so I never seen the parse error.
                  Garry Nutting
                  Senior Developer
                  MODX, LLC

                  Email: [email protected]
                  Twitter: @garryn
                  Web: modx.com
                  • 8609
                  • 607 Posts


                  Quote from: garryn at Feb 11, 2010, 03:16 PM

                  What was the issue? I noticed the new conditional that you added. Is this something with Evo 1.0.2 or just some setups in particular?
                  Although the document parser initiates the ’placeholders’ class variable, it never sets it’s type. So, it only gets the array type when the first placeholder is set. That was the problem with the parse errors. When I first developed the snippet, it must’ve been on a page where a placeholder had already been set so I never seen the parse error.

                  Gotcha! I never even thought of that. I combed through the code and could not for the life of me figure out why it wouldn’t work. One more question out of curiousity, why does adding the & before form break the snippet? Shouldn’t that work?
                  • One more question out of curiousity, why does adding the & before form break the snippet? Shouldn’t that work?
                    It works fine for me on the revised snippet code, are you still seeing that even with the revised snippet?
                      Garry Nutting
                      Senior Developer
                      MODX, LLC

                      Email: [email protected]
                      Twitter: @garryn
                      Web: modx.com
                      • 8609
                      • 607 Posts
                      Quote from: garryn at Feb 12, 2010, 12:12 AM

                      One more question out of curiousity, why does adding the & before form break the snippet? Shouldn’t that work?
                      It works fine for me on the revised snippet code, are you still seeing that even with the revised snippet?

                      You’re right, it works in the revised snippet. Thank you!! You should bundle this up and offer it under extras so it’s easier to find! smiley

                      Thanks for the excellent work!