Jump to:

10931 Posts in 2614 Topics by 1810 members

All other Modules

SilverStripe Forums » All other Modules » Can't attach files to DataObject if user profile language is not English

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 350 Views
  • GGast
    Avatar
    Community Member
    2 Posts

    Can't attach files to DataObject if user profile language is not English Link to this post

    Hi all,

    I've run into some strange behaviour of (maybe) the Uploadify module. I've already ruled out the possibility of an issue with user rights.

    I can upload files alright, but cannot attach them to a DataObject which is part of a page type. I can see the file to be attached in the Uploads folder and can select it, but can't save it ... UNLESS this user's profile language is set to English. If it's set to another language, no dice.

    The structure of the DataObject is like this:

    EventPage::has_many -> EventDataObject::has_many -> DownloadDataObject::has_one -> File

    The has_one relationship of "File" and "DownloadDataObject" does not work, if the backend language is German.

    Does anyone else have that problem and is there a known fix for it?

    Thanks in advance!

  • martimiz
    Avatar
    Forum Moderator
    1068 Posts

    Re: Can't attach files to DataObject if user profile language is not English Link to this post

    Hi GGAst, welcome to the forums,

    To eliminate that the error is caused by something in some German translation - have you tried using another profile language besides German and English?

  • GGast
    Avatar
    Community Member
    2 Posts

    Re: Can't attach files to DataObject if user profile language is not English Link to this post

    Hi martimiz,
    I'll try that and get back to you. Thanks!

  • swaiba
    Avatar
    Forum Moderator
    1786 Posts

    Re: Can't attach files to DataObject if user profile language is not English Link to this post

    Could well be that you need to add something like..

    Object::add_extension('File', 'Translatable');

    ...as I recall when translatable is on and this isn't applied it will just add the file with the default locale instead of the current one.

    350 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.