studiopress / agentpress-listings

AgentPress Listings
http://wordpress.org/plugins/agentpress-listings/
GNU General Public License v2.0
9 stars 11 forks source link

Taxonomy ID of 'year' causes subpage URLs to display homepage #30

Open nickcernis opened 6 years ago

nickcernis commented 6 years ago

If you create a listings taxonomy with an ID of ‘year‘ and then attempt to load any subpages, you will see the homepage at the subpage URL. WP will match the slug against 'year=' instead of 'pagename=', find no year, and serve the homepage:

__dxr-59625-331___studiopress_member_contact__technical_issue_-_rainmaker_digital_helpdesk

We could auto-rename an ID of 'year' to 'years' or 'era' (both of which work).

'year' was the only slug I could reproduce this with — others such as post_id, postname, etc. do not cause an issue.

Taxonomy IDs cannot be renamed via the UI at present, so people encountering this either need to make database edits to rename the ID, or recreate their 'year' taxonomy as 'era' or similar, re-assign their listings to the correct 'era' instead of 'year', then delete the 'year' taxonomy and visit the Settings → Permalinks page to flush rewrite rules.