Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

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

Userforms + SIlverStripe 2.4


Go to End


14 Posts   5348 Views

Avatar
Willr

Forum Moderator, 5523 Posts

17 May 2010 at 5:47pm

smartinet - turn on dev mode so you can see the actual error message and not the generic error page. See http://doc.silverstripe.org/debugging for how to put your site in devmode.

Avatar
smartinet

Community Member, 9 Posts

17 May 2010 at 5:50pm

I get this:

[User Error] Bad RecordClassName '' and $baseClass not set
GET /admin/?isDev=1
Line 2705 in /nfs/c04/h01/mnt/59767/domains/smartinet.net/html/sapphire/core/model/DataObject.php

Source
2696 foreach($records as $record) {
2697 if(empty($record['RecordClassName'])) {
2698 $record['RecordClassName'] = $record['ClassName'];
2699 }
2700 if(class_exists($record['RecordClassName'])) {
2701 $results[] = new $record['RecordClassName']($record);
2702 } else {
2703 if(!$baseClass) {
2704 user_error("Bad RecordClassName '{$record['RecordClassName']}' and "
2705 . "\$baseClass not set", E_USER_ERROR);
2706 } else if(!is_string($baseClass) || !class_exists($baseClass)) {
2707 user_error("Bad RecordClassName '{$record['RecordClassName']}' and bad "
2708 . "\$baseClass '$baseClass not set", E_USER_ERROR);
2709 }
2710 $results[] = new $baseClass($record);
2711 }
Trace
•Bad RecordClassName '' and $baseClass not set
Line 2705 of DataObject.php
•DataObject->buildDataObjectSet(MySQLQuery)
Line 569 of Hierarchy.php
•Hierarchy->liveChildren(1,1)

•call_user_func_array(Array,Array)
Line 693 of Object.php
•Object->__call(liveChildren,Array)

•SiteTree->liveChildren(1,1)
Line 438 of Hierarchy.php
•Hierarchy->doAllChildrenIncludingDeleted(CMSMain)
Line 416 of Hierarchy.php
•Hierarchy->AllChildrenIncludingDeleted(CMSMain)

•call_user_func_array(Array,Array)
Line 693 of Object.php
•Object->__call(AllChildrenIncludingDeleted,Array)

•SiteTree->AllChildrenIncludingDeleted(CMSMain)
Line 159 of Hierarchy.php
•Hierarchy->markChildren(SiteTree,CMSMain,AllChildrenIncludingDeleted,numChildren)
Line 94 of Hierarchy.php
•Hierarchy->markPartialTree(30,CMSMain,AllChildrenIncludingDeleted,numChildren)

•call_user_func_array(Array,Array)
Line 693 of Object.php
•Object->__call(markPartialTree,Array)

•SiteTree->markPartialTree(30,CMSMain,AllChildrenIncludingDeleted,numChildren)
Line 516 of LeftAndMain.php
•LeftAndMain->getSiteTreeFor(SiteTree)
Line 168 of CMSMain.php
•CMSMain->SiteTreeAsUL()
Line 369 of ViewableData.php
•ViewableData->obj(SiteTreeAsUL,,,1)
Line 445 of ViewableData.php
•ViewableData->XML_val(SiteTreeAsUL,,1)
Line 322 of .cache.nfs.c04.h01.mnt.59767.domains.smartinet.net.html.cms.templates.Includes.CMSMain_left.ss
•include(/nfs/c04/h01/mnt/59767/domains/smartinet.net/html/silverstripe-cache/.cache.nfs.c04.h01.mnt.59767.domains.smartinet.net.html.cms.templates.Includes.CMSMain_left.ss)
Line 392 of SSViewer.php
•SSViewer->process(CMSMain)
Line 342 of ViewableData.php
•ViewableData->renderWith(Array)
Line 483 of LeftAndMain.php
•LeftAndMain->Left()
Line 369 of ViewableData.php
•ViewableData->obj(Left,,,1)
Line 445 of ViewableData.php
•ViewableData->XML_val(Left,,1)
Line 59 of .cache.nfs.c04.h01.mnt.59767.domains.smartinet.net.html.cms.templates.LeftAndMain.ss
•include(/nfs/c04/h01/mnt/59767/domains/smartinet.net/html/silverstripe-cache/.cache.nfs.c04.h01.mnt.59767.domains.smartinet.net.html.cms.templates.LeftAndMain.ss)
Line 392 of SSViewer.php
•SSViewer->process(CMSMain)
Line 202 of Controller.php
•Controller->handleAction(SS_HTTPRequest)
Line 134 of RequestHandler.php
•RequestHandler->handleRequest(SS_HTTPRequest)
Line 147 of Controller.php
•Controller->handleRequest(SS_HTTPRequest)
Line 283 of Director.php
•Director::handleRequest(SS_HTTPRequest,Session)
Line 127 of Director.php
•Director::direct(/admin/)
Line 127 of main.php

I'm currently looking through this: http://silverstripe.org/dataobjectmanager-module-forum/show/282242#post282242 to try to resolve as it appears it has dropped records from my DB.

Avatar
smartinet

Community Member, 9 Posts

17 May 2010 at 6:06pm

And I'm officially lost. I can't find any missing ClassName values in any number of tables I have queried.

Can you provide any further assistance or do I need to scrap this install and start all over again? This was a public site.

Avatar
Willr

Forum Moderator, 5523 Posts

17 May 2010 at 9:29pm

Hmm the common tables to check for blank classnames (it could be any) but have a look at SiteTree, SiteTree_Live and File as the main ones but yea it sounds like somehow you lost a class somewhere along the way. Did you have any other modules installed? Did you upgrade from 2.3 or was this a 2.4 site to start with?

Avatar
smartinet

Community Member, 9 Posts

17 May 2010 at 10:24pm

Edited: 17/05/2010 10:39pm

The original environment was 2.3.6 with userforms 0.2.0. No other modules were installed.
I upgraded to 2.4.0 with no issues, apart from 500 server errors when editing forms through the CMS. I then tried 0.2.1 which didn't work either, then loaded r103514 which caused the CMS errors, then as a last ditch effort I tried r104941.
dev/build/?flush=1 was run after each change.
I have now manually gone through the tables and see the missing fields for the pages that were related to userforms. I also noticed a number of tables were renamed to obsolete_??? which seems odd. I fixed the fields, but still no joy.
Oh and of course, I completely removed userforms and rebuilt, however that seems to have no effect.

Avatar
Silver2010

Community Member, 5 Posts

30 January 2012 at 11:22pm

Dear Memebers,

I have a big spam problem with my userform. Somebody send me the whole time spam mails. I saw that you have an update on userforms (Version 4.0) with captcha.

I’d like to update my old userforms (version from 2009) with silverstripe 2.3.3.? Is that possible too update this version? Could you explain in easy steps what I have to do?

Can I overwrite it the userforms folder on the ftp server and later I rebuild the database (/dev/build). Should I have too rebuild the forms again? That would be bad.

Please help me with infos!

Thanks
Clemens

Go to Top