Strange URLs when used together with GridField #35

bumbus opened this Issue Jul 13, 2012 · 6 comments


None yet

4 participants

bumbus commented Jul 13, 2012

Hi there,
I experienced some strange behaviour using translatable together with the GridField. It throws something like:
Error: "Uncaught InvalidArgumentException: Invalid locale "en_US?locale=en_US?locale=en_US"" at line 299 of ...Translatable.php,
It seems to mess up the get vars here.
if i try to add a new Item to the GridField. Dont knwo if i m missing something here, or this is a bug actually

EDIT: This problem might be caused by the GridField....


chillu commented Jul 17, 2012

Could you describe what you're doing to get to this point?
Query construction in core is quite limited, the ?locale parameter tends to throw it off.

bumbus commented Jul 17, 2012

it happens directely after hitting the "Add Button" of the GridField. The URL changes to:
and it throws this error this posted above, in this new growl-style notification field.
I hope that helps.

PS: Viele Grüße aus Bonn übrigends :)


I am having the same issue. I have a thread running over at the silverstripe site I could really use a fix right away and I am willing to pay for your time to investigate this issue if I can get an answer soon.



I can confirm this issue (same as on link posted above - with editing page's URL). Default translatable locale is cs_CZ (czech), second language is en_US. When i want edit URL of any page, i get this error:

ERROR [User Error]: Uncaught InvalidArgumentException: Invalid locale "en_US/field/URLSegment/suggest/?value=en"
IN GET /admin/pages/edit/EditForm?locale=en_US/field/URLSegment/suggest/?value=en
Line 299 in /home/.../public_html/translatable/code/model/Translatable.php

chillu commented Jul 19, 2012

@oktotoker If you're referring to the "deprecated _t()" stuff, that's been fixed in #36

@silverstripesk URLSegment issue: This used to be a problem, but I've fixed it a month or longer ago. Is that with latest 3.0 branch of cms and framework off github?

"Add button" issue with double locale: Can't reproduce. Standard install on 3.0 branch,
with the following added to Page class:

function getCMSFields() {
        $fields = parent::getCMSFields();
            GridField::create('Members', 'Members', Member::get(), GridFieldConfig_RecordEditor::create())

        return $fields;

Pressing "Add Member" correctly shows the add form.

In general, please try to stick to one problem per issue, gets a bit confusing otherwise ;)


hi Ingo, i was running stable 3.0 from download section, switching to repo's 3.0 branch fixed this problem. Thanks.

@chillu chillu closed this Jul 19, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment