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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

SS3 Gridfield "Not Found" Error


Go to End


27 Posts   8170 Views

Avatar
Bolixe

Community Member, 19 Posts

10 July 2012 at 12:46am

Simon is right. I have tried your code quanto, the only fail I get is about 'FotoPagina' because I have not this class.

Avatar
quanto

Community Member, 91 Posts

10 July 2012 at 2:42am

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.

Avatar
shmayek

Community Member, 3 Posts

10 July 2012 at 8:25pm

Tested on Chrome and IE. IE is ok, Chrome gives "Not found".

Avatar
nzblue_fish

Community Member, 13 Posts

11 July 2012 at 9:42pm

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)

Avatar
colymba

Community Member, 26 Posts

13 July 2012 at 3:41am

Edited: 13/07/2012 3:41am

this should be fixed by:
https://github.com/silverstripe/sapphire/commit/ba9c3c7b8e7c8f62e319d3cdb5cc4490b7a62f3b

try and use the latest version on GitHub.

Avatar
nzblue_fish

Community Member, 13 Posts

13 July 2012 at 2:03pm

Thanks Thi3r,

Upload works fine in Chrome now.

Cheers, Innes

Avatar
quanto

Community Member, 91 Posts

13 July 2012 at 7:35pm

It works for me too! Thanks.

Avatar
bb-drummer

Community Member, 14 Posts

8 November 2012 at 12:02am

Edited: 08/11/2012 12:03am

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?