Jump to content

Bug when installing multilanguage modules


Recommended Posts

Posted (edited)

My whole website is messed up.

When I was installing modules for multilanguage support, I got the following errors:

PHP 8.1.0
ProcessWire: 3.0.229

On the front:

Warning: foreach() argument must be of type array|object, null given in 
...\wire\modules\LanguageSupport\LanguageSupportPageNames.module on line 126

In the backend:

 Warning: foreach() argument must be of type array|object, null given in 
...\wire\modules\LanguageSupport\LanguageSupportPageNames.module on line 126
 Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in 
...\wire\modules\LanguageSupport\ProcessLanguage.module on line 340

( ! ) TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in 
...\wire\modules\LanguageSupport\ProcessLanguage.module on line 340

 

Edited by Leftfield
Link to comment
Share on other sites

Line 126 is the $languages API variable seemingly being empty.

Line 340 is about the language translation files, but must be of the same origin.

This is all I can read from your context. We need more to help.. did you follow the steps to install the modules in order? Does this also happen on a fresh install of PW?

Link to comment
Share on other sites

7 hours ago, poljpocket said:

did you follow the steps to install the modules in order?

Yes, it is a custom (multilingual-ready) module. I thought I would write a solution here when I found a fix.

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