Page MenuHomePhabricator

cxsave API fails if the translation exist and in deleted status
Closed, ResolvedPublic


Steps to reproduce

  1. Start translating Tjodhilds kirke from nb to nn
  2. Save the draft

Observe how saving fails with unspecified error (API tells ""Another user is already translating this article") and no warnings were shown about that.

Event Timeline

Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJun 7 2016, 7:36 AM
Amire80 triaged this task as High priority.Jun 19 2016, 9:40 PM
Amire80 added a subscriber: Amire80.

High prio, because the description sounds like it could be a recipe for mayhem.

I'm actually inclined to "Unbreak now", or at least to doing an initial investigation ASAP. But feel free to remove from sprint if this investigation shows that it's not actually urgent.

Amire80 moved this task from Needs Triage to CX9 on the ContentTranslation board.Jun 19 2016, 9:41 PM
Arrbee lowered the priority of this task from High to Normal.Jun 20 2016, 7:24 AM
Arrbee added a subscriber: Arrbee.

Lowering the priority. This was tested and found that only this particular article combination was throwing the error and the warning worked fine for other pages tested.

There is a deleted article for Tjodhilds kirke from nb to nn. Our ownership check in cxsave API is not taking care of translation status. That is the cause for this issue. The client side code takes care of that already

santhosh renamed this task from "Another user is already translating this article" is missing for some drafts to cxsave API fails if the translation exist and in deleted status.Jun 21 2016, 6:10 AM

Change 295324 had a related patch set uploaded (by Santhosh):
Check for translation status along with ownership check

santhosh claimed this task.Jun 21 2016, 6:12 AM
santhosh moved this task from Backlog to In Review on the Language-Q4-2016-Sprint 5 board.

Change 295324 merged by jenkins-bot:
cxsave API: Check for translation status along with ownership check

santhosh moved this task from In Review to QA on the Language-Q1-2016-17 Sprint 2 board.

I don't think this actually works. I published a translation, updated cx_translations and cx_translators to change the user id to another person (as if another person had made the translation), then tried to translate it again. I saw it tries to reuse the previous draft id while loading the translation, failing. Saving does not work. Also the implications in relation to T127427 are not acceptable in my opinion. If we want to allow this, I suggest having the unique key of cx_translations include the translator id or just do it for deleted status.

@Nikerabbit For your suggested improvments, I think a new ticket is required.

I filed T143102. Please improve the description as you understand it.

Nikerabbit closed this task as Resolved.Aug 17 2016, 5:54 AM