Opened 17 years ago

Closed 17 years ago

#5413 closed (invalid)

prepopulate_from strange behavior

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

Description

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 by James Bennett, 17 years ago

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