Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » userforms module completely broke my site - VERY CRITICAL PROBLEM

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 1574 Views
  • François
    Avatar
    25 Posts

    userforms module completely broke my site - VERY CRITICAL PROBLEM Link to this post

    I installed the userforms module in SS 2.3.0-rc1.

    I followed instruction (hard to find by the way) in http://doc.silverstripe.com/doku.php?id=upgrading#user_defined_form

    I had to install the trunk version of the module as the link to the 0.1 version doesn't work.

    After having rebuild the db I created a page and assigned the "User defined form" page type to this new page.

    When saving this page I got the message "Error saving...". Since that, I can not longer log in the CMS. I get the error reproduced at the end of this post.

    I have completely lost access to the admin of my site!!! What can I do to retrieve it?

    Even if I remove the userforms modules (only the files, not the db tables) I still get a fatal error when trying to access to cms.

    I sincerely hope somebody can help me.

    UPDATE:
    I suspected a problem related to some i18n field (because i18n is really severely broken in SS) and I changed the Locale of my user (directly in the Member table) from "fr_FR" back to "en_US". And, voilà, I can access the CMS.

    But my problem is not solved because my client doesn't speak english and want to work in french and/or german. What can I do or where can I look in the code to try to solve this problem?

    [User Error] FieldSet::addFieldToTab() Tried to add a tab to object 'Tab' named 'Complétion en cours' - '' didn't exist.
    GET /ss230/admin/?flush=1

    Line 250 in /home/francois/workspace/labo_ss2.3.0-rc1/sapphire/forms/FieldSet.php
    Source

    241                // use $title on the innermost tab only
    242                if($title && $k == count($parts)-1) {
    243                   $currentPointer = new Tab($part, $title);
    244                } else {
    245                   $currentPointer = new Tab($part);
    246                }
    247                $parentPointer->push($currentPointer);
    248             } else {
    249                $withName = ($parentPointer->hasMethod('Name')) ? " named '{$parentPointer->Name()}'" : null;
    250                user_error("FieldSet::addFieldToTab() Tried to add a tab to object '{$parentPointer->class}'{$withName} - '$part' didn't exist.", E_USER_ERROR);
    251             }
    252          }
    253       }
    254       
    255       return $currentPointer;
    256    }

    Trace

    * FieldSet::addFieldToTab() Tried to add a tab to object 'Tab' named 'Complétion en cours' - '' didn't exist.
    Line 250 of FieldSet.php
    * FieldSet->findOrMakeTab(Root.Content.Complétion en cours...)
    Line 91 of FieldSet.php
    * FieldSet->addFieldToTab(Root.Content.Complétion en cours...,HtmlEditorField)
    Line 38 of UserDefinedForm.php
    * UserDefinedForm->getCMSFields(CMSMain)
    Line 375 of CMSMain.php
    * CMSMain->getEditForm(3)
    Line 740 of LeftAndMain.php
    * LeftAndMain->EditForm()
    * call_user_func_array(Array,Array)
    Line 551 of ViewableData.php
    * ViewableData->cachedCall(EditForm,,)
    Line 592 of ViewableData.php
    * ViewableData->hasValue(EditForm)
    Line 66 of .cache.home.francois.workspace34.labo_ss2.3.0-rc1.cms.templates.Includes.CMSMain_right.ss
    * include(/tmp/silverstripe-cache-var-www-ss230/.cache.home.francois.workspace34.labo_ss2.3.0-rc1.cms.templates.Includes.CMSMain_right.ss)
    Line 328 of SSViewer.php
    * SSViewer->process(CMSMain)
    Line 774 of ViewableData.php
    * ViewableData->renderWith(Array)
    Line 341 of LeftAndMain.php
    * LeftAndMain->Right()
    * call_user_func_array(Array,Array)
    Line 409 of ViewableData.php
    * ViewableData->XML_val(Right,,1)
    Line 114 of .cache.home.francois.workspace34.labo_ss2.3.0-rc1.cms.templates.LeftAndMain.ss
    * include(/tmp/silverstripe-cache-var-www-ss230/.cache.home.francois.workspace34.labo_ss2.3.0-rc1.cms.templates.LeftAndMain.ss)
    Line 328 of SSViewer.php
    * SSViewer->process(CMSMain)
    Line 177 of Controller.php
    * Controller->handleAction(HTTPRequest)
    Line 107 of RequestHandler.php
    * RequestHandler->handleRequest(HTTPRequest)
    Line 124 of Controller.php
    * Controller->handleRequest(HTTPRequest)
    Line 246 of Director.php
    * Director::handleRequest(HTTPRequest,Session)
    Line 106 of Director.php
    * Director::direct(/admin/)
    Line 92 of main.php

  • François
    Avatar
    25 Posts

    Re: userforms module completely broke my site - VERY CRITICAL PROBLEM Link to this post

    to solve, temporarily, the problem:

    in userforms/lang/fr_FR.php

    replace:

    $lang['fr_FR']['UserDefinedForm']['ONCOMPLETE'] = 'Complétion en cours...';

    with:

    $lang['fr_FR']['UserDefinedForm']['ONCOMPLETE'] = 'On complete';

    But I think the REAL problem lies in the following code:

    userforms/code/UserDefinedForm.php :

    $fields->addFieldToTab("Root.Content."._t('UserDefinedForm.ONCOMPLETE','On complete'), new HtmlEditorField( "OnCompleteMessage", _t('UserDefinedForm.ONCOMPLETELABEL', 'Show on completion'),3,"",_t('UserDefinedForm.ONCOMPLETEMESSAGE', $this->OnCompleteMessage), $this ) );

    1574 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.