Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 6 replies, has 3 voices.

Last updated by YITH 7 years, 7 months ago.

Assigned support staff: Andrey.

Author Posts
December 9, 2013 at 1:56 am #304133

melissa

Hi,

I bought this theme because it was compatible with WPML but I seem to have run into a problem that disappears when I activate it.

This is what happens:

Warning: array_keys() expects parameter 1 to be array, boolean given in /home/wgtravel/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/translation-management/translation-management.class.php on line 3489

Warning: Invalid argument supplied for foreach() in /home/wgtravel/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/translation-management/translation-management.class.php on line 3489

Warning: array_keys() expects parameter 1 to be array, boolean given in /home/wgtravel/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/translation-management/translation-management.class.php on line 3489

Warning: Invalid argument supplied for foreach() in /home/wgtravel/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/translation-management/translation-management.class.php on line 3489

Warning: array_keys() expects parameter 1 to be array, boolean given in /home/wgtravel/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/translation-management/translation-management.class.php on line 3489

Warning: Invalid argument supplied for foreach() in /home/wgtravel/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/translation-management/translation-management.class.php on line 3489

Warning: array_keys() expects parameter 1 to be array, boolean given in /home/wgtravel/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/translation-management/translation-management.class.php on line 3489

Warning: Invalid argument supplied for foreach() in /home/wgtravel/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/translation-management/translation-management.class.php on line 3489

Warning: array_keys() expects parameter 1 to be array, boolean given in /home/wgtravel/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/translation-management/translation-management.class.php on line 3489

Warning: Invalid argument supplied for foreach() in /home/wgtravel/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/translation-management/translation-management.class.php on line 3489

After going through the support files i saw there were some bug fixes like this one http://wpml.org/forums/topic/strange-php-error-on-admin-pages-and-other-places/
but
foreach(array_keys($arr) as $arrkey){
is on line 6977 not 3489 in my file.

Can you please help me resolve this?

December 9, 2013 at 7:58 am #304212

Andrey
Supporter

Timezone: Europe/Kiev (GMT+02:00)

Dear Melissa,

Thank you for contacting to us !

I contacted our compatibility team and they told me that your theme not full compatible with WPML, they contacted the theme author about these issues and he'll fix all of them. Also they told me, that there are many issues with this theme not related to WPML plugin, so we don't plan to work on this theme.

Please make sure to use these plugin versions:
> WPML 3.0.1
> String Translation 2.0.1
> Translation Management 1.9.1
> WPML Media 2.1.1

You can try open the file /wp-content/plugins/sitepress-multilingual-cms/inc/translation-management/translation-management.class.php and on line 3489, replace this:

foreach(array_keys($arr) as $arrkey)

with this:

foreach(array_keys((array)$arr) as $arrkey)

Thanks,
Andrey

December 9, 2013 at 8:41 am #304232

melissa

Hi Andrey,

What do you mean NOT compatible??? I purchased this theme because on this website AND themeforest it says it is - see screenshots. #@$&(#@($&@(#*(!

Also i have attached a screenshot of the file /wp-content/plugins/sitepress-multilingual-cms/inc/translation-management/translation-management.class.php and as you can see there is no
foreach(array_keys($arr) as $arrkey) on line 3489, there is on line 6977 but the error doesnt seem to be for this line

wpml versions.jpg
wpml translation management.jpg
room 09 themeforest.jpg
room 09.jpg
December 10, 2013 at 11:54 am #305004

Andrey
Supporter

Timezone: Europe/Kiev (GMT+02:00)

Dear Melissa,

We have some issues with this theme.

Could you provide us what WPML and WPML addons versions you are using ?

Thanks,
Andrey

December 10, 2013 at 12:10 pm #305012

melissa

Hi Andrey,
i included a screen shot of the versions I am using in the last post but i just found this under Support in the WPML menu of my WordPress
WPML Multilingual CMS Installed Yes 3.0.1
WPML CMS Nav Installed Yes 1.4
WPML String Translation Installed Yes 2.0.1
WPML Sticky Links Installed Yes 1.3
WPML Translation Management Installed Yes 1.9.1
WPML Translation Analytics Download No n/a
WPML XLIFF Download No n/a
WPML Media Installed Yes 2.1.1
WooCommerce Multilingual Installed Yes 3.0.1
JigoShop Multilingual Download No n/a
Gravity Forms Multilingual Download No n/a
CRED Frontend Translation Download No n/a
Installer Installed Yes 0.7.1

December 10, 2013 at 4:30 pm #305206

Andrey
Supporter

Timezone: Europe/Kiev (GMT+02:00)

Dear Melissa,

Do you have this site online, where i can see warnings ? if yes, please fill in your access details below.
I checked this line 3489 in translation-management.class.php, you can find on this line a code :

foreach(array_keys($arr) as $arrkey)

Thanks,
Andrey

details_box.png
December 11, 2013 at 8:53 am #306040

YITH

Hello Andrey, i found where is the error.

The problem is from this string in wpml-config.xml

<key name="popup_title" />

Just remove it for now if you do not need it, we are working on the bug fix and we will send an update of the theme, probably Room09 v1.5.1 or v1.6.0

Thank you and sorry for troubles!

The topic ‘[Closed] PHP error when used with Room09’ is closed to new replies.