MyBB Community Forums

Full Version: Thank You/Like System (1.5) & table conversion
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all!
After updating MyBB to 1.6.5, I discovered that my old "thank you" plugin stopped working. It was "ThankYou (3.0.7)" by "Arash_j13", I can't find it anymore on the MyBB mods database, but I have downloaded it from there a long time ago.
I installed "Thank You/Like System (1.5)", which also I can't find in the mods database, but I swore it was there just 2 days ago.
Anyway, I didn't want to lose all the previous "thank you" data, so I examined the database and found out that both plugins memorized there the same data, just in a different order. I modified the old plugins' table to be identical to the new plugins' one (same name, same columns in the same order, same data type, et cetera. I checked various times for it to be exatly identical), made a backup copy of it, deactivated the old plugin and activated the new one.
Everything seemed to work fine, but the plugin overwrote the entire "puid" (thankers' UID) with the content of the "uid" (thanked UID) column!
So i deactivated the plugin, restored the backup (same table, but with correct data for the "puid" column) and activated it again: same thing happened. I tried to deactivate the plugin from its own option to deactivate it (ACP > configuration > Thank You/Like System > selected "no" to "Enable/Disable"), restored the backup again and reactivated the plugin: it overwrote the column again.
Now the option is set to "no", the backup was restored for the fourth time and the column is still intact, so it's clearly plugins' fault.
What now?

Thanks,
Myttex


Up? Smile
now which plugin you want to use ? have you seen the plugin system changes information for myBB 1.6.5

* Plugin Changes coming in 1.6.5
* Script to Update Plugins for 1.6.5

if required would you like to provide required temporary privileges thru PM and wait a couple of days ?

I want to use the "new" plugin (Thank You/Like System (1.5)). I tried to run that update script (setting "$dryrun=0;") and it updated the plugin, but the problem persists.
Also, I think the problem lies somewhere in the .php plugin's file and it cannot be fixed from the ACP

It is not the plugin's fault as you put it. The plugin expects data in certain tables and format and the fact that a table is being overwritten by another tells me you did not have the tables correct. Just having the tables names the same is not enough, the data has to inter-relate.

Anyway, I wrote up a merge script for importing thanks from a different thanks plugin. You can find that here: http://community.mybb.com/thread-59652-p...#pid618957
You can have a look at it and see if you can make changes to it to adapt it for the plugin that you are using. If you can't work it out I could have a look at the merge script and see if I can make changes to it to import thanks from your plugin but that will have to wait for sometime, at least till after I release the updates for existing plugins I'm currently working on.
Hi!
I didn't know a merge script existed!
Apparently, my old plugin was the one you've written the merge script for, even if for some reason it had a different name.
So, I emptied "mybb_g33k_thankyoulike_thankyoulike" table and ran the script: it imported all the thanks and everything works fine now!
I just want to point out a thing: that table was the one I converted from the old plugin (it was called "mybb_thx" before) and, since everything worked, I doubt having done a mistake while renaming and reordering columns. It will probably remain a mystery why it didn't work before, however it isn't important, now it works correctly.

Thanks very much for the help,
Myttex