Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#3692 closed defect (bug) (fixed)

[4798] breaks some option usage scenarios including permalinks.

Reported by: westi Owned by: westi
Milestone: 2.2 Priority: normal
Severity: normal Version: 2.2
Component: Administration Keywords: commit
Focuses: Cc:


[4798] Breaks the page permalinks on my test blog.

When you update the permalinks on option-permalinks the following happens:

  1. delete_option is called for 'page_uris'.
  2. update_option is called for 'page_uris'.
  3. This calls into get_option which marks the option as non-existent
  4. Then this calls add_option (as the option didn't exist) which adds the option to the db
  5. Then update_option returns.

Patch to fix attached
This means we have the option in the db (and cache) but we also have cached that the option doesn't exist.

get_option listens to the notoption cache above all else so we can no longer access the option!

Attachments (1)

2268-fixup.diff (698 bytes) - added by westi 14 years ago.
Fixup add_option to clear the notoption cache

Download all attachments as: .zip

Change History (7)

14 years ago

Fixup add_option to clear the notoption cache

#1 follow-up: @Makki
14 years ago

This resolved my problem with permalinks. thank you

#2 @foolswisdom
14 years ago

  • Version set to 2.2

#3 @westi
14 years ago

  • Owner changed from west to westi
  • Status changed from new to assigned

#4 in reply to: ↑ 1 @westi
14 years ago

Replying to Makki:

This resolved my problem with permalinks. thank you

I assume you are referring to #3686?

This issue only affects trunk (2.2-bleeding) and not 2.1 you really shouldn't be running your blog on 2.2-bleeding.

#5 @markjaquith
14 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [4820]) Have add_option() for options whose non-existence has been cached clear that cached non-existence before adding the option. Nice catch by Westi. fixes #3692

#6 @ryan
14 years ago

(In [4831]) Remove notoptions caching. Multile rewrite_rules options were being created. See #3692 #2268

Note: See TracTickets for help on using tickets.