Simon is right. I have tried your code quanto, the only fail I get is about 'FotoPagina' because I have not this class.
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.
- Previous 10 entries
- 1
- 2
- Page 33(current)
- 4
- Next 10 entries
It works in Firefox fine now. Altough in Chrome it still gives 'Not Found', and firebug responses with:
I can't handle sub-URLs of a Form object.
Tested on Chrome and IE. IE is ok, Chrome gives "Not found".
Hi everyone,
I've experienced that same issue using Chrome (20.0.1132.47) but have been able to upload a file (Image) successfully using FireFox 2.6.25.
My model is very simple and I checked as far as possible against the available documentation to make sure it wasn't my error. Will spend a bit more time on this tomorrow, but the problem does seems to have a link to the browser.
Cheers,
Innes (NZ)
this should be fixed by:
https://github.com/silverstripe/sapphire/commit/ba9c3c7b8e7c8f62e319d3cdb5cc4490b7a62f3b
try and use the latest version on GitHub.
Thanks Thi3r,
Upload works fine in Chrome now.
Cheers, Innes
It works for me too! Thanks.
Hi there...
I have that same error with a simple combination of a page and some data-rows...
adding and deleting a record work just fine, but editing a record failed...
I am using SS-3.0.2...
class BereicheMitglieder extends DataObject {
static $db = array(
'ID' => 'Int',
'Gruppe' => 'Text',
'Gruppeninfo' => 'HTMLText',
'Position1' => 'Varchar(200)',
'Person1' => 'Varchar(200)',
'Location1' => 'Varchar(200)',
'Contact1' => 'Varchar(200)',
'Bereiche' => 'HTMLText'
);
static $indexes = array(
'ID' => true,
);
static $searchable_fields = array(
'Person1', 'Location1', 'Contact1', 'Bereiche'
);
static $summary_fields = array(
'Gruppe', 'Position1', 'Person1'
);
static $has_one = array(
"BereicheMitgliederPage" => "BereicheMitgliederPage",
"Page" => "Page"
);
public function getCustomSearchContext() {
$fields = $this->scaffoldSearchFields(array(
'restrictFields' => self::$searchable_fields
));
$filters = array();
foreach ((array)self::$searchable_fields as $key => $fieldname) {
$filters[$fieldname] = new PartialMatchFilter($fieldname);
}
return new SearchContext(
$this->class,
$fields,
$filters
);
}
}
class Bereiche1Mitglieder extends BereicheMitglieder {}
class Bereiche2Mitglieder extends BereicheMitglieder {}
class Bereiche3Mitglieder extends BereicheMitglieder {}
class BereicheMitgliederPage extends Page {
public static $has_many = array(
"Bereich1Mitglieders" => "Bereiche1Mitglieder",
"Bereich2Mitglieders" => "Bereiche2Mitglieder",
"Bereich3Mitglieders" => "Bereiche3Mitglieder"
);
public static $db = array(
"Bereichtitle1" => "Varchar(255)",
"Bereichtitle2" => "Varchar(255)",
"Bereichtitle3" => "Varchar(255)"
);
function getCMSFields() {
$fields = parent::getCMSFields();
$gridFieldConfig1 = GridFieldConfig::create()->addComponents(
new GridFieldToolbarHeader(),
new GridFieldAddNewButton('toolbar-header-right'),
new GridFieldSortableHeader(),
new GridFieldDataColumns(),
new GridFieldPaginator(10),
new GridFieldEditButton(),
new GridFieldDeleteAction(),
new GridFieldDetailForm()
);
$gridFieldConfig2 = GridFieldConfig::create()->addComponents(
new GridFieldToolbarHeader(),
new GridFieldAddNewButton('toolbar-header-right'),
new GridFieldSortableHeader(),
new GridFieldDataColumns(),
new GridFieldPaginator(10),
new GridFieldEditButton(),
new GridFieldDeleteAction(),
new GridFieldDetailForm()
);
$gridFieldConfig3 = GridFieldConfig::create()->addComponents(
new GridFieldToolbarHeader(),
new GridFieldAddNewButton('toolbar-header-right'),
new GridFieldSortableHeader(),
new GridFieldDataColumns(),
new GridFieldPaginator(10),
new GridFieldEditButton(),
new GridFieldDeleteAction(),
new GridFieldDetailForm()
);
$fields->addFieldToTab('Root.Bereiche', new TextField('Bereichtitle1', 'Überschrift Bereich 1'));
$itemsInGrid1 = DataList::create('Bereiche1Mitglieder');
$gridField1 = new GridField("Bereich1Mitglieders", "Bereiche und Mitglieder 1", $this->Bereich1Mitglieders(), $gridFieldConfig1);
$fields->addFieldToTab('Root.Bereiche', $gridField1);
$fields->addFieldToTab('Root.Bereiche', new TextField('Bereichtitle2', 'Überschrift Bereich 2'));
$itemsInGrid2 = DataList::create('Bereiche2Mitglieder');
$gridField2 = new GridField("Bereich2Mitglieders", "Bereiche und Mitglieder 2", $this->Bereich2Mitglieders(), $gridFieldConfig2);
$fields->addFieldToTab('Root.Bereiche', $gridField2);
$fields->addFieldToTab('Root.Bereiche', new TextField('Bereichtitle3', 'Überschrift Bereich 3'));
$itemsInGrid3 = DataList::create('Bereiche3Mitglieder');
$gridField3 = new GridField("Bereich3Mitglieders", "Bereiche und Mitglieder 3", $this->Bereich3Mitglieders(), $gridFieldConfig3);
$fields->addFieldToTab('Root.Bereiche', $gridField3);
return $fields;
}
}
class BereicheMitgliederPage_Controller extends Page_Controller {
public static $allowed_actions = array (
);
public function init() {
parent::init();
}
public function ListByNr ( $num = 0 ) {
if ( $num == 3 ) {
return Bereiche3Mitglieder::get();
} else if ( $num == 2 ) {
return Bereiche2Mitglieder::get();
} else {
return Bereiche1Mitglieder::get();
}
}
}
can somebody please point out what i am doing wrong?
- Previous 10 entries
- 1
- 2
- Page 33(current)
- 4
- Next 10 entries