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.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

What exactly does "I can't handle sub-URLs of a CMSMain object" mean?


Go to End


4 Posts   1278 Views

Avatar
MarcusDalgren

Community Member, 288 Posts

26 March 2010 at 9:27pm

Hello again UncleCheese!

So I've been stupid enough to try using Translatable on normal data objects and not just the SiteTree. Generally this actually works when used with a fix someone posted but in one scenario it breaks down. If I switch translations through the translation tab then DOM/CTF stops working.

What happens when you switch translation through the translation tab is that the URL becomes for example http://localhost/fkg/admin/show/26/?locale=en_US instead of just http://localhost/fkg/admin/?locale=en_US. Everything else I've checked seems to be ok (the locale is set properly for example) so I'm right now thinking it has something to do with the URL. I checked the URL on the iframe in the popup and it's the same URL as when it's working so I have no clue as to where to start looking.

Do these can't handle sub-URLs errors happen in some kind of central place that you can point me to or are they really hard to find/debug? If you can point me to the general area I would be more than happy to try to fix this, right now it feels kind of hopeless since I don't even know where to start.

Kindly,
Marcus

Avatar
MarcusDalgren

Community Member, 288 Posts

26 March 2010 at 11:18pm

Ok so this seems really weird.

I discovered by mistake that the DOM starts working again if I press the page item in the left menu.
So it looks like this: Click on one of the existing translations under the Translations tab, get sent to something like http://localhost/fkg/admin/show/26/?locale=en_US. Trying to add/edit/remove items in the DOM doesn't work. Click the page item in the menu to the left and DOM works again.

Any ideas anyone?

Avatar
UncleCheese

Forum Moderator, 4102 Posts

27 March 2010 at 3:08am

Hi, Marcus,

Have you tried this patch?

http://open.silverstripe.org/ticket/4199

Avatar
MarcusDalgren

Community Member, 288 Posts

27 March 2010 at 3:20am

Yes I'm running with that patch and everything works great except in this very specific scenario.

After mucking about for awhile it seems that this is a CMS issue and not a Translatable issue.
Take any SS installation, open up the admin section and click on a page item in the left menu.
After you've done that, hover over some other page item that has a DOM or a CTF on it and write that link in the URL directly (this is what Translatable does when you switch translations) and hit enter.

You'll get sent to the new page item but the DOM or CTF fails because it seems like other things don't get set properly. I'm right now leaning towards removing the offending links entirely from Translatable in order to get this working.