WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 11 months ago

#45513 reviewing defect (bug)

Notice: Undefined index: year

Reported by: 1naveengiri Owned by: SergeyBiryukov
Milestone: Future Release Priority: normal
Severity: normal Version: 5.0
Component: Permalinks Keywords: has-screenshots needs-testing dev-feedback has-patch needs-unit-tests
Focuses: Cc:

Description

With permalink structure /%postname%/%monthnum%/

When I visit a post in frontend it throw me a notice

Notice: Undefined index: year at wp-includes/rewrite.php:387

Attachments (3)

Screenshot 2018-12-07 at 10.00.46 AM.png (448.6 KB) - added by 1naveengiri 3 years ago.
error.png (141.1 KB) - added by mukesh27 3 years ago.
Error when we check frontend.
45513.patch (849 bytes) - added by mukesh27 3 years ago.
Please try this patch it working fine for me.

Download all attachments as: .zip

Change History (9)

#1 @mukesh27
3 years ago

  • Keywords has-screenshots needs-testing dev-feedback added

Nice cache @1naveengiri

Confirm if we use /%postname%/%monthnum%/ in Custom Structure then in front end it show attached Notice: Undefined index: year in /mukesh/wordpress5.0/wp-includes/rewrite.php on line 387

Last edited 3 years ago by mukesh27 (previous) (diff)

@mukesh27
3 years ago

Error when we check frontend.

@mukesh27
3 years ago

Please try this patch it working fine for me.

#2 @mukesh27
3 years ago

  • Keywords has-patch added; needs-patch removed

#3 @SergeyBiryukov
3 years ago

  • Milestone changed from Awaiting Review to 5.1
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#4 @pento
3 years ago

  • Keywords needs-unit-tests added
  • Milestone changed from 5.1 to Future Release

This will need fairly careful testing and review for back compat issues.

Unit tests would be useful here.

#5 @1naveengiri
2 years ago

Hi Guys,

Just a friendly follow-up,

do we have any recent plan for it? seems a very long waiting time for this ticket.

Thanks

Note: See TracTickets for help on using tickets.