Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#23300 closed defect (bug) (duplicate)

Wordpress can create same URL for a post and a page.

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


I am using Wordpress 3.4.2 on my website http://latest-health-news.com/.

I think i found a bug a wordpress. It can create same URL for a post and a page. I created a post with URL :http://latest-health-news.com/top-10-brain-diseases/ , then i created a page using same URL, and it was created successfully. I was expecting this it will add a"-2" at the end of page URL, but it didn't happen. Now when i went back to my home page, which show my last 15 posts, i click on the same post, but it opened the page (the content of post and page were different, so i can distinguish it). There was no way for the visitor of my site to open that post. However the excerpt that was showing on the homepage was correct (it was from the post). Then i deleted the page to get rid of this problem. But it resulted in another one. Now when i clicked on that post on the homepage, it showed as error message saying that its a "redirect loop". It was happening because i forgot to remove that page from thrash. Now when i removed that page from trash, everything was fine.

I think its a bug in the wordpress that it can create same URL for a post and a page. I think that while creating a post it searches the database of posts if any other post contain the same URL, it don't search the database of pages, while it should do so. Same is in the case of creating a page. I don't know if this problem happened to anyone before, but i didn't found any satisfactory answer to this problem on internet or i wasn't able to find it.

Change History (7)

#1 @markoheijnen
5 years ago

Same happens in trunk too.

#2 @ocean90
5 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Severity changed from critical to normal
  • Status changed from new to closed
  • Version 3.4.2 deleted

Duplicate of #13459.

#3 @Prixit
5 years ago

  • Resolution duplicate deleted
  • Status changed from closed to reopened
  • Version set to 3.4.2

OK i got it that its a duplicate, but its not "closed" as there is no solution to this bug. You (markoheijnen) said : "Seriously, till now we never fixed this. That's quite a shame." in that duplicate #13459. But there is no solution. I need a solution by using same permalink structure /%postname%/ . Even if its only for new pages/post.

Version 0, edited 5 years ago by Prixit (next)

#4 @markoheijnen
5 years ago

  • Resolution set to duplicate
  • Status changed from reopened to closed

It's a duplicated ticket so this one is closed. You should comment or/and add patches to #13459

#5 @ocean90
5 years ago

  • Version 3.4.2 deleted

#6 @alexvorn2
5 years ago

the solution is simple: Just don't create a post with the same slug as an existing page!

#7 @markoheijnen
5 years ago

Alex if you don't have anything meaningful to say you don't have to respond. Makes tickets readable.

Note: See TracTickets for help on using tickets.