Jump to:

10979 Posts in 2722 Topics by 1815 members

All other Modules

SilverStripe Forums » All other Modules » struggling with Userforms in 2.3.4

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2
Go to End
Author Topic: 3556 Views
  • anujkryadav
    Avatar
    Community Member
    30 Posts

    Re: struggling with Userforms in 2.3.4 Link to this post

    make sure tht you have named the userform folder in root directory as userforms,mine is working fine after i did tht

  • anujkryadav
    Avatar
    Community Member
    30 Posts

    Re: struggling with Userforms in 2.3.4 Link to this post

    Sorry forget to tell you,you can change the foldr name and rebuild the CMS with dev/build,it will work fine

  • zueri
    Avatar
    Community Member
    5 Posts

    Re: struggling with Userforms in 2.3.4 Link to this post

    I'm also having problems with userforms after the update. I tried to update to the 0.2 branch as mentioned above. In my case, theres a javascript exception which savs:

    $("#Form_Form").validate is not a function

    I checked if the jquery.validate.min.js file ist there, and it is. Any idea how to solve the problem?

  • BuddhaSource
    Avatar
    Community Member
    57 Posts

    Re: struggling with Userforms in 2.3.4 Link to this post

    I just upgraded to new stable form on 2.3.4 build SS. Re published using task.

    Now I am not able to publish or save my form type pages. Now the error I captured on FireBug is big .. but hope it gives you some in site.

    Currently I have to make minor changes, doing it right from database

    500//ERROR [User Error]: Couldn't run query:
    insert into `EditableFormField_versions` SET `Default` = null, `Required` = 1, `CanDelete` = 1, `CustomErrorMessage` = null, `CustomRules` = 'a:0:{}', `CustomSettings` = 'a:1:{s:10:\"ShowOnLoad\";s:4:\"Show\";}', `LastEdited` = now(), `ClassName` = 'EditableDropdown', `Created` = '2009-11-19 02:05:05', `Name` = 'EditableDropdown279', `Title` = 'Applying for', `Sort` = '1', `CustomParameter` = null, `ParentID` = '75', `Version` = 1, `RecordID` = 279

    Unknown column 'CustomParameter' in 'field list'
    IN POST /admin/EditForm
    Line 401 in /mnt/stor2-wc2-dfw1/426404/www.mywebsite.com/web/content/sapphire/core/model/MySQLDatabase.php

    Source
    ======
    392:    }
    393:    
    394:    function databaseError($msg, $errorLevel = E_USER_ERROR) {
    395:       // try to extract and format query
    396:       if(preg_match('/Couldn\'t run query: ([^\|]*)\|\s*(.*)/', $msg, $matches)) {
    397:          $formatter = new SQLFormatter();
    398:          $msg = "Couldn't run query: \n" . $formatter->formatPlain($matches[1]) . "\n\n" . $matches[2];
    399:       }
    400:       
    * 401:       user_error($msg, $errorLevel);
    402:    }
    403: }
    404:
    405: /**
    406: * A result-set from a MySQL database.
    407: * @package sapphire

    <ul>user_error(Couldn't run query:
    insert into `EditableFormField_versions` SET `Default` = null, `Required` = 1, `CanDelete` = 1, `CustomErrorMessage` = null, `CustomRules` = 'a:0:{}', `CustomSettings` = 'a:1:{s:10:\"ShowOnLoad\";s:4:\"Show\";}', `LastEdited` = now(), `ClassName` = 'EditableDropdown', `Created` = '2009-11-19 02:05:05', `Name` = 'EditableDropdown279', `Title` = 'Applying for', `Sort` = '1', `CustomParameter` = null, `ParentID` = '75', `Version` = 1, `RecordID` = 279

    Unknown column 'CustomParameter' in 'field list',256)
    line 401 of MySQLDatabase.php

    MySQLDatabase->databaseError(Couldn't run query: insert into `EditableFormField_versions` SET `Default` = null, `Required` = 1, `CanDelete` = 1, `CustomErrorMessage` = null, `CustomRules` = 'a:0:{}', `CustomSettings` = 'a:1:{s:10:\"ShowOnLoad\";s:4:\"Show\";}', `LastEdited` = now(), `ClassName` = 'EditableDropdown', `Created` = '2009-11-19 02:05:05', `Name` = 'EditableDropdown279', `Title` = 'Applying for', `Sort` = '1', `CustomParameter` = null, `ParentID` = '75', `Version` = 1, `RecordID` = 279 | Unknown column 'CustomParameter' in 'field list',256)
    line 102 of MySQLDatabase.php

    MySQLDatabase->query(insert into `EditableFormField_versions` SET `Default` = null, `Required` = 1, `CanDelete` = 1, `CustomErrorMessage` = null, `CustomRules` = 'a:0:{}', `CustomSettings` = 'a:1:{s:10:\"ShowOnLoad\";s:4:\"Show\";}', `LastEdited` = now(), `ClassName` = 'EditableDropdown', `Created` = '2009-11-19 02:05:05', `Name` = 'EditableDropdown279', `Title` = 'Applying for', `Sort` = '1', `CustomParameter` = null, `ParentID` = '75', `Version` = 1, `RecordID` = 279)
    line 418 of Database.php

    Database->manipulate(Array)
    line 133 of DB.php

    DB::manipulate(Array)
    line 893 of DataObject.php

    DataObject->write()
    line 292 of EditableFormField.php

    EditableFormField->populateFromPostData(Array)
    line 116 of EditableMultipleOptionField.php

    EditableMultipleOptionField->populateFromPostData(Array)
    line 146 of FieldEditor.php

    FieldEditor->saveInto(UserDefinedForm)
    line 886 of Form.php

    Form->saveInto(UserDefinedForm,1)
    line 649 of LeftAndMain.php

    LeftAndMain->save(Array,Form,HTTPRequest)
    line 241 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 277 of Director.php

    Director::handleRequest(HTTPRequest,Session)
    line 121 of Director.php

    Director::direct(/admin/EditForm)
    line 118 of main.php

    </ul>
    http://mywebsite.com/cms/javascript/LeftAndMain.js?m=1251788926
    Line undefined

  • BuddhaSource
    Avatar
    Community Member
    57 Posts

    Re: struggling with Userforms in 2.3.4 Link to this post

    Any possible solutions to this problem above ? I am really stuck right now.

    More over I am having new problems.
    When I run the publishing task it un-publishing some forms.

  • Willr
    Avatar
    Forum Moderator
    5497 Posts

    Re: struggling with Userforms in 2.3.4 Link to this post

    This is because an issue of old data not being removed - SS doesn't delete columns which aren't needed in the database (for data safely purposes) so occasionally you will get issues of columns existing (or not). The fix for this issue is to drop the customparameter field from the EditableFormField table. You can do this via a GUI like phpmyadmin or via mysql command line

    ALTER TABLE `EditableFormField` DROP `CustomParameter`;

  • OzziNL
    Avatar
    Community Member
    37 Posts

    Re: struggling with Userforms in 2.3.4 Link to this post

    Hi,
    I faced the same problem and did the trick mentioned above.
    Now I have the following problem when addind a field:

    (SS: 2.3.4 and UserForms: 0.2.1)

    ERROR [User Error]: Couldn't run query:
    insert into `EditableFormField_versions` SET `ClassName` = 'EditableTextField', `CanDelete` = 1, `LastEdited` = now(), `Created` = now(), `Name` = null, `Title` = null, `Default` = null, `Sort` = '0', `Required` = '0', `ParentID` = '0', `CustomErrorMessage` = null, `CustomRules` = null, `ShowOnLoad` = '0', `CustomSettings` = null, `Version` = 1, `RecordID` = 39

    Unknown column 'ShowOnLoad' in 'field list'
    IN GET /admin/EditForm/field/Fields/addfield?NewID=1&Type=EditableTextField
    Line 401 in /var/www/vhosts/kneib.com/httpdocs/sapphire/core/model/MySQLDatabase.php

    --------- update:
    Dropped all EditableFormField database entries and ran /dev/build ... now it is fine

  • Fred C.
    Avatar
    Community Member
    18 Posts

    Re: struggling with Userforms in 2.3.4 Link to this post

    To clarify Will's post, you have to drop the column that's mentioned in your error message. In our case, it was ShowOnLoad, hence: alter table EditableFormField drop ShowOnLoad;

    3556 Views
Page: 1 2
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.