I can translate profile items, but when I look at a profile only the field name is actually translated: the content of lists and the "People who like %value"-type pages are English only.

Also, i18nprofile assumes that the profile fields are originally entered in English, which is not always the case.

Finally, I get a "warning: Invalid argument supplied for foreach() in /home/.manx/junesun/learnlangs.com/ringo/modules/user/user.module on line 673." error if I look at a user profile in a language for which profile translations exist.

Comments

Junesun’s picture

I found out that the error "warning: Invalid argument supplied for foreach() in /home/.manx/junesun/learnlangs.com/ringo/modules/user/user.module on line 673." is not related to whether a profile has been translated or not but rather whether the user has filled out at least one field of each category. There should be a protection against categories that are not filled out, it shouldn't break the page!

Anyway, the translation of "People who like %value"-type pages still don't appear.

lil-1’s picture

Title: i18nprofile is completely broken! » user.module on line 673

Not sure what module causes it but it's a big trouble, I agree!
Try this
line 673 in user.module:

foreach ($items as $item)

change to:

if (!empty($items)) foreach ($items as $item) {

Together with this I had an Argument #1 issue (when switching to English) - it gave:
warning: array_merge() [function.array-merge ]: Argument #1 is not an array in cck\text.module on line 89.

so changing that 89 line to:
$arguments[$alias] = array_merge((array)($arguments[$alias]), (array)$argument);

helped.
warning: I am not a programmer! It removed my 'user.module on line 673' warning but i'm far from being sure it's the right fix ever!
as for translation - lots of troubles, you're right. but the other cmc-s are still worse.
Lil

Junesun’s picture

Title: user.module on line 673 » i18n_profile

Thanks, Lil.

By the way, simplulo's offer of $100 for this bug fix to i18n_profile is still open, see http://drupal.org/node/250363 . Should be easy money for somebody who has worked on i18n-related stuff before; can't believe nobody is taking it...

jply’s picture

I'm having the same problem. If I look at a profile in another language than the default one, I get the "warning ... modules/user/user.module on line 673.". Also, I deleted all the fields in a given category but when I look at the profile page in the other language, the category is still there even though there is no field associated with it. Anyone knows the solution?

jply’s picture

Fixed my first problem, looking at drupal.org/node/129262. But now, when I edit a profile in another language than the default one, the categories are still there even though there are no fields in them.

jose reyero’s picture

Component: Module i18nprofile » Code
Priority: Critical » Normal
Status: Active » Closed (won't fix)

Consider upgrading to 6.x