WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Unable to Add New Post (Custom Post Types) (14 posts)

  1. UaMV
    Member
    Posted 1 year ago #

    i am attempting to set up our site using the 3.5 Beta of WordPress and the a child of the Twenty Twelve theme. i have encountered issues when attempting to add new posts of a custom post type. i am using the following plugins with Role Scoper ... QuotePress, Resume Submission & Job Postings, and FAQ Manager.

    When Role Scoper is activated, i get the 'Cheatin uh?' error when attempting to 'Add New' to RSJP or FAQ. QuotePress works fine.

    When Role Scoper is de-activated, all work fine.

    Also, all work fine with Role Scoper in WP 3.4.2.

    Any thoughts? Thanks!

  2. UaMV
    Member
    Posted 1 year ago #

    i found that if i change

    'capability_type' => 'post'

    to

    'capability_type' => 'page'

    in the definition of the custom post types for RSJP and FAQ, then i am allowed to add new posts. Thus, something has an issue with this definition when using WP 3.5 Beta ... either Role Scoper or the beta install itself.

  3. Andrew Nacin
    Lead Developer
    Posted 1 year ago #

    You mention you are using "3.5 Beta." Could you try 3.5 RC2?

    http://wordpress.org/news/2012/11/wordpress-3-5-release-candidate-2/

  4. UaMV
    Member
    Posted 1 year ago #

    My apologies ... i am using 3.5 RC2.

  5. Andrew Nacin
    Lead Developer
    Posted 1 year ago #

    What Role Scoper settings are you using?

  6. Andrew Nacin
    Lead Developer
    Posted 1 year ago #

    And what are the entire register_post_type() calls for the affected post types?

  7. UaMV
    Member
    Posted 1 year ago #

    Argh ... i was mistaken again. i was only on RC1. However, now with RC2, there are additional problems. i can't get it working even when making the above cap_type change. Also, the admin menu items are not even visible for adding new posts of this type. And, now the issue is also affecting QuotePress.

    i am using the default Role Scoper settings. i am thinking it must be something in either 3.5RC2 or Role Scoper. Most likely 3.5RC2, as QuotePress was unaffected in RC1.

    Here is one of the calls ...

    $faqopts	= get_option('faq_options');
    		$single		= (isset($faqopts['single'])	? sanitize_title($faqopts['single'])	: 'question'	);
    		$arch		= (isset($faqopts['arch'])		? sanitize_title($faqopts['arch'])		: 'questions'	);
    
    		register_post_type( 'question',
    			array(
    				'labels'	=> array(
    					'name' 					=> __( 'FAQs', 'wpfaq' ),
    					'singular_name' 		=> __( 'FAQ', 'wpfaq' ),
    					'add_new'				=> __( 'Add New FAQ', 'wpfaq' ),
    					'add_new_item'			=> __( 'Add New FAQ', 'wpfaq' ),
    					'edit'					=> __( 'Edit', 'wpfaq' ),
    					'edit_item'				=> __( 'Edit FAQ', 'wpfaq' ),
    					'new_item'				=> __( 'New FAQ', 'wpfaq' ),
    					'view'					=> __( 'View FAQ', 'wpfaq' ),
    					'view_item'				=> __( 'View FAQ', 'wpfaq' ),
    					'search_items'			=> __( 'Search FAQ', 'wpfaq' ),
    					'not_found'				=> __( 'No FAQs found', 'wpfaq' ),
    					'not_found_in_trash'	=> __( 'No FAQs found in Trash', 'wpfaq' ),
    				),
    				'public'	=> true,
    					'show_in_nav_menus'		=> true,
    					'show_ui'				=> true,
    					'publicly_queryable'	=> true,
    					'exclude_from_search'	=> false,
    				'hierarchical'		=> false,
    				'menu_position'		=> 20,
    				'capability_type'	=> 'page',
    				'menu_icon'			=> plugins_url( '/inc/img/faq_menu.png', __FILE__ ),
    				'query_var'			=> true,
    				'rewrite'			=> array( 'slug' => $single, 'with_front' => false ),
    				'has_archive'		=> $arch,
    				'supports'			=> array('title', 'editor', 'author', 'thumbnail', 'comments', 'custom-fields'),
    			)
    		);

    Thanks for your work in prepping this new release. It is much appreciated!

  8. UaMV
    Member
    Posted 1 year ago #

    I have also just created a custom post type with 'Custom Post Type UI' plugin, and encounter the same issue with this type.

  9. UaMV
    Member
    Posted 1 year ago #

    Actually, the issue is probably most likely with Role Scoper, as when it is deactivated, all works fine.

  10. Tagging this for Role Scoper, and emailing the info. This is big enough he oughta know.

    http://wordpress.org/extend/plugins/role-scoper/

  11. UaMV
    Member
    Posted 1 year ago #

    Thanks. i had started a thread in his support forum both here and at agapetry.net, referencing this thread. Wasn't aware plugin developers will be notified if their plugin url is tagged. Is that how tagging works? Good to know.

  12. kevinB
    Member
    Posted 1 year ago #

    Thanks for the notification. The custom post type creation / editing conflict is fixed in the updated Role Scoper development version. I plan to roll out these changes in 1.3.58 before the WP 3.5 release (after further 3.5 compatibility testing)

  13. UaMV
    Member
    Posted 1 year ago #

    Beautiful! Seems to be working fine. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic