Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

Gender Database Value After Upgrade To 3.1.1

10 years 1 month ago
  • Thomy's Avatar
    Topic Author
  • Thomy
  • Offline
  • Fresh Boarder
  • Posts: 99
  • Thank you received: 6
Licenses:
JomSocial Active

Hi, after patch to jomsocial version 3.1.1 new registred users have in database for the gender field the value male or female instead of COM_COMMUNITY_MALE or COM_COMMUNITY_FEMALE.

The option for FIELD_GENDER in my database is COM_COMMUNITY_MALE and COM_COMMUNITY_FEMALE ... I check this

10 years 1 month ago
Licenses:

Hi Thomy,

We do that for multi languages. if COM_COMMUNITY_MALE or COM_COMMUNITY_FEMALE shown at browser, Jomsocial will took the translation first before shown at browser.

you can found it at : /language/for translation files.

Cheers,
Albert

10 years 1 month ago
  • Thomy's Avatar
    Topic Author
  • Thomy
  • Offline
  • Fresh Boarder
  • Posts: 99
  • Thank you received: 6
Licenses:
JomSocial Active

Hi Albert,
sorry but you don't understand:
after update to jomsocial 3.1.1 in sql database there set a value for a male user: male (this is the old format)
Before the update it was set correct to COM_COMMUNITY_MALE

10 years 1 month ago
Licenses:

Hi Thomy,

this is valid bug. and has been reported to our developer.

Cheers,
Albert

10 years 1 month ago
Licenses:

Hi Thomy,

after discus with developer. gender field value will be male of female. It will take care of the proper translation, no matter how it is stored .

ROOT/component/com_community/libraries/fields/gender.php at the very beginning
/**

    Method to format the specified value for text type
    */
    public function getFieldData($field) {
    $options = array("male" => "COM_COMMUNITY_MALE", "female" => "COM_COMMUNITY_FEMALE");
    $value = strtolower($field['value']);
    if ( isset($options[$value])) { return JText::_($options[$value]); }

    else
    { return ''; }

}

Cheers,
Albert

10 years 1 month ago
  • Thomy's Avatar
    Topic Author
  • Thomy
  • Offline
  • Fresh Boarder
  • Posts: 99
  • Thank you received: 6
Licenses:
JomSocial Active

The newest for for saving to database is male and female?
How can I transfare all COM_COMMUNITY_MALE and COM_COMMUNITY_FEMALE back to male and female in myphpAdmin?
I need a sql query please to convert the database values to the new (old) form.
Regards Thomy

10 years 1 month ago
Licenses:

Hi Thomy,

you can use this query:

UPDATE `#_community_fields_values`
SET `value` = 'male'
WHERE `value` = 'COM_COMMUNITY_MALE'
UPDATE `#_community_fields_values`
SET `value` = 'female'
WHERE `value` = 'COM_COMMUNITY_FEMALE'

Replace # with your table prefix.

Cheers,
Albert

The following user(s) said Thank You: Thomy
10 years 1 month ago
  • Thomy's Avatar
    Topic Author
  • Thomy
  • Offline
  • Fresh Boarder
  • Posts: 99
  • Thank you received: 6
Licenses:
JomSocial Active

Hi Albert,
thank you...

But I don't understand why the jomsocial team change this value so many times?

Regards
Thomy

10 years 1 month ago
Licenses:

Hi Thomy,

because since we using translation strings for gender. too many complain about that, that why we changing it.

Regards,
Albert

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW