Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#16807 closed defect (bug) (fixed)

with_front => false doesn't work with PATHINFO permalinks

Reported by: duck_ Owned by:
Priority: normal Milestone: 3.1.1
Component: General Version: 3.0
Severity: normal Keywords:
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 2 years ago.
16807.2.diff (1.7 KB) - added by markjaquith 2 years ago.
cpt-test.php (533 bytes) - added by markjaquith 2 years ago.
Drop this in mu-plugins (PHP5.3 required) to test.

Download all attachments as: .zip

Change History (10)

Also related: #16626

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

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   ryan2 years ago

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

+1

  • 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

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

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