21277 Posts in 5728 Topics by 2599 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1007 Views |
-
Backend problem with ?ajax=1

15 December 2009 at 6:46am
Hi everybody
My problem looks like this one: http://www.silverstripe.org/general-questions/show/274833?start=0 but is different so please don't merge topics or something like this
.
Problem:
when I try to edit some pages, I receive a javascript alert with "502 gateway problem"
I found the ajax request ( SITE/admin/getitem?ID=XX&locale=ro_RO&ajax=1 ) and I try separate. With ?ajax=1 is same problem but wihout him is ok (the form with informations appear ok)With &debug_request=1 the message is:
Debug (line 110 of RequestHandler.php): Testing '$Action//$ID/$OtherID' with 'getitem' on CMSMain
Debug (line 116 of RequestHandler.php): Rule '$Action//$ID/$OtherID' matched to action 'handleAction' on CMSMain. Latest request params: array (
'Action' => 'getitem',
'ID' => NULL,
'OtherID' => NULL,
)Debug (line 136 of SSViewer.php): Selecting templates from the following list: Form, Form
Debug (line 160 of SSViewer.php): Found template 'Form' from main template archive, containing the following items: array (
'Includes' => '/var/www/sapphire/templates/Includes/Form.ss',
)Debug (line 160 of SSViewer.php): Found template 'Form' from main template archive, containing the following items: array (
'Includes' => '/var/www/sapphire/templates/Includes/Form.ss',
)Debug (line 171 of SSViewer.php): Final template selections made: array (
'Includes' => '/var/www/sapphire/templates/Includes/Form.ss',
)Debug (line 136 of SSViewer.php): Selecting templates from the following list: TabSetFieldHolder
Debug (line 160 of SSViewer.php): Found template 'TabSetFieldHolder' from main template archive, containing the following items: array (
'main' => '/var/www/sapphire/templates/TabSetFieldHolder.ss',
)Debug (line 171 of SSViewer.php): Final template selections made: array (
'main' => '/var/www/sapphire/templates/TabSetFieldHolder.ss',
)Debug (line 136 of SSViewer.php): Selecting templates from the following list: TabSetFieldHolder
Debug (line 160 of SSViewer.php): Found template 'TabSetFieldHolder' from main template archive, containing the following items: array (
'main' => '/var/www/sapphire/templates/TabSetFieldHolder.ss',
)Debug (line 171 of SSViewer.php): Final template selections made: array (
'main' => '/var/www/sapphire/templates/TabSetFieldHolder.ss',
)Debug (line 136 of SSViewer.php): Selecting templates from the following list: RelationComplexTableField
Debug (line 160 of SSViewer.php): Found template 'RelationComplexTableField' from main template archive, containing the following items: array (
'main' => '/var/www/sapphire/templates/RelationComplexTableField.ss',
)Debug (line 171 of SSViewer.php): Final template selections made: array (
'main' => '/var/www/sapphire/templates/RelationComplexTableField.ss',
)Debug (line 136 of SSViewer.php): Selecting templates from the following list: RelationComplexTableField
Debug (line 160 of SSViewer.php): Found template 'RelationComplexTableField' from main template archive, containing the following items: array (
'main' => '/var/www/sapphire/templates/RelationComplexTableField.ss',
)Debug (line 171 of SSViewer.php): Final template selections made: array (
'main' => '/var/www/sapphire/templates/RelationComplexTableField.ss',
)Debug (line 136 of SSViewer.php): Selecting templates from the following list: TabSetFieldHolder
Debug (line 160 of SSViewer.php): Found template 'TabSetFieldHolder' from main template archive, containing the following items: array (
'main' => '/var/www/sapphire/templates/TabSetFieldHolder.ss',
)Debug (line 171 of SSViewer.php): Final template selections made: array (
'main' => '/var/www/sapphire/templates/TabSetFieldHolder.ss',
)I'm very primitive with SilverStripe and I don't have any idea how can I debug this if with other pages works good.
Thank you
-
Re: Backend problem with ?ajax=1

15 December 2009 at 9:39pm
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Main', new CalendarDateField('FromDate'), 'Content');
$fields->addFieldToTab('Root.Content.Main', new CalendarDateField('ToDate'), 'Content');
$fields->addFieldToTab('Root.Content.Main', new HTMLEditorField('Abstract'), 'Content');
$fields->addFieldToTab('Root.Content.Main', new ImageField('Photo'));
$actionTablefield = new ManyManyComplexTableField(
$this,
'Participants',
'Member',
array(
'Surname' => 'Nume',
'FirstName' => 'Prenume',
'Email' => 'E-mail'
),
'getMemberFormFields'
);
$actionTablefield->setAddTitle( 'Participanti' );
$actionTablefield->setReadOnly('true');
$actionTablefield->setDisabled('true');
$fields->addFieldToTab( 'Root.Content.Participanti', $actionTablefield );somewhere here is the problem. without "Participanti" tab everything is ok
-
Re: Backend problem with ?ajax=1

16 December 2009 at 6:09am
Well this is the entire code:
class Concursuri extends Page
{
public static $db = array(
'Abstract'=>'HTMLVarchar(500)',
'FromDate'=>'Date',
'ToDate'=>'Date'
);
public static $has_one = array(
'Photo'=>'Image'
);static $many_many = array(
'Participants'=>'Member',
'Castigatori'=>'Member'
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Main', new CalendarDateField('FromDate'), 'Content');
$fields->addFieldToTab('Root.Content.Main', new CalendarDateField('ToDate'), 'Content');
$fields->addFieldToTab('Root.Content.Main', new HTMLEditorField('Abstract'), 'Content');
$fields->addFieldToTab('Root.Content.Main', new ImageField('Photo'));
$actionTablefield = new ManyManyComplexTableField(
$this,
'Participants',
'Member',
array(
'Surname' => 'Nume',
'FirstName' => 'Prenume',
'Email' => 'E-mail'
),
'getMemberFormFields'
);
$actionTablefield->setAddTitle( 'Participanti' );
$actionTablefield->setReadOnly('true');
$actionTablefield->setDisabled('true');
$fields->addFieldToTab( 'Root.Content.Participanti', $actionTablefield );
$actionTablefield1 = new ManyManyComplexTableField(
$this,
'Castigatori',
'Member',
array(
'Surname' => 'Nume',
'FirstName' => 'Prenume',
'Email' => 'E-mail'
),
'getMemberFormFields'
);
$actionTablefield1->setAddTitle( 'Castigatori' );
$fields->addFieldToTab( 'Root.Content.Castigatori', $actionTablefield1 );
return $fields;}
}The problem is where I add a new tabs but I don't have any ideea how can I debug. Thanks
| 1007 Views | ||
|
Page:
1
|
Go to Top |

