Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 8 weeks ago

#24294 closed defect (bug) (invalid)

empty post title generates 404 error

Reported by: marcopanichi's profile marcopanichi Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.5.1
Component: Permalinks Keywords:
Focuses: Cc:

Description

How to generate the error:

1) Settings > Permalink > set Article name
2) new post
3) leave the title empty > write something in the body
4) Publish (a numeric permalink is set because the title is empty)
5) fill in the title > set a category X > Update
6) go to the website > go to category X
7) click on the post title

Expected:

  • I see the article

Real result:

  • I see 404 page

Notes:
My category.php code is taken from Twenty Twelve template, so the title is rendered by the_permalink() function:

<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'fawola' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a>

Change History (3)

#1 @DrewAPicture
12 years ago

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

Duplicate of #5305.

There is a known issue with numeric-only permalinks.

#2 @DrewAPicture
12 years ago

  • Milestone set to Awaiting Review
  • Resolution duplicate deleted
  • Status changed from closed to reopened

Sorry, I misread.

It's still basically the same issue as #5305 though. The permalink is being saved initially as numeric and you're expecting it to change from numeric to a slug when you add a real title. Are permalinks supposed to change when you update a post's title?

#3 @DrewAPicture
12 years ago

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

From IRC:

<wraithkenny> I think [the permalink is] only supposed to update if the post is a draft

And so it does.

Note: See TracTickets for help on using tickets.