A tag such as "reality television" causes the approval or rejection of that tag to fail. The tag is simply never approved, no matter how many times you click the approve or reject button, or check the box and click approve. It does NOT affect any other tags, or affect batch processing of the other tags.
looks like it might be an issue with Lingua::Ispell...
Reproduced with following tags on current master: "Reality TV" Thema "Pinguin" No errors, table says approved but they are not after reload of page or new search for tags. Approving tags with single quotes results to an alert box: "AJAX error (1 alert)" e.g. for 'Pinguin Movies' or Kinderbücher 'Pinguin' but they appear as approved after reload of page or new search for tags.
Created attachment 64129 [details] [review] Bug 5471 - Quotes in tags cause moderation approval/rejection to fail This patch makes changes to the tag moderation template and JavaScript to fix handling of tags with double or single quotes. This patch also moves the tags moderation JavaScript out of the template and into a separate JS file. To test you should have multiple tags awaiting moderation, including tags which contain double and single quotes. - Go to Tools -> Tags. - In the list of tags pending approval, test approving and rejecting tags, including those containing single or double quotes. - The state of the "Approve" or "Reject" buttons should correctly change according to the action you chose. - The label in the status column should update correctly. - In the "Check lists" form, submitting approved, rejected, and unclassified terms should result in the correct message.
Created attachment 64208 [details] [review] [SIGNED OFF] Bug 5471 - Quotes in tags fail This patch makes changes to the tag moderation template and JavaScript to fix handling of tags with double or single quotes. This patch also moves the tags moderation JavaScript out of the template and into a separate JS file. To test you should have multiple tags awaiting moderation, including tags which contain double and single quotes. - Go to Tools -> Tags. - In the list of tags pending approval, test approving and rejecting tags, including those containing single or double quotes. - The state of the "Approve" or "Reject" buttons should correctly change according to the action you chose. - The label in the status column should update correctly. - In the "Check lists" form, submitting approved, rejected, and unclassified terms should result in the correct message. Signed-off-by: Lee Jamison <ldjamison@marywood.edu> Works correctly based on test plan. Tested using single- and double-quoted tags. Passes QA Tools.
Kyle, did you forget to attach your signoff patch?
Created attachment 65334 [details] [review] Bug 5471 - Quotes in tags fail This patch makes changes to the tag moderation template and JavaScript to fix handling of tags with double or single quotes. This patch also moves the tags moderation JavaScript out of the template and into a separate JS file. To test you should have multiple tags awaiting moderation, including tags which contain double and single quotes. - Go to Tools -> Tags. - In the list of tags pending approval, test approving and rejecting tags, including those containing single or double quotes. - The state of the "Approve" or "Reject" buttons should correctly change according to the action you chose. - The label in the status column should update correctly. - In the "Check lists" form, submitting approved, rejected, and unclassified terms should result in the correct message. Signed-off-by: Lee Jamison <ldjamison@marywood.edu> Works correctly based on test plan. Tested using single- and double-quoted tags. Passes QA Tools. Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
All buttons work as expected and quotes no longer cause errors. In terms of usability I think there may be a little more to do here on a new bug: 1 - Approve a term - it remains on the screen - click 'Reject' at the bottom and the tag is approved and cleared 2 - Repeat qabove but also check the checkbox - tag is reject (though it said approved) Would be nice to possibly have an 'Apply' button and then only show 'reject/approve' if some boxes are checked? Adding an 'undo' might be nice as well in case you click on a tag you aren't ready to approve or reject yet Not failing but leaving those comments for consideration
Created attachment 65831 [details] [review] Bug 5471: Use uri_escape_utf8 to handle utf8 chars correctly Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to master for 17.11, thanks to everybody involved!
Pushed to 17.05.x, will be in 17.05.05.
Patches don't apply cleanly to 16.11.x for the template changes to review.tt. Please provide a patch for 16.11.x if you want this included.