Error message when using composer with Internationalization package (5.6.0.2)

Permalink Browser Info Environment
When using Internationalization on 5.6.0.2 and saving pages with composer, Concrete throws following error:

mysql error: [1364: Field 'mpLocale' doesn't have a default value] in EXECUTE("insert into MultilingualPageRelations (mpRelationID, cID, mpLanguage) values (128, '277', 'en')")


The page still gets saved and is fully functional, but pagerelations aren't saved. The bug *might* be server-spesific depending on how MySQL is set to handle empty values.

Type: Discussion
Status: New
Ale
View Replies:
mkly replied on at Permalink Reply
mkly
Thanks for letting us know about the issue.

Are you comfortable editing the source code of the addon? If so could you try changing line #241 and line #242 in
/packages/internationalization/multilingual/models/section.php

to
$v = array($mpRelationID, $page->getCollectionID(), $ms->getLanguage(), $ms->getLocale());
$db->Execute('insert into MultilingualPageRelations (mpRelationID, cID, mpLanguage, mpLocale) values (?, ?, ?, ?)', $v);

And let us know if this resolves the issue?

Best Wishes,
Mike
Ale replied on at Permalink Reply
Ale
Thanks for the tip, it worked.

Before you replied I just did a quick & dirty fix and altered the database column to default to en_GB, but your solution is definately better as it gives the used locale instead of a hard-coded value.

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.