Forums

Uploadify Integration
Custom post types return 404 after installation (2 posts)

  1. petehobo
    Member
    Posted 4 months ago #

    I have a template with several custom post types. They all return 404 after install, because of the flush_rewrite_rules() call in Uploadify_Model_Posttype_File::registerType().

    To reproduce on a clean install:

    1. Install version 0.9.4 of the plugin (I'm using 0.9.4 because 0.9.5 doesn't work at all - see here).
    2. Add a theme with a functions.php containing

      add_action('init', 'create_listing_post_type');
      function create_listing_post_type() {
      register_post_type('listing', array(
      'labels' => array(
      'name' => 'Listings',
      'singular_name' => 'Listing',
      'add_new_item' => 'Add a listing',
      'edit_item' => 'Edit listing',
      'new_item' => 'Add a listing',
      'search_items' => 'Find a listing',
      'not_found' => 'No listing found',
      'not_found_in_trash' => 'No listing found in the trash'
      ),
      'public' => true,
      'supports' => array('title', 'editor')
      ));
      }

    3. Set permalink to have a custom structure of /%postname%/
    4. Create a listing, and click "View"

    The listing will not appear.

    Hoping the author can address.

    Workaround
    The listing will appear if the init call has a priority lower than the default, e.g.
    add_action('init', 'create_listing_post_type', 5);
    but I'm a little concerned there may be other side-effects of the flush_rewrite_rules() call.

    http://wordpress.org/extend/plugins/uploadify-integration/

  2. mikeleonardallen
    Member
    Posted 4 months ago #

    Thanks for pointing this out. I have removed the call to flush rewrite rules from the plugin, and added the missing files.

Reply

You must log in to post.

About this Plugin

About this Topic