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.

All other Modules /

Discuss all other Modules here.

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

Userforms & Newsletter - please please please help


Reply


1030 Views

Avatar
bones

Community Member, 104 Posts

2 February 2010 at 3:48am

Edited: 02/02/2010 3:49am

I am really at my wit's end with this problem. I just don't know where to turn. I'm running about a dozen SS websites, and this is the only one that's causing me the problem.

In a nutshell, logging into admin and clicking on a Newsletter or User Defined Form page brings up a big long error message (see attached screenshot). But here's the odd bit: the same website (same files, data, MySQL database content) works fine in MAMP. I've even got two installations running in MAMP, both identical, which work perfectly.

I have tried:
Upgrading to the latest versions of Newsletter and UDF.
Downgrading SS, Newsletter and UDF modules to an older version (from another of my websites that works fine)
Upgrading to the latest trunk versions of Newsletter and UDF modules
Deleting all tables from the online site, and replacing them with an export from the local version
Running dev/build, admin?flush=all, db/build, db/build?flush
Uploaded a fresh version of SS

The hosting is shared, and other SS installations are running just fine.

I have given up Friday, Saturday, Sunday and now a good chunk of Monday trying to fix this. It's the same problem every single time!

Here's a complete copy of the error from the screen grab:

ERROR [Warning]: ClassInfo::dataClassesFor() no parents for UserDefinedForm_EmailRecipient
IN POST /admin/getitem?ID=5&ajax=1
Line 79 in /home/asangree/public_html/sapphire/core/ClassInfo.php

Source
======
70:     * @todo Move this into data object
71:     * @return array
72:     */
73:    static function dataClassesFor($class) {
74:       global $_ALL_CLASSES;
75:       if (is_object($class)) $class = get_class($class);
76:       
77:       $dataClasses = array();
78:       
* 79:       if(!$_ALL_CLASSES['parents'][$class]) user_error("ClassInfo::dataClassesFor() no parents for
$class", E_USER_WARNING);
80:       foreach($_ALL_CLASSES['parents'][$class] as $subclass) {
81:          if(DataObject::has_own_table($subclass)) $dataClasses[] = $subclass;
82:       }
83:       
84:       if(DataObject::has_own_table($class)) $dataClasses[] = $class;
85:

<ul>user_error(ClassInfo::dataClassesFor() no parents for UserDefinedForm_EmailRecipient,512)
line 79 of ClassInfo.php

ClassInfo::dataClassesFor(UserDefinedForm_EmailRecipient)
line 2258 of DataObject.php

DataObject->buildSQL((FormID = '5') AND (`FormID` = '5'),,,,1,)
line 2350 of DataObject.php

DataObject->extendedSQL((FormID = '5') AND (`FormID` = '5'),,,)
line 454 of TableListField.php

TableListField->getQuery()
line 410 of TableListField.php

TableListField->sourceItems()
line 265 of ComplexTableField.php

ComplexTableField->FieldHolder()

call_user_func_array(Array,Array)
line 408 of ViewableData.php

ViewableData->XML_val(FieldHolder,,1)
line 74 of .cache.home.asangree.public_html.sapphire.templates.TabSetFieldHolder.ss

include(/tmp/silverstripe-cache-home-asangree-public_html/.cache.home.asangree.public_html.sapphire.templates.TabSetFieldHolder.ss)
line 357 of SSViewer.php

SSViewer->process(TabSet)
line 773 of ViewableData.php

ViewableData->renderWith(TabSetFieldHolder)
line 62 of TabSet.php

TabSet->FieldHolder()

call_user_func_array(Array,Array)
line 408 of ViewableData.php

ViewableData->XML_val(FieldHolder,,1)
line 59 of .cache.home.asangree.public_html.sapphire.templates.TabSetFieldHolder.ss

include(/tmp/silverstripe-cache-home-asangree-public_html/.cache.home.asangree.public_html.sapphire.templates.TabSetFieldHolder.ss)
line 357 of SSViewer.php

SSViewer->process(TabSet)
line 773 of ViewableData.php

ViewableData->renderWith(TabSetFieldHolder)
line 62 of TabSet.php

TabSet->FieldHolder()

call_user_func_array(Array,Array)
line 408 of ViewableData.php

ViewableData->XML_val(FieldHolder,,1)
line 70 of .cache.home.asangree.public_html.sapphire.templates.Includes.Form.ss

include(/tmp/silverstripe-cache-home-asangree-public_html/.cache.home.asangree.public_html.sapphire.templates.Includes.Form.ss)
line 357 of SSViewer.php

SSViewer->process(Form)
line 773 of ViewableData.php

ViewableData->renderWith(Array)
line 982 of Form.php

Form->forTemplate()
line 1005 of Form.php

Form->formHtmlContent()
line 349 of LeftAndMain.php

LeftAndMain->getitem(HTTPRequest)
line 159 of Controller.php

Controller->handleAction(HTTPRequest)
line 129 of RequestHandler.php

RequestHandler->handleRequest(HTTPRequest)
line 119 of Controller.php

Controller->handleRequest(HTTPRequest)
line 277 of Director.php

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

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

</ul>

Submitting a form from the front end gives this error message

[Warning] ClassInfo::dataClassesFor() no parents for UserDefinedForm_EmailRecipient
POST /contact-us-2/Form

Line 79 in /home/asangree/public_html/sapphire/core/ClassInfo.php

Source

70     * @todo Move this into data object
71     * @return array
72     */
73    static function dataClassesFor($class) {
74       global $_ALL_CLASSES;
75       if (is_object($class)) $class = get_class($class);
76       
77       $dataClasses = array();
78       
79       if(!$_ALL_CLASSES['parents'][$class]) user_error("ClassInfo::dataClassesFor() no parents for $class", E_USER_WARNING);
80       foreach($_ALL_CLASSES['parents'][$class] as $subclass) {
81          if(DataObject::has_own_table($subclass)) $dataClasses[] = $subclass;
82       }
83       
84       if(DataObject::has_own_table($class)) $dataClasses[] = $class;
85
Trace

ClassInfo::dataClassesFor() no parents for UserDefinedForm_EmailRecipient
Line 79 of ClassInfo.php
ClassInfo::dataClassesFor(UserDefinedForm_EmailRecipient)
Line 2258 of DataObject.php
DataObject->buildSQL(FormID = '5',,,,1,)
Line 2350 of DataObject.php
DataObject->extendedSQL(FormID = '5',,,)
Line 1144 of DataObject.php
DataObject->getComponentsQuery(EmailRecipients,,,,)
Line 1099 of DataObject.php
DataObject->getComponents(EmailRecipients)
call_user_func_array(Array,Array)
Line 565 of Object.php
Object->__call(emailrecipients,Array)
UserDefinedForm->emailrecipients()
call_user_func_array(Array,Array)
Line 550 of Object.php
Object->__call(EmailRecipients,Array)
UserDefinedForm_Controller->EmailRecipients()
Line 564 of UserDefinedForm.php
UserDefinedForm_Controller->process(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 119 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(/contact-us-2/Form)
Line 118 of main.php


If anyone can help, I would be so grateful.