Closed Bug 1553618 Opened 5 months ago Closed 5 months ago

[Translate.Next] "Can't load specified string" message false positive

Categories

(Webtools :: Pontoon, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mathjazz, Assigned: adrian)

Details

(Whiteboard: tn-testing-2)

Attachments

(1 file)

When switching Entities in the EntityList, the "Can't load specified string" message sometimes appears when it shouldn't.

Steps to Reproduce:

  1. Select an Entity in the EntityList.
  2. Search for a term that will remove the currently selected Entity from the EntityList, but return at least one match.

Expected Outcome:

  • "Can't load specified string" message should not appear after EntityList reloads.

Actual Outcome:

  • "Can't load specified string" message appears.

Alternative Steps to Reproduce:

  • Instead of Search, any method of changing the EntityList can be used in Step 2, e.g.:
    • Using filters,
    • Clicking on the Resource link in the Metadata section,
    • Changing resources in the menu (coming in bug 1519894).
Assignee: nobody → m
Status: NEW → ASSIGNED

Deleting a string param before pushing to history obviously doesn't help:
https://github.com/mozilla/pontoon/blob/80b56520d07f162727fa40a09eaf2e8c14c1b1e7/frontend/src/core/navigation/actions.js#L19

I've noticed the following changes of router.location.search in the console, immediately after triggering steps to reproduce:

(A)
prev state: "?string=193774"
@@router/LOCATION_CHANGE
next state: "?search=%23%23%23%23"

(B)
prev state: "?search=%23%23%23%23"
@@router/LOCATION_CHANGE
next state: "?search=%23%23%23%23&string=193774"

(C)
prev state: "?search=%23%23%23%23&string=193774"
@@router/LOCATION_CHANGE
next state: "?search=%23%23%23%23&string=193683"

So first, the string attribute is gone (A), then it is set to the value of the string in Step 1 (B) and finally (after the "Can't load specified string" message appears) it is set to the value of the new string returned in Step 2 (C).

Assignee: m → adrian

Shouldn't we check the missing string only on first page load? I can't think of another use case when it makes sense to do so.

Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.