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

DataObjectManager & SS 2.3.2 (rc) & Translatable


Go to End


6 Posts   6565 Views

Avatar
drx

Community Member, 7 Posts

4 June 2009 at 1:00am

Hi there,

i run into some issues with DataObjectManager - especially FileDataObjectManager and ImageDataObjectmanager on translated pages with Silverstripe 2.3.2 (rc2).

It works fine for the original Page - the UploadForm shows up - but not for translated pages - it gives me "I can't handle sub-URLs of a CMSMain object." instead. This is pretty strange because the upload form url is exactly the same.

So I played around with the upload form url and added ?locale=en_US / de_DE etc. to it. This finally helped to load the form but the controllerID in DataObjectManager seems to point back to the original Page Object and not to the translated one...

Could please someone confirm that issue or have a working solution?
Is DOM (or the underlying TableListField) already adapted to the new translatable way?

Thanx in advance
drx

Avatar
drx

Community Member, 7 Posts

6 June 2009 at 10:05am

Edited: 06/06/2009 10:09am

I finally found some time to break this down myself.

The problem: the Locale setting is not persistent on ajax calls and gets lost. I created a ticket for this issue: http://open.silverstripe.com/ticket/4199.

A quick fix can also be found there which patches the CMSMain.php.
This is for Silverstripe 2.3.2-rc2.

Hope this helps
drx

Avatar
biapar

Forum Moderator, 435 Posts

11 July 2009 at 1:38am

Any updates?

Avatar
biapar

Forum Moderator, 435 Posts

1 September 2009 at 8:06am

Has been resolved this problem?

Avatar
Nicolaas

Forum Moderator, 224 Posts

15 March 2015 at 1:18pm

Edited: 15/03/2015 2:05pm

try adding this to your controller?

/**
* Default URL handlers - (Action)/(ID)/(OtherID)
*/
private static $url_handlers = array(
'$Action//$ID/$OtherID/$Version' => 'handleAction',
);

or whatever YOU want to handle ... e.g.

/**
* Default URL handlers - (Action)/(ID)/(OtherID)
*/
private static $url_handlers = array(
'$Action//$argument1/$argument2/$argument3/$argument5/$etc..' => 'handleAction',
);

see: https://github.com/sunnysideup/silverstripe-ecommerce/blob/master/code/control/ShoppingCart_Controller.php for an example.

Worked a charm for me.