Jump to content

Error during change the title field


Recommended Posts

I have all multi-language related modules activated. I have successfully changed all fields to TextLanguage, TextareaLanguage etc. When I try to change the Title field from PageTitle to PageTitleLanguage and confirm the change, it shows this error:

Recoverable Fatal Error Argument 1 passed to LanguagesPageFieldValue::__construct() must be an array, string given, called in /[path_to_pw]/wire/modules/LanguageSupport/LanguageSupportFields.module on line 301 and defined (line 33 of /[path_to_pw]/wire/modules/LanguageSupport/LanguagesPageFieldValue.php)

This error message was shown because you are logged in as a Superuser. Error has been logged.

How can I change the Title field to multi-lingual?

UPDATE:

I have compared the database dumps before the change and after the change. The only difference is this:

table `fields`:

< (1, 'FieldtypePageTitle', 'title', 13, 'Title', '{\"required\":1,\"textformatters\":[\"TextformatterEntities\"],\"size\":0,\"maxlength\":255}'),

> (1, 'FieldtypePageTitleLanguage', 'title', 13, 'Title', '{\"required\":1}'),

Reported also on Gitub: https://github.com/r...sWire/issues/98

UPDATE2:

I have reproduced this error on a fresh new installation. I have found that this error doesn't occur when I create a second language before changing the title to PageTitleLanguage.

  • Like 1
Link to comment
Share on other sites

Thanks Robert. It looks like we had a bug where the multi language fields expected you to have more than 1 language before you started using multi-language fields. I fixed this and posted the update per your GitHub report.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...