10up/10up-experience

Rewrite Rules cant be flushed when 10up Experience plugin is enabled

ivanlopez opened this issue · 6 comments

Describe the bug
If you update an existing rewrite rule or register a new post type the rewrite rules are not updating when you flush the rewrite rules. It's due to the option failsafe code. In order to flush the rules, you have to disable the plugin first.

Steps to Reproduce

  1. Register a new public post type
  2. Flush the rewrite rules
  3. Create a new post and attempt to view it on the front-end
  4. The content 404's because there are no rewrite rules for it

Expected behavior
Flushing the rewrite rules should fully regenerate the rules instead of pulling them from the cache.

@ivanlopez mind creating a PR?

I can definitely create a PR.

Fixed in cb81667

Suggest closing this issue if this fix has made it into the production release?

Can we close this issue since it was fixed in cb81667 ?

cc @tlovett1 @ivanlopez

Closing since this is fixed