#2850 closed defect (bug) (worksforme)
Update permalinks not refreshing rewrite_rules in wp_options table
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | major | Version: | 2.0.3 |
| Component: | Administration | Keywords: | permalinks wp_options rewrite_rules bg|has-patch |
| Focuses: | Cc: |
Description
When a user changes the post-slug name for a static page, the rewrite_rules are not properly refreshed. Consequently, permalinks for static pages will not work properly if the post-slug name is changed for an existing page. The workaround I used was to manually go into wp_options and delete the value for rewrite_rules and then regenerage the permalink structure using the admin control panel.
I opened a forum thread regarding this issue here:
Attachments (1)
Change History (13)
#2
@
20 years ago
Probably would be something like this:
UPDATE wp_options SET option_value = 'blahblablah' WHERE option_id =73 AND blog_id =0 AND option_name = 'rewrite_rules'
#3
@
20 years ago
I can't reproduce this with 2.0.3. Changing the slug for any page correctly refreshes the rewrite rules. Using any plugins? Did you manually enable the cache?
#4
@
20 years ago
- Keywords bg|has-patch added
- Owner changed from anonymous to robmiller
- Status changed from new to assigned
Won't this work - flushing the rewrite rules after the post is edited?
#5
@
20 years ago
robmiller,
That's redundant. edit_post() calls wp_insert_post() which calls $wp_rewrite->flush_rules();
I don't see any reason this reported problem should be happening unless some plugin is interfering.
#7
@
20 years ago
Could this be a permissions problem with his server? If it can't write the htaccess file, it won't work.
#8
@
20 years ago
darkfate,
No, WordPress' rewrite rules are no longer stored in the .htaccess file. All that is there is a generic (unchanging) rule that points all requests to WP's internal rewriter.
So we need to alter the rewrite column in the database when the post slug is changed. Right?