[Plugin: RSVPMaker] Need Help Diagnosing Permalink Problem Reports
-
Moving this topic to the hacks sub-forum:
https://www.ads-software.com/support/topic/need-help-diagnosing-permalink-problem-reports?replies=1Apologies for not reading the post about that first.
—
I’m having trouble with reports of 404 errors from some but not all users of an event management plugin I created that uses WP3 custom post types. It works fine on my system, and those of some other happy customers, but the people who are having trouble report they get page not found when they try to click on a permalink associated with the post type.
I would appreciate any suggestions on how to track down the problem. The custom post type is registered as ‘event’ so the permalink structure is /event/%event%
At one point I, thought the url parsing routine might be getting confused between that and a page on one of the problems sites that was /events/ — based on another post I saw that discussed these sorts of problems. Someone said the parser could be confused if a similar slug was used in the category hierarchy. But I tried changing the post type slug to ‘rsvp-event’ and that didn’t seem to make a difference. I had one of the people who was having trouble install it on her site.
Below, I’ve included the custom post type setup code and a data dump of the rewrite object it creates.
The plugin in question is this:
https://www.ads-software.com/extend/plugins/rsvpmaker/
The custom post type setup code looks like this:
add_action( 'init', 'create_post_type' ); function create_post_type() { register_post_type( 'event', array( 'labels' => array( 'name' => __( 'Events' ), 'add_new_item' => __( 'Add New Event' ), 'edit_item' => __( 'Edit Event' ), 'new_item' => __( 'Events' ), 'singular_name' => __( 'Event' ) ), 'menu_icon' => WP_PLUGIN_URL.'/rsvpmaker/calendar.png', 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'query_var' => true, 'rewrite' => true, 'capability_type' => 'post', 'hierarchical' => false, 'menu_position' => 5, 'supports' => array('title','editor','author','excerpt'), 'taxonomies' => array('event-type') ) ); // Add new taxonomy, make it hierarchical (like categories) $labels = array( 'name' => _x( 'Event Types', 'taxonomy general name' ), 'singular_name' => _x( 'Event Type', 'taxonomy singular name' ), 'search_items' => __( 'Search Event Types' ), 'all_items' => __( 'All Event Types' ), 'parent_item' => __( 'Parent Event Type' ), 'parent_item_colon' => __( 'Parent Event Type:' ), 'edit_item' => __( 'Edit Event Type' ), 'update_item' => __( 'Update Event Type' ), 'add_new_item' => __( 'Add New Event Type' ), 'new_item_name' => __( 'New Event Type' ), 'menu_name' => __( 'Event Type' ), ); register_taxonomy('event-type',array('event'), array( 'hierarchical' => true, 'labels' => $labels, 'show_ui' => true, 'query_var' => true, 'rewrite' => array( 'slug' => 'event-type' ), )); } //make sure new rules will be generated for custom post type add_action('admin_init', 'flush_rewrite_rules');
WP_Rewrite Object
(
[permalink_structure] => /%year%/%monthnum%/%postname%/…
[rules] => Array
(
[event/[^/]+/attachment/([^/]+)/?$] => index.php?attachment=$matches[1]
[event/[^/]+/attachment/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1
[event/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
[event/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
[event/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]
[event/([^/]+)/trackback/?$] => index.php?event=$matches[1]&tb=1
[event/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?event=$matches[1]&feed=$matches[2]
[event/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?event=$matches[1]&feed=$matches[2]
[event/([^/]+)/page/?([0-9]{1,})/?$] => index.php?event=$matches[1]&paged=$matches[2]
[event/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?event=$matches[1]&cpage=$matches[2]
[event/([^/]+)(/[0-9]+)?/?$] => index.php?event=$matches[1]&page=$matches[2]
[event/[^/]+/([^/]+)/?$] => index.php?attachment=$matches[1]
[event/[^/]+/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1
[event/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
[event/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
[event/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]
[event-type/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?event-type=$matches[1]&feed=$matches[2]
[event-type/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?event-type=$matches[1]&feed=$matches[2]
[event-type/([^/]+)/page/?([0-9]{1,})/?$] => index.php?event-type=$matches[1]&paged=$matches[2]
[event-type/([^/]+)/?$] => index.php?event-type=$matches[1]…
)
[extra_rules] => Array
(
)[extra_rules_top] => Array
(
[event/[^/]+/attachment/([^/]+)/?$] => index.php?attachment=$matches[1]
[event/[^/]+/attachment/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1
[event/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
[event/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
[event/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]
[event/([^/]+)/trackback/?$] => index.php?event=$matches[1]&tb=1
[event/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?event=$matches[1]&feed=$matches[2]
[event/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?event=$matches[1]&feed=$matches[2]
[event/([^/]+)/page/?([0-9]{1,})/?$] => index.php?event=$matches[1]&paged=$matches[2]
[event/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?event=$matches[1]&cpage=$matches[2]
[event/([^/]+)(/[0-9]+)?/?$] => index.php?event=$matches[1]&page=$matches[2]
[event/[^/]+/([^/]+)/?$] => index.php?attachment=$matches[1]
[event/[^/]+/([^/]+)/trackback/?$] => index.php?attachment=$matches[1]&tb=1
[event/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
[event/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?attachment=$matches[1]&feed=$matches[2]
[event/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$] => index.php?attachment=$matches[1]&cpage=$matches[2]
[event-type/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$] => index.php?event-type=$matches[1]&feed=$matches[2]
[event-type/([^/]+)/(feed|rdf|rss|rss2|atom)/?$] => index.php?event-type=$matches[1]&feed=$matches[2]
[event-type/([^/]+)/page/?([0-9]{1,})/?$] => index.php?event-type=$matches[1]&paged=$matches[2]
[event-type/([^/]+)/?$] => index.php?event-type=$matches[1]
)[non_wp_rules] => Array
(
)[extra_permastructs] => Array
([event] => Array
(
[0] => /event/%event%
[1] => 1
)[event-type] => Array
(
[0] => /event-type/%event-type%
[1] => 0
))
…
[rewritecode] => Array
(
[0] => %year%
[1] => %monthnum%
[2] => %day%
[3] => %hour%
[4] => %minute%
[5] => %second%
[6] => %postname%
[7] => %post_id%
[8] => %category%
[9] => %tag%
[10] => %author%
[11] => %pagename%
[12] => %search%
[13] => %eblast%
[14] => %event%
[15] => %event-type%
)…
[queryreplace] => Array
(
[0] => year=
[1] => monthnum=
[2] => day=
[3] => hour=
[4] => minute=
[5] => second=
[6] => name=
[7] => p=
[8] => category_name=
[9] => tag=
[10] => author_name=
[11] => pagename=
[12] => s=
[13] => eblast=
[14] => event=
[15] => event-type=
)…
)
- The topic ‘[Plugin: RSVPMaker] Need Help Diagnosing Permalink Problem Reports’ is closed to new replies.