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.

Upgrading SilverStripe /

Ask questions about upgrading SilverStripe to the latest version.

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

Can't create a new language in Version 2.3


Go to End


6 Posts   2904 Views

Avatar
wewo

Community Member, 7 Posts

23 February 2009 at 10:35pm

Hello,

I enabled i18n support in my _config:

i18n::enable();
Translatable::enable();

A /db/build/ did create the tables SiteTree_lang, SiteTree_lang_Live, SiteTree_lang_versions

When i try to add a new translation, a SQL query fails:

SELECT `SiteTree`.*, `SiteTree_lang`.*, `SiteTree_lang`.*, `GhostPage`.*, `Artist`.*, `Concert`.*, `Location
`.*, `ErrorPage`.*, `RedirectorPage`.*, `VirtualPage`.*, `SiteTree_lang`.OriginalLangID, if(`SiteTree_lang
`.ClassName,`SiteTree_lang`.ClassName,'SiteTree') AS RecordClassName, `SiteTree_lang`.OriginalLangID
AS ID, `SiteTree_lang_lang`.OriginalLangID AS ID
FROM
INNER JOIN `SiteTree_lang` ON `SiteTree_lang`.OriginalLangID = `SiteTree_lang`.OriginalLangID
INNER JOIN `SiteTree` ON `SiteTree_lang`.OriginalLangID = `SiteTree`.ID
LEFT JOIN `GhostPage` ON `GhostPage`.ID = `SiteTree_lang`.OriginalLangID
LEFT JOIN `Artist` ON `Artist`.ID = `SiteTree_lang`.OriginalLangID
LEFT JOIN `Concert` ON `Concert`.ID = `SiteTree_lang`.OriginalLangID
LEFT JOIN `Location` ON `Location`.ID = `SiteTree_lang`.OriginalLangID
LEFT JOIN `ErrorPage` ON `ErrorPage`.ID = `SiteTree_lang`.OriginalLangID
LEFT JOIN `RedirectorPage` ON `RedirectorPage`.ID = `SiteTree_lang`.OriginalLangID
LEFT JOIN `VirtualPage` ON `VirtualPage`.ID = `SiteTree_lang`.OriginalLangID
WHERE (`SiteTree`.`ParentID` = 0 AND `SiteTree_lang`.OriginalLangID != 0) AND (`SiteTree_lang`.Lang
= 'de') AND (`SiteTree_lang`.Lang = 'de')
ORDER BY Sort

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
for the right syntax to use near 'INNER JOIN `SiteTree_lang` ON `SiteTree_lang`.OriginalLangID = `SiteTree_lang
`.O' at line 1

On http://demo.silverstripe.com/admin/ creating a new language fails with a 500 error
http://demo.silverstripe.com/admin/createtranslation?ID=86&newlang=ro&ajax=1

Is it a bug or a feature? ;)

best regards,
wewo

Avatar
jam13

121 Posts

24 February 2009 at 3:07am

Same problem here.

Also reported here:

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

and here:

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

I think there are various fixes in trunk for i18n stuff, unfortunately enabling it causes /dev/build to die trying to build the lang table.

Hopefully this should get some attention before 2.3.1 as i18n is currently unusable AFAICS.

Avatar
lxer

Community Member, 16 Posts

24 February 2009 at 3:33am

so, the table is missing in the query, it should have something like
FROM `SiteTree_lang` AS something

Avatar
jam13

121 Posts

24 February 2009 at 10:01pm

From the look of the line:

INNER JOIN `SiteTree_lang` ON `SiteTree_lang`.OriginalLangID = `SiteTree_lang`.OriginalLangID

I would agree :)

Avatar
BuddhaSource

Community Member, 57 Posts

26 February 2009 at 3:28am

:(

We had followed some tutorial in docs and made whole mess of it.

Not sure if this has the same features that they are trying to get out in 2.4

The url will itself have the language subdir

eg: mysite.com/en/home

Now I am confused which one to pick.

Avatar
alirobe

Community Member, 35 Posts

26 February 2009 at 12:37pm

Edited: 26/02/2009 12:38pm

According to the release notes on the blog, 2.3 doesn't have multi-language support and you should wait for a minor upgrade in the future that will include a new multi-language model. It says not to install 2.3.0 if you want multi-language support.