21492 Posts in 5783 Topics by 2621 members
General Questions
SilverStripe Forums » General Questions » [Solved] GridFieldConfig_RelationEditor URI Too Large on autofill
General questions about getting started with SilverStripe that don't fit in any of the categories above.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 574 Views |
-
[Solved] GridFieldConfig_RelationEditor URI Too Large on autofill

14 August 2012 at 11:37am Last edited: 14 August 2012 11:38am
Gridfield is such a new part of the SS 3.0 release, it should have a module forum of its own, IMO.
So I have a method of Relational but as soon as I type in something in the field, I get an immediate notice:
An error occured while fetching data from the server
Please try again later.And then a growl inside the admin: "Request-URI Too Large"
Book.php:
public function getCMSFields() {
$fields = parent::getCMSFields();$config = GridFieldConfig_RelationEditor::create();
$f = new GridField('Testimonials', 'Testimonials', $this->Testimonials(), $config);
$fields->addFieldToTab('Root.Testimonials', $f);
return $fields;
}
Testimonial.php Dataobjectpublic static $db = array(
'Title' => 'Varchar(255)',
'Quote' => 'HTMLText',
'Tagline' => 'Varchar(255)',
'SortOrder' => 'Varchar(255)'
);
public static $has_one = array(
'Book' => 'Book',
'Image' => 'Image'
); -
Re: [Solved] GridFieldConfig_RelationEditor URI Too Large on autofill

15 August 2012 at 12:06pm
I'm also experiencing this. Seems to occur very randomly.
-
Re: [Solved] GridFieldConfig_RelationEditor URI Too Large on autofill

17 August 2012 at 9:39pm
Just like my other SS3 issues, I just needed to grab this site's stable version, instead of github nightlies of the framework. My problem went away.
-
Re: [Solved] GridFieldConfig_RelationEditor URI Too Large on autofill

31 August 2012 at 9:05pm
Even though this is marked "Solved" I still experience the same problem with 3.0.1 stable. The problem seems to be that on line 305 of GridField.js, the whole serialized form plus the attached search string is sent to the server.
data: form.serialize()+'&'+escape(searchField.attr('name'))+'='+escape(searchField.val())
In my case, i have some pretty complex, multitabbed pagetypes that may contain large textblocks. As soon as the culminated contents extend the servers uri-limit all relation search fields cease to work.
For a try, i just removed passing the serialized form from above line and the search field still works! I don't know if this breaks something elsewhere, though. Is anybody able to explain what submitting the whole form data is good for in the first place? I assume that there has to be a reason...
Cheers, mats
-
Re: [Solved] GridFieldConfig_RelationEditor URI Too Large on autofill

2 September 2012 at 6:04pm
Doesn't work for me either in 3.0.1 Stable. I've tried mats's fix with removing serialized form sending and it worked. Also auto-complete doesn't work with cyrillic symbols, it does search only latin ones. So I can't now use many to many editor at all as I have to search by name and have russian symbols in there. I miss the old data manager checkboxes style to add many-to-many objects
-
Re: [Solved] GridFieldConfig_RelationEditor URI Too Large on autofill

25 September 2012 at 1:50am Last edited: 25 September 2012 1:56am
Same problem in 3.0.2 stable. One GridField is working with autocomplete the other isn't. Very strange.
Mats' solution still works but the question remains about unforseen consequences when editing scripts in the framework folder.
Also I pledge for a return of the checkboxes that made working with manymanycomplexfields very intuitive.I propose to reopen this thread to status [Not solved].
-
Re: [Solved] GridFieldConfig_RelationEditor URI Too Large on autofill

26 September 2012 at 10:10pm
There's a bug report on this issue here: http://open.silverstripe.org/ticket/7828
-
Re: [Solved] GridFieldConfig_RelationEditor URI Too Large on autofill

23 November 2012 at 4:27am
Has anybody run into any problems when making the gridfield.js modification in this post?
I've run into the same issue, so need a fix asap and this looks like it can work.
| 574 Views | ||
|
Page:
1
|
Go to Top |






