Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#22592 closed defect (bug) (duplicate)

Post Permalink Broken When No Post Title

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

Description

Something really bizarre just happened. This is what I did:

  1. Upload an image into QuickPress.
  2. Insert the image into the post body.
  3. Click the Publish button.
  4. Click View Post.

Expected result:

See the new post with the uploaded image.

Actual result:

WordPress 404

I need to do some additional testing. What I can see so far is that the assigned post ID was 18, but the post behaves as though an invalid slug were assigned. It is generating a permalink like /2012/11/18/ and my permalink structure is /%year%/%monthnum%/%postname%/

Change History (6)

#1 @miqrogroove
11 years ago

  • Summary changed from QuickPress Post Permalink Broken to Post Permalink Broken When No Post Title

Same issue reproduced in the main editor. It gave me a permalink of /2012/11/21/ and a 404 error on the post.

#2 @miqrogroove
11 years ago

  • Version trunk deleted

Reproduced on 3.4.2. Possible duplicate of #5305.

#3 @miqrogroove
11 years ago

The direct cause of this problem is the archive rewrite:

s:39:"([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$";
s:63:"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]";

This should go away after 100 posts exist in the database.

The actual post rewrite shows up much later at:

s:44:"([0-9]{4})/([0-9]{1,2})/([^/]+)(/[0-9]+)?/?$";
s:81:"index.php?year=$matches[1]&monthnum=$matches[2]&name=$matches[3]&page=$matches[4]";

#4 @miqrogroove
11 years ago

Confirmed. Uploaded several photos, then created a post with ID 107. Permalink works correctly on that post.

#5 @miqrogroove
11 years ago

Going through all of the Permalink settings now.

Default: /?p=12 works fine.

Day and name: /2012/11/26/12/ works fine.

Month and name: /2012/11/12/ is broken.

Numeric: /archives/12 works fine.

Post name: /12/ works, however there is a foreseeable conflict with IDs such as 2012.

#6 @SergeyBiryukov
11 years ago

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

Duplicate of #5305.

Note: See TracTickets for help on using tickets.