WordPress.org

Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#10981 closed defect (bug) (fixed)

Storing rewrite_rules in a transient causes issues with non-permanent object caches and plugins that add endpoints

Reported by: markjaquith Owned by: markjaquith
Milestone: 2.9 Priority: high
Severity: major Version: 2.9
Component: Rewrite Rules Keywords: dev-reviewed
Focuses: Cc:

Description

If a WP install is using a non-permanent object cache like Memcache, its "transient"-stored rewrite_rules entry will go away without warning and WP will regenerate it. That regeneration happens before init, where many plugins use add_rewrite_endpoint(). Thus the rules will get populated without the endpoint.

e.g. http://wordpress.org/support/topic/313946

Recommend we revert to old option-based method of rewrite_rules storage.

Attachments (2)

rewrite_rules.diff (1.5 KB) - added by markjaquith 10 years ago.
switches to storing the rules in an option, like before.
rewrite_rules.002.diff (3.1 KB) - added by markjaquith 10 years ago.
Remove rewrite_rules from deprecated options list.

Download all attachments as: .zip

Change History (5)

@markjaquith
10 years ago

switches to storing the rules in an option, like before.

#1 @markjaquith
10 years ago

  • Owner changed from ryan to markjaquith
  • Status changed from new to accepted
[10/19/09 4:27:23 PM] Mark Jaquith: so this will just be a reversion to our behavior pre-transients.
[10/19/09 4:27:45 PM] Ryan Boren: Yeah. Sounds like the correct fix.

#2 @westi
10 years ago

  • Keywords dev-reviewed added

Sounds like a sensible idea to me.

@markjaquith
10 years ago

Remove rewrite_rules from deprecated options list.

#3 @markjaquith
10 years ago

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

(In [12061]) Revert to old options table storage of rewrite_rules. Transient object caches would silently regenerate rewrite_rules without giving plugins a chance to readd endpoints. fixes #10981

Note: See TracTickets for help on using tickets.