WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#35197 closed defect (bug) (invalid)

Permalink adding 2 on the end

Reported by: tncdesigns Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Permalinks Keywords: close
Focuses: Cc:

Description

Good day

I just want to report a minor bug with regards to permalink it is adding "-2" in the url even if there is only one page.

ex. url: http://domain.com/home-page-2

Change History (7)

#1 follow-up: @Asgaros
6 years ago

Hello @tncdesigns.

I think there is or has already been another page or post which is/was using "home-page" as a permalink, so there was added a "-2" at the end of it. I tested it on some of my sites and it is working fine so far.

Maybe you can have a look over it again. :)

#2 @dd32
6 years ago

Also note that Trashed pages/posts are taken into consideration for slug uniqueness: #11863

#3 @SergeyBiryukov
6 years ago

  • Keywords close added

As noted above, there's likely a trashed page or post with the same slug.

#4 in reply to: ↑ 1 @tncdesigns
6 years ago

Replying to Asgaros:

Hello @tncdesigns.

I think there is or has already been another page or post which is/was using "home-page" as a permalink, so there was added a "-2" at the end of it. I tested it on some of my sites and it is working fine so far.

Maybe you can have a look over it again. :)

I have double check on that also. I have emptied page and post trash and re-save permalink just to be sure but still getting that issue. I experience this issue twice already on different installation.

#5 follow-up: @smerriman
6 years ago

Check your media library as well - slugs for uploaded images are also taken into account. Perhaps you've uploaded an image with the same name.

#6 in reply to: ↑ 5 @tncdesigns
6 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

Replying to smerriman:

Check your media library as well - slugs for uploaded images are also taken into account. Perhaps you've uploaded an image with the same name.

Thanks @smerriman I have able to replicate it. It was cause by a media/image file that have the same name.

#7 @dd32
6 years ago

  • Milestone Awaiting Review deleted
  • Resolution changed from worksforme to invalid
  • Version 4.4 deleted

Thanks for confirming @tncdesigns!

Note: See TracTickets for help on using tickets.