Jump to:

2076 Posts in 857 Topics by 449 members

E-Commerce Modules

SilverStripe Forums » E-Commerce Modules » Can't save on Account page

Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.

Moderators: martimiz, Nicolaas, Sean, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba, simon_w

Page: 1
Go to End
Author Topic: 556 Views
  • Rawbit
    Avatar
    Community Member
    52 Posts

    Can't save on Account page Link to this post

    Using the trunk of ecom, I can't save when on any users Account page. I get '"First Name" is required.' even though this field is filled. That happens when dev mode is off; when on, here's what I get:

    [Notice] Undefined offset: 0
    POST /account/MemberForm

    Line 103 in /home/client/public_html/sapphire/forms/RequiredFields.php
    Source

    94       $valid = true;
    95
    96       $fields = $this->form->Fields();
    97       foreach($fields as $field) {
    98          $valid = ($field->validate($this) && $valid);
    99       }
    100       if($this->required) {
    101          foreach($this->required as $fieldName) {
    102             $formField = $fields->dataFieldByName($fieldName);
    103             if($formField && !$data[$fieldName]) {
    104                $errorMessage = sprintf(_t('Form.FIELDISREQUIRED').'.', strip_tags('"' . ($formField->Title() ? $formField->Title() : $fieldName) . '"'));
    105                if($msg = $formField->getCustomValidationMessage()) {
    106                   $errorMessage = $msg;
    107                }
    108                $this->validationError(
    109                   $fieldName,

    Trace

    * RequiredFields->php(Array)
    Line 106 of Validator.php
    * Validator->validate()
    Line 752 of Form.php
    * Form->validate()
    Line 189 of Form.php
    * Form->httpSubmission(HTTPRequest)
    Line 129 of RequestHandler.php
    * RequestHandler->handleRequest(HTTPRequest)
    Line 143 of RequestHandler.php
    * RequestHandler->handleRequest(HTTPRequest)
    Line 122 of Controller.php
    * Controller->handleRequest(HTTPRequest)
    Line 29 of ModelAsController.php
    * ModelAsController->handleRequest(HTTPRequest)
    Line 277 of Director.php
    * Director::handleRequest(HTTPRequest,Session)
    Line 121 of Director.php
    * Director::direct(/account/MemberForm)
    Line 118 of main.php

    556 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.