WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#16807 closed defect (bug) (fixed)

with_front => false doesn't work with PATHINFO permalinks

Reported by: duck_ Owned by:
Milestone: 3.1.1 Priority: normal
Severity: normal Version: 3.0
Component: General Keywords:
Focuses: Cc:

Description

When running WordPress with PATHINFO permalinks any plugin registering a custom post type or custom taxonomy using with_front => false in the rewrite argument just will not work since the /index.php is required.

/index.php cannot be treated like any other front since it is actually required for the permalinks to work.

We might want to internalize PATHINFO into WP_Rewrite so it doesn't get stripped like this.

Related: #16733

Attachments (3)

16807.diff (1.1 KB) - added by markjaquith 3 years ago.
16807.2.diff (1.7 KB) - added by markjaquith 3 years ago.
cpt-test.php (533 bytes) - added by markjaquith 3 years ago.
Drop this in mu-plugins (PHP5.3 required) to test.

Download all attachments as: .zip

Change History (10)

markjaquith3 years ago

markjaquith3 years ago

comment:1 scribu3 years ago

Also related: #16626

markjaquith3 years ago

Drop this in mu-plugins (PHP5.3 required) to test.

comment:2 markjaquith3 years ago

To test, drop cpt-test.php into mu-plugins. Set your permalink structure to start with:

(A) /index.php/

OR

(B) /index.php/archives/

Create a "Thing" entry called "thing-test"

Verify that http://wp.dev/index.php/things/ and http://wp.dev/index.php/things/thing-test/ work.

In the case of (B), you shouldn't see /archives/ appear in those URLs, because with_front is false.

comment:3 ryan3 years ago

I get the behavior you describe for that test plan. Looks good.

comment:5 markjaquith3 years ago

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

(In [17518]) Correctly handle PATHINFO CPTs and CTs that specify with_front=false. fixes #16807 for trunk

comment:6 markjaquith3 years ago

(In [17519]) Correctly handle PATHINFO CPTs and CTs that specify with_front=false. fixes #16807 for 3.1

comment:7 nacin3 years ago

  • Milestone changed from Awaiting Review to 3.1.1
Note: See TracTickets for help on using tickets.