We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 35756
    • 166 Posts
    Hello there!

    Sorry to bother you people again with this new thread, but I need to get this working. Although I posted this question already in another old thread I open this new one to have an adequate topic and in hope to get a hint.

    I'm using MODx 2.2.15 with the Login-Package 1.8.1, which finally after lot of researching seems to be working fine - except one thing (for now)!

    By using the Login.Register-snippet I'm not able to get any output off the "reg.error.message"-placeholder.

    I'm using this register-call:

        &activationEmailSubject=`Vielen Dank für Ihre Registrierung!`

    and inbetween my html-part I use this as the placeholder for the general-error-message:


    But this doesn't contain anything, even if I try to submit the form with blank input-fields.

    I also tried different variations of the placeholder, but none worked for me:


    When I'm using the different error-placeholders for the several input fields, I get the desired output when the validation of this input-field fails:


    But I need the general-error-message to be checked if it is empty. When it's not empty I want to show a div in a lightbox-way in cojunction with some javascript, which holds the error messages likes this:

    <div class="lightbox-error-message">

    This works fine for the login-snippet, as well as for any other snippet within the login-package, except this register-snippet.

    So how do I get the reg.error.message-placeholder working?
      • 35756
      • 166 Posts
      Damn...i just realized that the same is happening when using the UpdateProfile-call:

      The placeholder is always empty when validation fails...

        • 35756
        • 166 Posts
        Hm...i managed it by hard-coding the source of the two related source-files:


        I added this code

        $this->modx->setPlaceholder('myError', 'myError');

        after every

        hasErrors()) {

        Then I was able to use my new created placeholder "myError" inside my resources/forms:

        [[+myError:notempty=`DISPLAY ERRORS IN LIGHTBOX-DIV - [[!+reg.error.fullname]], etc.`]]

        But I still don't understand why the normal general-error-message doesn't work sad

          • 41428
          • 22 Posts
          I know it's a bit late for you guys... but for anyone else, I found why this was blank - the placeholder was never set if validators had errors, it was only set for hook errors.

          Solution to add a blanket error message:


          Add Line 65:
          'validationErrMsg' => 'There are errors in the form below.',

          (this can then be set at snippet level using &validationErrMsg=`Custom Validation Error Message`)

          Add Line 106:

          lines in /core/components/login/controllers/web/UpdateProfile.php
          65 = 62
          106 = 206

            • 20413
            • 2,877 Posts
            Nice! Bookmarked - If you want to fork it on Github: https://github.com/splittingred/Login/tree/develop/core/components/login/processors

            splittingred (Shaun McCormick) is not very active in MODX develoment no longer.
              @hawproductions | http://mrhaw.com/

              Infograph: MODX Advanced Install in 7 steps:

              Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
              • 35756
              • 166 Posts
              Thanks for posting this @kctechsoln! I think I'm going to do a new project soon with a custom form, I hope with your provided info I won't run into those problems again!
                • 38783
                • 571 Posts
                Another thank you to @kctechsoln for posting the solution. This thread on the forum has just saved me a lot of time with a tight deadline looming.
                  If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

                  email: [email protected] | website: https://andytough.com
                • I've run into this problem as well - surely this should have been fixed by now...
                    Helen Warner
                    Number one pixel!
                    Proud to be linked with MODX at Crimson Pixel