get_string_ajax() doesn't work properly with arguments
Bug #1499583 reported by
Jono M
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
Medium
|
Jono M | ||
15.10 |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
When getting a string with AJAX, arguments to be substituted into the string are passed to the server and are substituted before the response is sent back. This causes problems when a string is used twice with different arguments - the response with the first arguments substituted is cached, and is reused the second time (therefore ignoring the second set of arguments).
It would be much more robust to return a string from the server with "%s"s intact so that interpolation can happen each time it is used on the client.
Changed in mahara: | |
status: | Confirmed → In Progress |
Changed in mahara: | |
milestone: | none → 15.10.0 |
status: | In Progress → Fix Committed |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
One way to verify this: in Firebug (or whatever) enter "get_string_ ajax('deletespe cific', 'mahara', '1')" then a few seconds later enter "get_string_ ajax('deletespe cific', 'mahara', '2')". The output from the second command should be "Delete "2"" but is "Delete "1""