We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7136
    • 12 Posts
    I am running MODx 0.9.6 with WLPE 1.3.0 on MySQL 4.1.11, PHP 4.4.7, Linux Cluster 2.6.20.

    I am trying to extend the default WLPE registration page by adding one new field with a simple select list.
    Here is the call I am making to WLPE:
    [!WebLoginPE? &type=`register` &customFields=`occupation`
    &inputHandler=`Occupation:userProfileOccupation:Occupation:select:Farmer(1),Fisherman(2),Fireman(3)`!]

    I also edited the assets/snippets/webloginpe/webloginpe.templates.php to include the placeholder [+form.occupation+] in the appropriate registration template areas.

    When I attempt to load the page I just get the WLPE call as plain html. If I remove the reference to the &inputHandler, the page loads, obviously without the occupation field.

    Should I be using a different, custom tpl or should this be working?
    I did look in the database and the field was created in the extended attribute table correctly.

    Sorry for the noob question.

    -Derrick
      • 26435
      • 1,193 Posts
      &inputHandler=`Occupation:userProfileOccupation:Occupation:select:Farmer(1),Fisherman(2),Fireman(3)`!]

      [+form.occupation+]

      I don’t think this is causing your problem, but it will cause a different problem when we get it working because it is CASE SENSITIVE.

      It is always a better idea to make your template a chunk rather than editing source files directly.

      Are you using a RTE (TinyMCE or FCKeditor)? I have put in snippet calls in an RTE and had them show up as the text of the snippet call instead of being executed.

      -sD-
      Dr. Scotty Delicious, Scientist DFPA.
        Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
        All of the above... in no specific order.


        I send pointless little messages
        • 7136
        • 12 Posts
        Thanks for taking a look at this. I took care of the the mixed case issue and am still getting the same problem. I’ll copy into a chunk and try that instead. I am not using any RTE due to the extraneous markup you described.

        Hopefully moving to a chunk will do the trick. I just moved to MODx from Drupal and Joomla/Mambo work in the past. This is the first project with the new architecture and I really, really like it so far.

        Thanks

        Quote from: Dr. at Sep 20, 2007, 06:23 AM

        &inputHandler=`Occupation:userProfileOccupation:Occupation:select:Farmer(1),Fisherman(2),Fireman(3)`!]

        [+form.occupation+]

        I don’t think this is causing your problem, but it will cause a different problem when we get it working because it is CASE SENSITIVE.

        It is always a better idea to make your template a chunk rather than editing source files directly.

        Are you using a RTE (TinyMCE or FCKeditor)? I have put in snippet calls in an RTE and had them show up as the text of the snippet call instead of being executed.

        -sD-
        Dr. Scotty Delicious, Scientist DFPA.
          • 7136
          • 12 Posts
          Still having the same issue.
          Here is my call in my document:
          [!WebLoginPE? &type=`register` &registerTpl=`SlopeRegister` &customFields=`occupation`
          &inputHandler=`Occupation:userProfileOccupation:occupation:select:Farmer(1),Fisherman(2),Fireman(3)`!]
          

          Here is my Chunk SlopeRegister:
          [+wlpe.message+]
          <div id="wlpeNewUser">
          		<form id="wlpeUserRegisterForm" action="[~[*id*]~]" method="POST" enctype="multipart/form-data">
          			<fieldset id="wlpeUserRegisterInput">
          				<div id="wlpeNewUserInfo">
          					<p id="wlpeRegisterInfo">Use this form to register for a new user account.<br />
          						<span class="info">Filds marked with <span class="required">*</span> are required.</span>
          					</p>
          				</div>
          				<legend>Register for a new user account</legend>
          				[+form.occupation+]
          				<div class="clearit"></div>				
          			</fieldset>
          			<fieldset id="wlpeUserRegisterButtons">
          				<button type="submit" id="wlpeSaveRegisterButton" name="service" value="register">Register</button>
          				<button type="submit" id="wlpeCancelRegisterButton" name="service" value="cancel">Cancel</button>
          			</fieldset>
          		</form>
          </div>
          

          When I call this new registration page, here is what I get:
          [[WebLoginPE? &type=`register` &registerTpl=`SlopeRegister` &customFields=`occupation` &inputHandler=`Occupation:userProfileOccupation:occupation:select:Farmer(1),Fisherman(2),Fireman(3)`]]
          


          I stripped this down just to isolate to this one variable. I can make other things work, but when I call &inputHandler, all I get is the call to WLPE itself.


          Thanks
            • 26435
            • 1,193 Posts
            What is the page caching setting for your registration page? Is cacheable set to on or off?

            -sD-
            Dr. Scotty Delicious, DFPA.
              Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
              All of the above... in no specific order.


              I send pointless little messages
              • 7136
              • 12 Posts
              It was set to yes.
              I changed it to no and set empty cache to yes.

              I am still getting the same results.

              -Derrick
                • 26435
                • 1,193 Posts
                Well, for some reason MODx is not parsing the snippet call when that syntax is present and that is very strange.

                Are there other snippets called on the same page?
                As a test, I would remove all the other snippet calls on the page and disable all the plugins and see if it works with nothing else being called on the document. Then, add your snippets and plugins one at a time to the document and see when it breaks?

                -sD-
                Dr. Scotty Delicious, DFPA.
                  Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
                  All of the above... in no specific order.


                  I send pointless little messages
                  • 7136
                  • 12 Posts
                  How strange.
                  There is literally nothing else on this page, only this call.
                  I tried removing the &inputHandler, didn’t work.
                  I tried removing both the &inputHandler and &customFields and it works (of course no custom fields).
                  I tried removing &customFields, BUT leaving &inputHandler and it WORKS! (ok at least parses and displays)?

                  Does this make any sense?

                  Thanks

                  btw - I have read through the entire thread prior to it being established as a sub-forum. I am really impressed with the code, but even more impressed with the time, attention and care you have given everyone (me included) in support of your CONTRIBUTED code. Thanks.

                  Quote from: Dr. at Sep 21, 2007, 12:44 AM

                  Well, for some reason MODx is not parsing the snippet call when that syntax is present and that is very strange.

                  Are there other snippets called on the same page?
                  As a test, I would remove all the other snippet calls on the page and disable all the plugins and see if it works with nothing else being called on the document. Then, add your snippets and plugins one at a time to the document and see when it breaks?

                  -sD-
                  Dr. Scotty Delicious, DFPA.
                    • 7136
                    • 12 Posts
                    Yeah! It is working.
                    I had either a "space" or a line feed that was somehow not parsing correctly and causing the error.
                    The following line now works perfectly...
                    [!WebLoginPE? &type=`register` &registerTpl=`SlopeRegister` &customFields=`occupation` &inputHandler=`Occupation:userProfileOccupation:occupation:select:Fireman(1),Policeman(2)`!]


                    Thanks for your help, and sorry for the run around.

                    -Derrick
                      • 26435
                      • 1,193 Posts
                      Quote from: derrickk at Sep 21, 2007, 06:53 AM

                      Yeah! It is working.
                      I had either a "space" or a line feed that was somehow not parsing correctly and causing the error.
                      The following line now works perfectly...
                      [!WebLoginPE? &type=`register` &registerTpl=`SlopeRegister` &customFields=`occupation` &inputHandler=`Occupation:userProfileOccupation:occupation:select:Fireman(1),Policeman(2)`!]


                      Thanks for your help, and sorry for the run around.

                      -Derrick
                      Dude!
                      I am so glad to hear that. I have been cracking my skull trying to figure out WTF the problem could be. I went over and over the code for custom fields and input handler and couldn’t find anything that could be blocking the parser.

                      Thank you for reporting back on your solution. It can be hard to spot those line feeds... they are pretty... uh... invisible? LOL!

                      Also, thanks for the compliment on the code and the forum attention. That means a lot.

                      -sD-
                      Dr. Scotty Delicious, DFPA.
                        Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
                        All of the above... in no specific order.


                        I send pointless little messages