Make WordPress Core

Opened 10 years ago

Closed 8 years ago

#25838 closed defect (bug) (invalid)

Viewing single posts of CPT 'author' result in 404 after upgrade

Reported by: brianbws's profile brianbws Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.7.1
Component: Posts, Post Types Keywords:
Focuses: Cc:


Everything works fine in a clean install of 3.6.1 with this in functions.php:

add_action( 'init', 'create_custom_post_types' );
function create_custom_post_types() {
    $args = array(
      'public' => true,
      'label'  => 'Authors'
    register_post_type( 'author', $args );

But after upgrading to 3.7.1 you can no longer go to a single page without getting a 404 error. This happens with or without permalinks enabled.

Someone else has had the same problem here:

This has affected 2 of my large live sites so hope it can be fixed soon. Thanks!

Change History (4)

#1 @ocean90
10 years ago

Maybe related: #25798

#2 @dd32
10 years ago

I'm fairly certain this is a wontfix.

This is effectively using the author query var for a CPT, a reserved query var which WordPress uses.

If you don't prefix your post types / query vars, things will break eventually, like has happened here.

#3 @nacin
10 years ago

  • Component changed from General to Post Types

#4 @chriscct7
8 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Invalid per comment:2

Note: See TracTickets for help on using tickets.