Closed Bug 551700 Opened 14 years ago Closed 14 years ago

Comments are duplicated

Categories

(Websites Graveyard :: opentochoice.org, defect, P1)

x86
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: francois, Assigned: javier.morales)

References

()

Details

(Whiteboard: [wiki])

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6
Build Identifier: 

comments duplicated either in Dutch or as error message: "Machine translation failed. retry". Might be linked to bug 551290


Reproducible: Always
I tried this in live and were able to replicate it on stage. It is not related with bug 551290. Apparently it is caused by a feature in WPML that enables the admin of a site to have the comments automatically translated to his own language. Those translations should not be shown to the not logged users, but for some reason they are being shown at the moment. 

You can see the problem replicated in stage2 at http://opentochoice2.stage.mozilla.com/2010/02/web-browser-choice-matters/
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee: nobody → javier.morales
I discover the cause of the problem. When a registered user selects in his profile to see the comments translated to his language, and goes to the single view of an article, WPML contacts google to translate the comments and add a new comment on the Wordpress comments table. Using a WPML table call wp_icl_translations we can tell which comments were translated and delete them from the comments table. 

The attached script removes the duplicate comments, but please note that if another user selects to translate comments it might happen again and the script will have to be re-executed.
(In reply to comment #2)
> Created an attachment (id=432002) [details]
> SQL script that removes the duplicated comments inserted by WPML
> 
> I discover the cause of the problem. When a registered user selects in his
> profile to see the comments translated to his language, and goes to the single
> view of an article, WPML contacts google to translate the comments and add a
> new comment on the Wordpress comments table. Using a WPML table call
> wp_icl_translations we can tell which comments were translated and delete them
> from the comments table. 
> 
> The attached script removes the duplicate comments, but please note that if
> another user selects to translate comments it might happen again and the script
> will have to be re-executed.

Filed bug 552438 to run the SQL on *stage*

Is there a way to disable this "feature" so it doesn't happen again?  We shouldn't fix this problem more than once :)
Priority: -- → P1
I have not find a way to disable it Alex, I will revisit this later this week but we should run the script on production as soon as we can. 
I recommend creating a backup or a dump before running it just in case something goes wrong.
file bug 552564 to run the SQL on production.

Thanks Javier
No problem Alex :)
Marking fixed and adding the [wiki] whiteboard status so that we remember to document this.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [wiki]
Product: Websites → Websites Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: