By Rik Brown on Saturday, 04 September 2021
Posted in Technical Issues
Likes 0
Views 473
Votes 0
Below the EasySocial map showing members worldwide, there is a country list. I get mixed text results as follows:

COM_COMMUNITY_LANG_NAME_NEPAL
... versus ...
Nepal

See the attached image.

I'd like to get those fixed so that they just show the country name such as "Nepal" versus the "COM_COMMUNITY" stuff.

I don't mind working directly in the database table if it is just 1 or 2 tables.

Any suggestions?

Thanks. -- Rik

PS: Would like to get this cleaned up for Joomla 4.x.
Hi Rik,

You may use the following query to look at the stored 'country' data for users.

select * from #__social_fields_data where type='user' and datakey='country' and raw is not null and raw!='' order by id desc;
·
Monday, 06 September 2021 10:52
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Raymond,

That got me the results I needed to make the above corrections in the "#__social_fields_data" table. Thanks!

#1) However, I see that the list only includes about 1/3 of our users.

I could create a query to append additional rows for missing "uid" (user ids). But I'm not sure if it is okay to just create/append a new "id" in that table (add sequentially) or if the "id" field is pulled from another table?

#2) If I create new rows, the "field_id" is either "226" or "309".

I'm guessing those refer to the #__social_fields table where "id" #226 is "FIELD_CITY" and "id" #309 is FIELD_ADDRESS." But I'm not sure why one or the other is selected for the "#__social_fields_data.uid" field as neither indicates a country name.

Thanks. -- Rik
·
Tuesday, 07 September 2021 23:15
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Rik,

I would strongly suggest not to manually add rows as it may cause the site to break depending on how queries are constructed, or it could introduce some other issues related to incomplete data.

If users are not on the fields_data table, I believe it is because their profiles are not saved on EasySocial yet. So the right way to generate the data is by going into their profiles on EasySocial and saving them.
·
Wednesday, 08 September 2021 16:24
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Raymond,

I ran further queries and we actually do have a 1:1 correspondence in users between #__users and #__social_users.

So the only problem is that on the EasySocial dashboard where the Members Worldwide list only shows the countries for about 1/3 of our users. I suppose that is simply because we don't have country data on all users.

So no further action is required.

Thank you again for helping me get the current country data fixed. -- Rik
·
Wednesday, 08 September 2021 23:18
·
0 Likes
·
0 Votes
·
0 Comments
·
Sure Rik. You're most welcome.

Regards.
·
Thursday, 09 September 2021 10:24
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post