Problems with error messages when submitting registration form

Permalink 1 user found helpful
an example: no error message prints when the user tries to register with the same email address twice. I see the error message in controller/register.php.

I can also see that in helpers/validation/error.php is not printing the errors anywhere. I've tried changing the errors from being displayed as an unordered list to a simple paragraph, and nothing shows up either way.

The form just refreshes, with no helpful validation messages.

kevinschueller
 
kevinschueller replied on at Permalink Reply
kevinschueller
Nevermind, I figured it out.

I needed to add this code to my custom registration page type:

<div id="ccm-theme-wrapper">
 <?php  if (isset($error)) { ?>
   <?php  
   if ($error instanceof Exception) {
      $_error[] = $error->getMessage();
   } else if ($error instanceof ValidationErrorHelper) { 
      $_error = $error->getList();
   } else if (is_array($error)) {
      $_error = $error;
   } else if (is_string($error)) {
      $_error[] = $error;
   }
      ?>
      <ul class="ccm-error">
      <?php  foreach($_error as $e) { ?><li><?php echo $e?></li><?php  } ?>
LotosNile replied on at Permalink Reply
LotosNile
Where and how? I'm driving myself crazy with this problem.
jordanlev replied on at Permalink Reply
jordanlev
simpit replied on at Permalink Reply
simpit
In Concrete v5.7 the following code works:

<?php  if (isset($error)) {?>
         <ul class="ccm-error">
             <?php  foreach($error->getList() as $e) { ?><li><?php echo $e?></li><?php  } ?>
         </ul>
<?php } ?>