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   8167 Views

Avatar
okotoker

Community Member, 50 Posts

6 June 2012 at 11:27am

I have just moved a site from beta1 to beta3 and I am encountering issues with the Relation Editor that I didn't have before. If I have just opened or refreshed a page and then click on one of my items in the editor it opens just fine, but if I do not refresh the page and try to go back and view another item I get two popups that say "not found". Again if I refresh the page it works again.

I tried just adding components instead of using the GridFieldConfig_RelationEditor and once I get that going and I click on a edit button I get two popups again that say "forbidden".

Here is what I have. I included the two different ways I have tried, so both methods below are not used at the same time. I also have included setDisplayFields in the code below. However I have to remove this as well or I get a setDisplayFields is not available error.

public static $has_many = array(
   'Lots'=>'Lot'
);
		
		public function getCMSFields() {
			$f = parent::getCMSFields();
			
			$o = DataList::create('Lot');
			$config = new GridFieldConfig_RelationEditor();

                        Or I tried using this
                        $config = new GridFieldConfig();
			$config->addComponent(new GridFieldDataColumns());
			$config->addComponent(new GridFieldSortableHeader());
			$config->addComponent(new GridFieldPaginator());
			$config->addComponent(new GridFieldEditButton());

			$gridField = new GridField('Lots','Lots',$o,$config);
			
$gridField->setDisplayFields(array(
			    'ID' => 'ID',
			    'Address' => 'Address'
			));
			
			$f->addFieldToTab('Root.Main',$gridField);
			
			return $f;

Thanks for any help.

Avatar
Bolixe

Community Member, 19 Posts

7 June 2012 at 3:41am

Hi okotoker,

I am upgrading my project to SS3 b3. I was using before the version 2.4.6 with the manymanycomplextablefield to manage the relationships. This is the last step to finish my upgrading.

I was playing also with the "GridFieldConfig_RelationEditor" and I get the same error than you, after editing one then I get "not found" message. In addition there is noway to add/delete relations between the dataobjects something like checkbox or dropdown.

I had a look in the core, "framework/forms/gridfield" for the classes in the files "GridFieldConfig.php and GridField.php" and everything look fine. It calls the right class but it doesn´t work properly like I said.

I also saw the changelog of the beta3 about the grieldfield that will replace all the complextablefields and I do like they describe but still the same result.

http://doc.silverstripe.org/sapphire/en/trunk/changelogs//3.0.0#tab-paths ( It is above of this paragraph about tabs )

Then my conclusion is that could be there is a little bugs, but its normal is beta version still. Lets keep calm hehe

Greetings

Avatar
okotoker

Community Member, 50 Posts

7 June 2012 at 5:14am

Yeah strange enough I do have add edit and delete buttons using the RelationEditor unlike you. I have also encountered a problem with the drag and drop upload of images when adding or updating and item. I get error in red right next to the image that says "not found" as well. I can drag and drop in the files section and then use the "from files" button in the item to get the file to work.

One other thing thats not an error ( I don't think ) but just seems odd is that the back button that appears at the top when in a item takes me back to my home page and not back to the page with my GridField. It did this in beta1 so I think its intentional.

Like you said its is a beta. So I think I will just set this site aside until SS3 actually launches. I am loving the new system though. Good job Silverstripe team!

Avatar
Bolixe

Community Member, 19 Posts

7 June 2012 at 8:56pm

Good morning!

When I use the RelationEditor I have add new entry, edit and delete buttons for each row as well.
What I don´t get is the checkboxes or something like this to add or delete relationship between dataobjects.

About the uploadfield I have not the same problem that you, it uploads fine but then I save and access again this entry and the images aren´t there, I have to add twice and it works. I don´t get this error next to image.
Another thing is what you said, press back button and go back directly to the homepage, try to acces again one entry and get popup "not found".

Despite of this, the rest is really good. I love the new system too, specially the improvements in the template system, and the interface is cool for the customers.

Great job!!!

Avatar
okotoker

Community Member, 50 Posts

8 June 2012 at 3:20am

The having to save the image after creating your new object is the same behaviour you get when using DataObjectManager in SS2. You would get a message in that case that would tell you that you needed to create the object before attaching an image. So I don't think this is a bug.

Avatar
Bolixe

Community Member, 19 Posts

19 June 2012 at 1:46am

Hi,

I start the morning with good news, I saw the SS3 RC1 is launched. I thought, I expected that the problem with the GridFieldConfig_RelationEditor to manage the relationships will be over. So I intalled it, but the result it is the same.

I really wonder if I am doing something wrong. Also I wonder if somebody achieved this in SS3. I would like to present a project for a customer in SS 3 instead of SS 2.4.7. I think even in pay some money if somebody have done this and it is working properly.

Thanks for any answer, greetings

Avatar
okotoker

Community Member, 50 Posts

19 June 2012 at 11:46am

So I downloaded the RC and gave it a try. I didn't try to upgrade the site beta-3 that I am working on, that was having the problems I just created a test with just the basics for creating and using a grid field. Everything worked great. So I am thinking either the bug is gone or the more likely explanation I screwed something up upgrading from one beta to another.

So I don't think the problem we were having is still there. I will report back once I get the beta-3 site upgraded.

Avatar
okotoker

Community Member, 50 Posts

19 June 2012 at 1:04pm

I can confim after upgrading from Beta 3 to RC 1 that the relation editor now works as expected on my site.

Go to Top