Jump to:

22972 Posts in 11596 Topics by 2824 members

General Questions

SilverStripe Forums » General Questions » SS3 Translatable deprecated error

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 1002 Views
  • okotoker
    Avatar
    Community Member
    39 Posts

    SS3 Translatable deprecated error Link to this post

    Once I have Translatable set up everything on the content side seems to work fine, however when I try to go into security and edit any of the users I get the error:

    [User Deprecated] i18n::_t is deprecated. The $priority argument to _t() is deprecated, please use module inclusion priorities instead. Called from _t.

    Trace---------
    i18n::_t is deprecated. The $priority argument to _t() is deprecated, please use module inclusion priorities instead. Called from _t.
    Deprecation.php:155
    Deprecation::notice(3.0,The $priority argument to _t() is deprecated, please use module inclusion priorities instead)
    i18n.php:1469
    i18n::_t(Translatable.TRANSLATEPERMISSION,Translate %s,50,Translate pages into a language)
    Core.php:393
    _t(Translatable.TRANSLATEPERMISSION,Translate %s,50,Translate pages into a language)
    Translatable.php:1302
    Translatable->providePermissions()
    Permission.php:451
    Permission::get_codes(1)
    PermissionCheckboxSetField.php:54
    PermissionCheckboxSetField->__construct(Permissions,,Permission,GroupID,ManyManyList)
    Member.php:1178
    Member->getCMSFields()
    GridFieldDetailForm.php:315
    GridFieldDetailForm_ItemRequest->ItemEditForm(GridField,SS_HTTPRequest)
    GridFieldDetailForm.php:254
    GridFieldDetailForm_ItemRequest->edit(SS_HTTPRequest)
    RequestHandler.php:168
    RequestHandler->handleRequest(SS_HTTPRequest,DataModel)
    GridFieldDetailForm.php:82
    GridFieldDetailForm->handleItem(GridField,SS_HTTPRequest)
    GridField.php:644
    GridField->handleRequest(SS_HTTPRequest,DataModel)
    RequestHandler.php:186
    RequestHandler->handleRequest(SS_HTTPRequest,DataModel)
    RequestHandler.php:186
    RequestHandler->handleRequest(SS_HTTPRequest,DataModel)
    Controller.php:149
    Controller->handleRequest(SS_HTTPRequest,DataModel)
    LeftAndMain.php:340
    LeftAndMain->handleRequest(SS_HTTPRequest,DataModel)
    AdminRootController.php:88
    AdminRootController->handleRequest(SS_HTTPRequest,DataModel)
    Director.php:281
    Director::handleRequest(SS_HTTPRequest,Session,DataModel)
    Director.php:112
    Director::direct(/admin/security/EditForm/field/Members/item/2/edit,DataModel)
    main.php:126

    For now I have just commented out the lines that throw there error and it works fine for now, can't launch the site knowing this though. Any Ideas on what is going on here?

  • Willr
    Avatar
    Forum Moderator
    5462 Posts
  • okotoker
    Avatar
    Community Member
    39 Posts

    Re: SS3 Translatable deprecated error Link to this post

    Thanks Willr,

    So this issue is within the translatable module. I have done a base install which I have done nothing with other than install the translatable module and I am not sure what to do to fix it.

    A new more pressing problem has come up with the module. When I create new pages with the translatable module installed and I tab over where the URL usually changes itself I get:
    Error: "Uncaught InvalidArgumentException: Invalid locale "en_US/field/URLSegment/suggest/?value=Remarkable Transformations"" at line 299 of /CMS/translatable/code/model/Translatable.php

    If I turn off dev mode just to lose the error I get a URL of undefined. I can manually put in a URL but then when I go the the French side of the site it gives me a weird URL of home-fr-frhome-fr-fr if I try to manually change that it won't let me and will only give a URL at that point of undefinedundefined. I know my way around SS pretty well but fixing this module is a bit above my level.

    Do you have any insight into what maybe causing this. I have no problem digging I just don't know where to start. Thanks Willr for your help.

    ** EDIT ** Searching around I found this https://github.com/silverstripe/silverstripe-translatable/issues/35#issuecomment-7032656. This seems to be the same error I am getting so I will keep on eye on this.

  • okotoker
    Avatar
    Community Member
    39 Posts

    Re: SS3 Translatable deprecated error Link to this post

    One more additional thing I am getting is when I am trying to add a object with the GridField I get a doubled up URL as well
    admin/pages/edit/EditForm/field/Winners/item/new?locale=en_US?locale=en_US
    if I remove the last double query it load properly;

  • Ingo
    Avatar
    Forum Moderator
    801 Posts

    Re: SS3 Translatable deprecated error Link to this post

    Let's continue this discussion on github:
    https://github.com/silverstripe/silverstripe-translatable/issues/35#issuecomment-7032656
    One problem per issue in github, please ;)

    1002 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.