WordPress.org

Make WordPress Core

Opened 18 months ago

Closed 18 months ago

Last modified 18 months 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:

Description

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)

comment:1 markoheijnen18 months ago

Same happens in trunk too.

comment:2 ocean9018 months 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.

comment:3 Prixit18 months 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.
markoheijnen said : "Seriously, till now we never fixed this. That's quite a shame." in that duplicate #13459. There is no solution. I need a solution by using same permalink structure /%postname%/ . Even if its only for new pages/post.

Last edited 18 months ago by Prixit (previous) (diff)

comment:4 markoheijnen18 months 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

comment:5 ocean9018 months ago

  • Version 3.4.2 deleted

comment:6 alexvorn218 months ago

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

comment:7 markoheijnen18 months 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.