[#5441] Forums Signature Field empty on edit

3 years 10 months ago - 3 years 10 months ago #268697 by gjschaller
I am running Kunena 4.0 and CB 2.0.10 on Joomla 3.4. Prior to updating to these versions, everything worked fine under J2.5 / K3.0 / CB1.9.

I have the CB Forums plugin installed and activated, and the Signature field is mapped to the appropriate field for CB. However, when a user goes to edit their profile, that field is blank upon first edit - once they do edit it, the new change stays, but it doesn't seem to be pulling in the existing data on first edit, resulting in people losing their signatures unless they re-create them from scratch.

Is there some way to synchronize or correct this?

Thank you!

Geoffrey Schaller
Technical Officer
www.knightrealms.com
3 years 10 months ago #268708 by krileon
The below query should do the one time migration for you. CB 1.x didn't store the signature and just sent it directly to Kunena. In this case CB stores the signature then sends it to Kunena. This avoids the signature being lost as well as gives us the ability to support other forums (important for the future) since we store it our selves.

We probably should've accounted for this in the migration though and have added a bug ticket to fix that part of the migration.

forge.joomlapolis.com/issues/5441

UPDATE `jos_comprofiler` AS c SET c.`FIELD_NAME` = ( SELECT k.`signature` FROM `jos_kunena_users` AS k WHERE k.`userid` = c.`id` ) WHERE ( c.`FIELD_NAME` IS NULL OR c.`FIELD_NAME` = '' )

Replace jos_ with your table prefix and replace FIELD_NAME with the name of your signature field created in CB. This will migrate the Kunena signatures to CB if they don't have one stored in CB. This should be ran directly on your database (e.g. using phpmyadmin).

Please be sure to make a backup of your database before running this.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM EST to 4:00 PM EST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
3 years 10 months ago #268712 by gjschaller
That fixed it - thank you!

Geoffrey Schaller
Technical Officer
www.knightrealms.com
The following user(s) said Thank You: krileon
3 years 7 months ago #272767 by FSEconomy
I just upgraded from K3 to K4 and CB1.9.1 to CB2

I would like to migrate my users' signatures before I re-add the edit functionality to their front-end display. However, I can't read the full SQL query posted above. The joomlapolis.com Kunena forum is too narrow to fully show the {code} area. My scroll bar cannot go all the way to the right. Can you please post this query again in a multi-line view?

Thanks

(btw, I tried this in multiple browsers on 3 different PCs, each running a different OS (Win, OSX, and Ubuntu)
My display:

3 years 7 months ago #272768 by gjschaller
Here's the code:

UPDATE `jos_comprofiler` AS c SET c.`FIELD_NAME` = ( SELECT k.`signature` FROM `jos_kunena_users` AS k WHERE k.`userid` = c.`id` ) WHERE ( c.`FIELD_NAME` IS NULL OR c.`FIELD_NAME` = '' )

As a trick: Quote the post. You'll see the full code in plain text.

Geoffrey Schaller
Technical Officer
www.knightrealms.com
The following user(s) said Thank You: FSEconomy
Moderators: beatnantkrileon
Time to create page: 0.400 seconds
Facebook Twitter Google LinkedIn