Opened 3 years ago

Closed 3 years ago

#22038 closed Bug (fixed)

Admin shows selected rows as "<amount> of undefined selected"

Reported by: Bas Peschier Owned by: Bas Peschier
Component: contrib.admin Version: master
Severity: Normal Keywords: nlsprint14
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

Commit https://github.com/django/django/commit/4523fcd60101124a307bd4026296337087b66884 introduces _actions_icnt to the local scope, which overrides the value set in the HTML.

The admin will show selected rows in a change list as "1 of undefined selected".

PR under https://github.com/django/django/pull/2274; looking into a test.

Change History (7)

comment:1 Changed 3 years ago by Baptiste Mispelon

Needs tests: set
Patch needs improvement: set
Triage Stage: UnreviewedAccepted

Hi,

Th PR looks good but it'd be better with some tests.
I was also thinking it might be wise to add a comment on the line where _actions_icnt is used to indicate that the lack of declaration is on purpose.

I'll mark this as release blocker as well so that it doesn't slip through the cracks.

Thanks for catching this.

comment:2 Changed 3 years ago by Claude Paroz

Tim merged the PR in 83a3add4bed8d8d49f93b30c817c66908b0a26ba. A test would be nice.

comment:3 Changed 3 years ago by Bas Peschier

Keywords: nlsprint14 added
Owner: changed from nobody to Bas Peschier
Status: newassigned

comment:5 Changed 3 years ago by Bas Peschier

Sent a new PR which documents the variable, adds a test and minifies the Javascript: https://github.com/django/django/pull/2340

comment:6 Changed 3 years ago by Baptiste Mispelon <bmispelon@…>

In 578bdb532cd88333569ef3f77042653e1a9f2d9d:

Added tests and minified javascript missing in 83a3add4bed8d8d49f93b30c817c66908b0a26ba.

Refs #22038.

comment:7 Changed 3 years ago by Bas Peschier

Resolution: fixed
Status: assignedclosed

And that commit actually fixed it

Note: See TracTickets for help on using tickets.
Back to Top