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.

Upgrading SilverStripe

Ask questions about upgrading SilverStripe to the latest version.

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

Can't create a new language in Version 2.3


Reply

6 Posts   1833 Views

Avatar
wewo

23 February 2009 at 10:35pm Community Member, 7 Posts

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

24 February 2009 at 3:07am 121 Posts

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

24 February 2009 at 3:33am Community Member, 16 Posts

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

Avatar
jam13

24 February 2009 at 10:01pm 121 Posts

From the look of the line:

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

I would agree :)

Avatar
BuddhaSource

26 February 2009 at 3:28am Community Member, 57 Posts

:(

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

26 February 2009 at 12:37pm (Last edited: 26 February 2009 12:38pm), Community Member, 35 Posts

According to the [url=http://www.silverstripe.org/silverstripe-2-3-0-released-1000s-of-improvements/]release notes on the blog[/url], 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.