WordPress.org

Ready to get started?Download WordPress

Forums

Custom Post Type UI
CPT UI 0.8 Reported issues (9 posts)

  1. Michael Beckwith
    Member
    Plugin Author

    Posted 1 year ago #

    All that are listed are noted by plugin authors and will be fixed on the next point release.

    Error logs that won't hinder your usage of the plugin:

    PHP Notice: Undefined index: rewrite_withfront in C:\wamp\www\wordpress\wp-content\plugins\custom-post-type-ui\custom-post-type-ui.php on line 94

    PHP Notice: Undefined index: menu_icon in /**webroot**/WordPress/wp-content/plugins/custom-post-type-ui/custom-post-type-ui.php on line 637

    http://wordpress.org/extend/plugins/custom-post-type-ui/

  2. Michael Beckwith
    Member
    Plugin Author

    Posted 1 year ago #

    If you are hoping to get rid of recently reported php notices about undefined indexes, please feel free to grab the latest copy at GitHub.

    NOTE: before uploading the zip, you'll want to rename the folder to just "custom-post-type-ui" and remove the appended "-master".

    Zip file for those not Git savy:
    https://github.com/WebDevStudios/custom-post-type-ui/archive/master.zip

    Repo url if you are:
    https://github.com/WebDevStudios/custom-post-type-ui

  3. bigtimebuddy
    Member
    Posted 1 year ago #

    I updated from the GitHub master, but still producing PHP notices.

    These are produced when clicking "Edit" on an existing type from the Manage Post Types page
    Notice: Undefined index: rewrite_withfront in {root}/wp-content/plugins/custom-post-type-ui/custom-post-type-ui.php on line 1010

    Notice: Undefined index: menu_icon in {root}/wp-content/plugins/custom-post-type-ui/custom-post-type-ui.php on line 1014

    These are produced when clicking "Get Code" on an existing type from the Manage Post Types page
    Notice: Undefined index: menu_icon in {root}/wp-content/plugins/custom-post-type-ui/custom-post-type-ui.php on line 640

    Notice: Undefined index: rewrite_withfront in {root}/wp-content/plugins/custom-post-type-ui/custom-post-type-ui.php on line 699

    Notice: Undefined index: menu_icon in {root}/plugins/custom-post-type-ui/custom-post-type-ui.php on line 718

  4. raphaelsramos
    Member
    Posted 1 year ago #

    I'm having problems with the permalink.

    I've created a CPT called events, and when i call /events/event-name/, it show 404 error, but if i call /events/event-name/?post_type=events, it works.

    Using de Rewrite Analyzer Plugin, i don't find the /events/ pattern for url rewrite.

    i've try to use this, but doesn't work:

    function events_rewrite_rules( $rules ){
    $newrules = array();
    $newrules['(events)/(.*)$'] = 'index.php?events=$matches[1]';
    return $newrules + $rules;
    }
    add_filter( 'rewrite_rules_array','events_rewrite_rules' );

    i've activated the 'archive' functionality, but doesn't work too.

    How to proceed???

  5. raphaelsramos
    Member
    Posted 1 year ago #

    Just to validate, i've created another CPT and the same error was ocurring.

    I've already disabled all the others plugins, and still get the error.

  6. Brad Williams
    Member
    Plugin Author

    Posted 1 year ago #

    Have you enabled pretty permalinks under Settings > Permalinks? It sounds like that is your issue.

  7. raphaelsramos
    Member
    Posted 1 year ago #

    Yes, permalinks is set as /%postname%/

    I've installed the 0.8.1 preview version and nothing. Remove it and re-install de 0.7.2 version, and nothing...

    i've tried add de CPT via code, using register_post_type, but it doesn't work to.

    the var_dump of the $wp_rewrites:

    [Moderator note - Please repost that to a pastebin - http://codex.wordpress.org/Forum_Welcome#Posting_Code ]

  8. klode
    Member
    Posted 1 year ago #

    For the error on line 94, I've substitute the code:

    $cpt_rewrite_withfront = ( !$cpt_post_type["rewrite_withfront"] ) ? esc_html($cpt_post_type["rewrite_withfront"]) : true;

    with the code:

    $cpt_rewrite_withfront = !empty($cpt_post_type["rewrite_withfront"]) ? esc_html($cpt_post_type["rewrite_withfront"]) : true;

    This would be apply to all elements in the block code where this one is present, in order to keep any other errors like this.

  9. pixelnate
    Member
    Posted 5 months ago #

    Just wanted to chime in here as one of the people that the git repo helped. Thanks.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.