I’m not sure if this is going to help or not, but it might help to know that some actions fire more than once. For example, save_post will actually fire three or four times on a given save. One is for the revision. One of the new post. Etc.
It could be, in your case, that you’re experience something similar. Whatever it is is firing preform the post_name is assigned and then again after. Maybe?
Related Posts:
- Change link to other post to shortlink in the editor
- Random Alphanumeric Key URLs
- Make custom post available under main domain directly?
- Shortlinks work only for logged in users
- Use shortlink as permalink
- Passing and retrieving query vars in wordpress
- Get the current page URL (including pagination)
- What is the difference between get_post_permalink and get_permalink?
- WordPress matching URLs with trailing tildes
- Setting up WordPress with Custom Permalinks and no .htaccess File?
- mod_rewrite enabled but Permalinks show index.php
- Why does /wp-json/ not work on the “plain” permalink structure?
- Custom Permalink: /year/month/post-goes-here/?
- Menu Link Redirect Based on Username or User ID
- Turn off %postname% auto-incrementing?
- How to get the post id from a permalink?
- Create additional short URL with custom field and 301 redirect
- Redirect short-form URL to long-form URL (post_id to post_id + post_name)
- Does a parent page’s post_title have to appear in a child page permalink?
- Enable Minify in W3Total Cache using NGINX [closed]
- Stop redirecting to posts not in a category / duplicate slugs
- How to make variables in URL look like the permalink structure?
- Why I can’t change the permalink of this page?
- Custom Taxonomy URL
- Change permalink rule if category is called “uncategorized”
- How to improve WordPress security by hiding non public facing files?
- Get canonical link
- CSS not loaded when omitting www. part of URL
- enable permalinks in window hosting
- Is it possible to keep all special letters for foreign languages in slug as in title?
- index.php is always displayed before any file on the URL
- How do I fix permalink and media library issues on a LEMP stack?
- Non latin post slug truncate
- How to find the post_id of a post on a wordpress blog that uses pretty URLs?
- Page preview is shown, updating page gives 404 error
- Dynamic Template file for subpage
- How to 301 redirect from one url to another properly
- How do I change the permalink of a scheduled post so that it can be linked to?
- WPML Permalink missing language slug
- How to remove /year/month from uploaded medias?
- Htaccess https 301 problem
- Advanced author permalinks
- Format HTTP links
- Permalinks on post is working, on pages 404 error
- Change directory url to be same as page permalink?
- When do i need to get permalink structure of a specific post?
- implement separate templates for 1 post type
- Permalinks set to /%postname%/ but still have links being indexed in the form ?p=x
- WordPress author.php template does not work with custom permalink structure! Help!
- Adding URL prefix for foreign language support
- LAMP WordPress Permalinks 404 error
- Links in post content don’t work on home page
- Remove all stop words from old permalinks
- Arabic permalink redirect to home page
- Changing permalink settings causes 404
- 404 error on all pages but custom post types are working OK
- How can I see a list of all pages my WordPress site has generated?
- Can I change the URL structure for a CPT only?
- Custom permalink structure for product
- Make a post inaccessible without a unique ID in the URL
- index.php in URL
- archive by year and category: permalink support doesn’t work on pagination
- Empty the_excerpt() broke the_permalink() under him?
- Code snippet to add filter pre_post_link to change Media URL (post_type attachment permalink/slug)
- Permalink not changing according to post type
- iFrame permalinks on WordPress
- Change permalink structure in all sites of a multisite
- Custom permalink structure with a prefix just for posts
- Changing permalink stops me from creating webpages
- Make query parameter an endpoint
- WordPress Pages that use Domain URL
- 404 page not found – Yet open admin page it works
- How can I have a page’s permalink include my custom post type’s slug?
- Added a prefix in URL permalink structure but the old structure still working!
- WordPress Permalinks
- Problem with permalinks
- Find internal links to post
- “Undefined” added to page content after google Adwords click
- create user’s view profile link with username
- Image upload ruined my links
- How to rewrite a folder in WordPress?
- The Permalink doesn’t work after the foreach ended
- Force/Limit the post/page slug to accept only url friendly characters
- Permalinks setting raises 500.0 error
- Define a Permalink Structure by Post and Page
- Tag search not working after permalink structure change
- After changing permalink settings, everything works fine except for the two most recent posts
- permalink repeated
- .htaccess not working in WordPress
- wp_get_attachment_url not working
- Custom permalink to make a page respond properly
- How to avoid duplicate Url for the home page
- WordPress 3.1 problem, getting 404
- Display a custom slug in URL depending on user variable
- htaccess strip url
- Problems loading stylesheet and permalinks after rebooting
- Custom Permalink Structure For a Specific Category
- Error: “Sorry, this content could not be embedded” when using the Embed block
- WordPress not remembering old slugs for pages
- make a new structure tag that does some processing