From #107824: Convert {watchdog}.referer and {accesslog}.url from VARCHAR to TEXT, I didn't get the patch that I wanted committed, so now I need to file a separate issue. We're currently using the incorrect spelling of "referrer" through our database columns and core code. I think we should be should fix the spelling error in Drupal since it is easy and will not continue to propogate a sad, mis-spelled word.
From the Wikipedia article on "referrer":
Referer is a common misspelling of the word referrer. It is so common, in fact, that it made it into the official specification of HTTP – the communication protocol of the World Wide Web – and has therefore become a widely used industry spelling when discussing HTTP referrers[citation needed]. The misspelling usage is not universal, the correct spelling of "referrer" is used in some web specifications such as the Document Object Model.
This issue will also rename the {accesslog}.url column to {accesslog}.referrer to match consistancy and description. "url" to me implies the current url, when in fact, that column's description from the schema says, 'Referrer URI.'
| Comment | File | Size | Author |
|---|---|---|---|
| #31 | make-it-referrer-343626-31.patch | 16.24 KB | valthebald |
| #29 | make-it-referrer-343626-29.patch | 16.24 KB | valthebald |
| #27 | make-it-referrer-343626-27.patch | 15.91 KB | valthebald |
| #26 | make-it-referrer-343626-26.patch | 15.91 KB | valthebald |
| #22 | make-it-referrer-343626-22.patch | 15.24 KB | valthebald |
Comments
Comment #1
dave reidPatch ready for review.
Comment #2
panchoI was just creating an issue to rename {statistics}.url' to 'referrer', but this should be handled consistently.
So a +1 from me.
However, we never ever change existing update functions, but create additional ones to ensure the upgrade path! Fixed this in the enclosed patch.
Comment #3
dave reidThanks Pancho! Yeah, I should have backtracked on changing an update function. I wasn't too worried about it since it's a 7.x upgrade, which is not finalized yet. Revised from #3 that adds the php-doc grouping around the update functions. Plus, no offense, I like my patch name better. :)
Comment #4
panchoIt doesn't matter whether 7.x is finalized or not - we want to make sure people who use 7.x-dev are not left with broken tables. #3 is good.
Comment #6
dave reidComment #7
dave reidAs I have learned recently, a 7.x -> 7.x update path are not supported since 7.x is always changing.
Comment #9
dave reidRe-rolled and merged the updates into current 7.x update functions.
Comment #11
dave reidSo I've tested #9 on a clean MySQL and PostgreSQL HEAD install and I cannot duplicate the 1 exception from the testing bot...
Comment #12
dave reidComment #13
dave reidRe-rolled and ready for review!
Comment #15
dave reidRe-rolled because user table name was rolled back to users.
Comment #17
Tor Arne Thune commentedStill a valid issue after the release of 7.0. Moving to 8.x.
Comment #18
valthebaldReroll for 8.x
Comment #20
valthebaldWrong copy-paste, sorry
Comment #22
valthebaldWhat's wrong with me? :(
Comment #24
valthebaldInteresting. Upgrade path produces messages => watchdog schema changed => watchdog() throws exceptions. I wonder how to fix this in a sane way?
Comment #25
valthebaldIs it at all possible to introduce {watchdog} schema change without breaking upgrade tests?
Comment #26
valthebaldI suggest using hook_requirements to rename referer field to referrer in dblog schema.
Actually, it goes in 2 steps:
1) hook_requirements adds new field referrer, to allow modules use watchdog() during installation, and not to break upgrade path
2) hook_update_N removes referer field, which becomes obsolete
Comment #27
valthebaldFixed small typo in dblog_update_8002() comment
Comment #29
valthebaldhook_requirements() *MUST* return value, retrying...
Comment #31
valthebaldCheck dblog schema, not system.
Comment #34
valthebaldwith 3d-party libraries using the same "erroneous" spelling (both guzzle and symfony use `referer`), does it at all make sense to fix field naming in Drupal?
Comment #43
kaynen commentedI noticed this when doing some troubleshooting, but it appears that 'referer' and 'referrer' have almost become interchangeable. Should this issue be closed?