WordPress.org

Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 12 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:

Description

[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 12 years ago.
Fixup add_option to clear the notoption cache

Download all attachments as: .zip

Change History (7)

@westi
12 years ago

Fixup add_option to clear the notoption cache

#1 follow-up: @Makki
12 years ago

This resolved my problem with permalinks. thank you

#2 @foolswisdom
12 years ago

  • Version set to 2.2

#3 @westi
12 years ago

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

#4 in reply to: ↑ 1 @westi
12 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
12 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
12 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.