Opened 11 years ago

Closed 11 years ago

#5413 closed (invalid)

prepopulate_from strange behavior

Reported by: rob.slotboom@… Owned by: nobody
Component: contrib.admin Version: master
Severity: Keywords: slugfield, prepopulate_from
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


Playing a little with prepopulate_from I found some strange things.

First try typing "hotel b" then "hotel a". The first results in "hotel_b" the second in "hotel ". When continuing typing (hotel aa) the slugfield is filled correctly.

When adding a record, re-entering the "from field" and retyping it's value the slugfield isn't updated, even when you cleared it first.

When editing a record the slugfield isn't updated, even when you cleared it first.

I'm using Firefox on osx.

Change History (1)

comment:1 Changed 11 years ago by James Bennett

Resolution: invalid
Status: newclosed

The script which transforms the value into a slug also removes common "stop words" such as "the", "an", and -- important in your case -- "a". If you need to preserve the "a", simply enter it manually.

The slug will not be automatically changed when you later edit the object because it is assumed that the slug is used as part of a URL, and URLs are not meant to be automatically changed -- doing so would break any link back to the original URL.

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