WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 3 years ago

#38041 closed defect (bug) (invalid)

Rewrite rules on custom post types not detected ( url_to_postid() )

Reported by: j0hj0h Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.6.1
Component: Rewrite Rules Keywords:
Focuses: Cc:

Description

See also: http://wordpress.stackexchange.com/questions/239081/retrieve-post-id-from-querying-url

When using the Live Composer Plugin with its costum post types such as "Projects" (slug: dslc_projects) the permalink format http://localhost/wordpress/?dslc_projects=testproject is not processed properly by url_to_postid(). Note that all other permalink formats, except the plain one as above, work fine.
Live Composer only seems to register new post types but uses the rewrite function while registering them.
While testing the above URL format I found out that url_to_postid() exits on the if clause at line 513.

Apparently the rewrite on the custom post type was not detected.

Change History (1)

#1 @desrosj
3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Hi @j0hj0h,

Thanks for this ticket, and welcome to Trac! My apologies that it took so long to receive a response.

It seems like this may be an issue with the Live Composer plugin and not specifically with WordPress Core

I am going to close this out. But if you are still able to reproduce this issue and can provide more details to reproduce, feel free to reopen!

Note: See TracTickets for help on using tickets.