Make WordPress Core

Opened 20 years ago

Closed 20 years ago

Last modified 20 years ago

#3692 closed defect (bug) (fixed)

[4798] breaks some option usage scenarios including permalinks.

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

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

Download all attachments as: .zip

Change History (7)

@westi
20 years ago

Fixup add_option to clear the notoption cache

#1 follow-up: @Makki
20 years ago

This resolved my problem with permalinks. thank you

#2 @foolswisdom
20 years ago

  • Version2.2

#3 @westi
20 years ago

  • Owner changed from west to westi
  • Status newassigned

#4 in reply to: ↑ 1 @westi
20 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
20 years ago

  • Resolutionfixed
  • Status assignedclosed

(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
20 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.