By Niccolo Angeli on Wednesday, 06 June 2018
Posted in Technical Issues
Likes 0
Views 823
Votes 0
Hello,
I am trying to migrate some reviews form Hikashop to Komento (Hikashop is not supported on your side, but it is in their side as they have integrated Komento as an alternative to their default review/comment system).

The bigger issue is that in your migrator there is nothing I can select in the "Component field", the hikashop_vote db table doesn't seem to have any row to identify the component, I tried ot run the migrator by letting Component as "none"; but it associates the Hikashop reviews to random Joomla articles, and not to the Hikashop products they really come from.

see attached screenshots

A minor issue, if the first is solved, is that in the migrator is missing a filed to migrate also the comment rating value, since reviews are present in Komento that would be a nice addon.
Can you try backup your original files and download my attached file then replace into following file location and see how it goes.

JoomlaFolder/administrator/components/com_komento/includes/migrator/adapters/custom.php
JoomlaFolder/administrator/components/com_komento/views/migrators/view.html.php


This file under this folder migrators.adapters.custom
JoomlaFolder/administrator/components/com_komento/themes/default/migrators/adapters/custom.php
·
Thursday, 07 June 2018 12:33
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks Arlex!
2 issues:

1.
the date is not being oulled correctly from Hikashop. Hikashop vote date in the database are in this timestamp format
1516060800
1510531200
1486857600

I select the table correctly in the patched migrator but it comes out like this in the comments list in backend (also, there is the same date for all comments, while they should be all different)
Monday, 30 November -0001 00:00

2.
these hikashop comments have been inserted by non registered users, thus there is no user id associated to comment, just a name (table vote:pseudo in hikashop), I have selected this tabel as the "Author Name" in the migrator and I left the "Created By" empty.
But in this way, even if the comment author name is imported correctly, the comment is still being assigned to me and it shows with my name/avatar in frontend.
Any way to fix this? These comments should show in frontend as if they where inserted by "Guests" who just compile the Name field in Komento form.

Thank you!
·
Thursday, 07 June 2018 15:43
·
0 Likes
·
0 Votes
·
0 Comments
·
Hm, actually we very difficult to control what value other extension stored in their table.

Can you try download my attached file and replace into this JoomlaFolder/administrator/components/com_komento/includes/migrator/adapters/custom.php and see how it goes, this should fix that creation date value.

Regarding with your second issue, by right even that is the guest user comment, it should stored it as zero in user id column. Or that table can't even have that user id column?

Is it possible for you send us that table .sql dump file so I can test further in my locally?

And is it possible for you provide us more screenshot regarding these?
- after migrated those comment table from your database under this Komento table #__komento_comments
- How that migrated comment look like.
·
Thursday, 07 June 2018 22:15
·
0 Likes
·
0 Votes
·
0 Comments
·
Comment date is now fixed

Ratings are wrong, all these comments have 5/5 ratings (value in db table is 5) but they are imported as 2/5.
Infact, I see that in Komento a value of 5/5 is benig stored as "10" in the db. Dont' worry about this, I can easily change those manually after the import (I have not other comments yet in Komento).

Regarding with your second issue, by right even that is the guest user comment, it should stored it as zero in user id column. Or that table can't even have that user id column?

When comment is done by non registered user, Hikashop store the user IP address in the user ID column, I changed all the IP addresses in that column with value "0" before testing the migrator again.

Comment author name is somewaht still wrong, it just show "Guest" in frontend, I was expecting it show the comment author name, I can see it in backend, it has been migrated correctly.

I attach db tables for bth hikashop_vote and komento_comments (after running th emigrator with the latest patch you sent), as well as the requested screenshots.

Thank you!
·
Thursday, 07 June 2018 22:42
·
0 Likes
·
0 Votes
·
0 Comments
·
Another issue I noticed is that the "overall ratings value" is not being updated after migrating these comments, could be a cache issue though, I noticed the same thing while testing Komento by inserting manually some comments, the total ratings value was appearing correctly some times, and some other times was not... not sure what could be causing this.
·
Thursday, 07 June 2018 23:00
·
0 Likes
·
0 Votes
·
0 Comments
·
Ratings are wrong, all these comments have 5/5 ratings (value in db table is 5) but they are imported as 2/5.
Infact, I see that in Komento a value of 5/5 is benig stored as "10" in the db. Dont' worry about this, I can easily change those manually after the import (I have not other comments yet in Komento).

Yes, that is something we can't predict too.

Hm, it seems like I can't replicate this, after i migrated from that hikashop table, then i manually modified that created_by id to 0, then it show the correct author name http://take.ms/Fmwp8 .
But i only test in Joomla article, i afraid that is something different from your hikashop page.

Can you provide us with your following details so I can better have a check.
- Joomla backend access
- FTP access
- Which page URL having this issue.
·
Thursday, 07 June 2018 23:24
·
0 Likes
·
0 Votes
·
0 Comments
·
I updated the main post with hidden info, thanks
·
Thursday, 07 June 2018 23:35
·
0 Likes
·
0 Votes
·
0 Comments
·
After checked further on this, it seems like you have enabled this setting Enforce Guest Label from your site backend, you can refer on my attached screenshot below.

Now it should work fine now, can you give it a check?
·
Friday, 08 June 2018 12:48
·
0 Likes
·
0 Votes
·
0 Comments
·
it seems like you have enabled this setting Enforce Guest Label from your site backend

Oh my... I would have never thought of that . Now everything works perfectly, thank you!
Are you going to uodate the custom migrator in your next release or should I keep your patch aside in case I need it again in the future?
·
Friday, 08 June 2018 15:05
·
0 Likes
·
0 Votes
·
0 Comments
·
Another issue I noticed is that the "overall ratings value" is not being updated after migrating these comments, could be a cache issue though, or it could happen only on Hikashop pages. I noticed the same thing while testing Komento by inserting manually some comments, the total ratings value was appearing correctly some times, and some other times was not... not sure what could be causing this.
To test on Hikashop page go here https://accademiainfinita.it/shop/prodotto/meditazioni-musica-iscrizione-annuale (you need to access first as superadmn).

No wait... I just tested and it's probaby due to having migrated those commets, if I inserta new one manually th etotal rating value it's being showed (but it only counts that comment)

Is there a way to fix this via the migrator or directly in the database? (not sure since is a dynamic value)
·
Friday, 08 June 2018 15:07
·
0 Likes
·
0 Votes
·
0 Comments
·
That was known issues, I've applied some fix into your site regarding this file -> JomlaFolder/administrator/components/com_komento/models/comments.php , it should populate the correct overall rating value now.

For the voters part, it will display one is because currently system only check for the created_by user id.

Are you going to uodate the custom migrator in your next release or should I keep your patch aside in case I need it again in the future?

We will fix that choose component part from the custom migrator but regarding that date and the hikashop component option, we will not fix that.
so you have temporary backup those fix file.
·
Friday, 08 June 2018 16:38
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks!
·
Friday, 08 June 2018 16:51
·
0 Likes
·
0 Votes
·
0 Comments
·
You are most welcome
·
Friday, 08 June 2018 17:29
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post