It looks like you’re passing the string 'EP_PERMALINK' instead of the constant (which is an alias for an int) EP_PERMALINK. It’s possible that PHP 8.1 is stricter than 7.4 when it comes to variable types.
WP_Rewrite::generate_rewrite_rules() definitely expects an int for the 2nd parameter ($ep_mask).
Related Posts:
- Need help with add_rewrite_rule
- Custom post type permalink endpoint
- Permalink with sub-sub-category and post name
- permalink independent on the post’s name stored in the database
- How to add a custom URL placeholder to author archives?
- Make post slug have priority over category slug
- Custom Rewrite with Query vars
- Using two permalinks for one post
- flexible rewrite ‘ramble’ URLs with WordPress
- Include Taxonomy slug in post url
- Change the custom post type permalink
- Custom rewrite rules for feeds of custom queries (query_var query strings in URL)?
- Rewrite url / permalink for default archive – yearly / monthly
- Remove Custom Taxonomy Slug from Permalink
- Rewriting permalinks with custom posts
- Rewrite rule never matching
- Child pages with same slug
- Permalinks, Rewrites, Get Variables, Oh My!
- Rewrite-Rules not working on a vhost, everything goes to index.php
- Date archive permalink modification
- Change permalink for a single post entry
- Add a css class to a taxonomy permalink
- How to Modify Existing Rewrite Rules?
- How to get wordpress link to fully evaluate when coming from facebook
- Page Attachment Permalink Structure based on Menu Order?
- When is it a good idea to build a permalink structure from scratch?
- I need a custom permalink for my website
- Permalinks: Page Not Found
- How to add_rewrite_rule with two parameters to a single view page?
- how to add rewrite rule to wordpress default post type
- Remove custom taxonomy base from URL
- remove sub-category of Custom Post Type from permalink structure
- Is a permastruct possible on pages?
- Rewrite rule for a query string
- How do I add /blog/ as a prefix to permalink structure for posts, categories & tags?
- Possible to remove taxonomy from permalink if uncategorized?
- How to remove specific category from URL in WordPress
- Redirect Uploads Folder to Query Vars in WordPress
- wordpress custom post type taxonomy permalink
- Custom permalink for specific category
- Custom permalink leads to index page
- Rewrite rule intended for CPTs gives 404 for pages
- WordPress add_rewrite_tag working for Posts, but not working for Pages
- Rewrite URLs for LeadPages due to subdirectory installation
- Permalink structure between 2 custom post types and a taxonomy
- How to generate a list of all urls
- Rewriting single post url; add_rewrite_rule problem?
- Permalinks only for posts
- rewrite rule to redirect to the most recent date permalink
- How to change “attachment_id” in attachment permarlink?
- How to test custom rewrite rules /permalinks?
- Permalink for PDF of article
- Problems with rewrite rule
- Order custom post type posts by custom field with pretty URL
- Adding URL prefix for foreign language support
- Exclude single page from permalink rule
- help to remove last trailing slash using add_rewrite_rule
- How can you create a Permalink structure on a WordPress site?
- Custom Post Type with modified permalink structure results in 404
- How can I set up a secondary permalink structure?
- permalink and add_rewrite_rule – error 404
- Remove Parents From Permalink of Hierarchical Taxonomy
- How to Use metada Value in Url and is it possible? [duplicate]
- Safest way to create a custom permalink
- Rewrite Post URL so it is constructed from parent post url & child post url
- corrupted URLs – can’t leave starting page
- Create different permalinks for same post
- archive by year and category: permalink support doesn’t work on pagination
- Multiple Taxonomy Items for Separate URLs
- .htaccess to redirect to a wp page
- Custom permalink structure for custom post types including multiple taxonomy
- WordPress Multisite ABSPATH and get_home_path() to check for htaccess or web.config file
- Redirect page to homepage, keeping URL
- Custom permalink question
- Why does page for hierarchical taxonomy parent term go 404?
- Added a prefix in URL permalink structure but the old structure still working!
- Permalinks Question: Adding a prefix ONLY in front of all posts with the ‘video’ post format
- how to have same rewrite rules for 2 different post type?
- Permalink structure /page/page/cpt-post gives 404 with pagination
- Custom Permlinks work, regular page permalinks don’t
- How to change the URL using rewrite rule in wordpress
- What permastrusture tags are generated out of the box right after creating custom post types and taxonomies?
- No Ones Been Able to Override my WordPress Rewrite Rule Issue!
- Rewrite posts url as they’re all children of a page
- a way to support totally different url structure
- Multiple Permalink Patterns for one page
- create user’s view profile link with username
- Permalinks for a custom post type – with a page template (custom query) and taxonomy archive
- Where is wordpress redirecting wp-admin/admin/dashboard to wp-admin and how to turn it off
- Added incorrect rewrite rule now getting an error
- Why doesn’t WP update my .htaccess file?
- Pretty Permalink for Search Queries Not Working
- ReWrite Permalink to New Permalink Nginx
- Permalink broken for pages after adding rewrite rule
- WordPress permalink still not working (error or not understood?)
- Only homepage working correctly, 404 error on everything else
- standard post with extra parameter brings permalink problem
- Getting the terms from “Beautiful Taxonomy Filters” Results ot Integrate into “Ajax Load More”
- Standard Htaccess directives disappear by themselves
- make a new structure tag that does some processing