[Plugin: Breadcrumb NavXT] Too few arguments for sprintf()
-
It seems strange but I get the error when setting up custom post types and custom taxonomies. To create those i use Custom Post Type UI plugin (http://ww.wp.xz.cn/extend/plugins/custom-post-type-ui/)
When I click a custom taxonomy “tab” in the settings page – the error is this:
Warning: sprintf() [function.sprintf]: Too few arguments in path\to\plugins\breadcrumb-navxt\breadcrumb_navxt_admin.php on line 508
When I click a custom post-type “tab” – such error is on line 443.
P.s. I have used your plugin with Custom Post Type UI plugin before – and it worked really well. In fact – even in this very project it used to work OK, I managed to set up custom post-type trails… but not the custom taxonomy. And I can’t even tell you exactly WHEN (or after what) it started to give me such an error.
-
Well, looking at that line (508), it looks like the labels for the custom taxonomy may be missing. Either this is an issue with the main label being blank, or you do not have a singular name for the custom taxonomy. The line 443 error points to a missing singular name for the custom taxonomy.
Thank you for a prompt reply, mtekk. Today I have some more information.
Alas, but it looks nothing like a missing label 🙁 Because I added all of them, changed and resaved the post-types and taxonomies… what is more – is that I get this warning when clicking other tabs that utilize custom post-type functionality. I use Advanced Custom Fields (http://ww.wp.xz.cn/extend/plugins/advanced-custom-fields/) and Contact Form 7 (http://ww.wp.xz.cn/extend/plugins/contact-form-7/). Their “tabs” get the same error on the same line.
I do have a further remark though. It’s all happening on my local WAMP installation – whereas online (on one of my previous projects) it’s working OK and doesn’t show any Warnings (everywhere, be it ACF, CF7 or Custom Post Type UI). Would you say it is somehow related? I haven’t uploaded this current project online to check it yet
Can you try adding
var_dump($post_type)before line 443 on the site with the issue andvar_dump($taxonomy)before line 508 on the site with the issue? After looking at this more, I think there may be a few different things here that could cause an issue, but I’m not positive which is causing it. In the next release some things are going to be cleaned up in that area.Goodness this is really long)) This is a site in Russian, so the labels are Cyrillic.
This is the
var_dump($post_type);:
object(stdClass)[4069]
public 'labels' =>
object(stdClass)[4071]
public 'name' => string 'Новости' (length=14)
public 'singular_name' => string 'Новость' (length=14)
public 'add_new' => string 'Добавить новость' (length=31)
public 'add_new_item' => string 'Добавить новую новость' (length=42)
public 'edit_item' => string 'Редактировать новость' (length=41)
public 'new_item' => string 'Новая новость' (length=25)
public 'view_item' => string 'Посмотреть новость' (length=35)
public 'search_items' => string 'Искать новости' (length=27)
public 'not_found' => string 'Новости не найдены' (length=34)
public 'not_found_in_trash' => string 'Новостей в корзине не найдено' (length=54)
public 'parent_item_colon' => null
public 'all_items' => string 'Новости' (length=14)
public 'menu_name' => string 'Новости' (length=14)
public 'edit' => string 'Редактировать' (length=26)
public 'view' => string 'Посмотреть' (length=20)
public 'parent' => string 'Родительская новость' (length=39)
public 'name_admin_bar' => string 'Новость' (length=14)
public 'description' => string '' (length=0)
public 'publicly_queryable' => boolean true
public 'exclude_from_search' => boolean false
public 'capability_type' => string 'post' (length=4)
public 'map_meta_cap' => boolean true
public '_builtin' => boolean false
public '_edit_link' => string 'post.php?post=%d' (length=16)
public 'hierarchical' => boolean false
public 'public' => boolean true
public 'rewrite' =>
array
'slug' => string 'news' (length=4)
'with_front' => boolean true
'pages' => boolean true
'feeds' => boolean false
'ep_mask' => int 1
public 'has_archive' => boolean false
public 'query_var' => string 'news' (length=4)
public 'register_meta_box_cb' => null
public 'taxonomies' =>
array
empty
public 'show_ui' => boolean true
public 'menu_position' => null
public 'menu_icon' => null
public 'can_export' => boolean true
public 'show_in_nav_menus' => boolean true
public 'show_in_menu' => boolean true
public 'show_in_admin_bar' => boolean true
public 'delete_with_user' => null
public 'label' => string 'Новости' (length=14)
public 'singular_label' => string 'Новость' (length=14)
public 'name' => string 'news' (length=4)
public 'cap' =>
object(stdClass)[4070]
public 'edit_post' => string 'edit_post' (length=9)
public 'read_post' => string 'read_post' (length=9)
public 'delete_post' => string 'delete_post' (length=11)
public 'edit_posts' => string 'edit_posts' (length=10)
public 'edit_others_posts' => string 'edit_others_posts' (length=17)
public 'publish_posts' => string 'publish_posts' (length=13)
public 'read_private_posts' => string 'read_private_posts' (length=18)
public 'read' => string 'read' (length=4)
public 'delete_posts' => string 'delete_posts' (length=12)
public 'delete_private_posts' => string 'delete_private_posts' (length=20)
public 'delete_published_posts' => string 'delete_published_posts' (length=22)
public 'delete_others_posts' => string 'delete_others_posts' (length=19)
public 'edit_private_posts' => string 'edit_private_posts' (length=18)
public 'edit_published_posts' => string 'edit_published_posts' (length=20)
And this is
var_dump($taxonomy);:
object(stdClass)[155]
public 'hierarchical' => boolean true
public 'update_count_callback' => string '' (length=0)
public 'rewrite' =>
array
'slug' => string 'product_type' (length=12)
'with_front' => boolean true
'hierarchical' => boolean false
'ep_mask' => int 0
public 'query_var' => string 'product_type' (length=12)
public 'public' => boolean true
public 'show_ui' => boolean true
public 'show_tagcloud' => boolean true
public '_builtin' => boolean false
public 'labels' =>
object(stdClass)[157]
public 'name' => string 'Категории' (length=18)
public 'singular_name' => string 'Категория' (length=18)
public 'search_items' => string 'Искать категории' (length=31)
public 'popular_items' => string 'Популярные категории' (length=39)
public 'all_items' => string 'Все категории' (length=25)
public 'parent_item' => string 'Родительская категория' (length=43)
public 'parent_item_colon' => string 'Родительская категория:' (length=44)
public 'edit_item' => string 'Редактировать категорию' (length=45)
public 'view_item' => string 'Просмотреть рубрику' (length=37)
public 'update_item' => string 'Обновить категорию' (length=35)
public 'add_new_item' => string 'Добавить новую категорию' (length=46)
public 'new_item_name' => string 'Новая категория' (length=29)
public 'separate_items_with_commas' => string 'Отделяйте категории запятыми' (length=54)
public 'add_or_remove_items' => string 'Добавить или удалить категории' (length=57)
public 'choose_from_most_used' => string 'Выберите из часто используемых' (length=57)
public 'menu_name' => string 'Категории' (length=18)
public 'name_admin_bar' => string 'Категория' (length=18)
public 'show_in_nav_menus' => boolean true
public 'label' => string 'Категории' (length=18)
public 'singular_label' => string 'Категория' (length=18)
public 'cap' =>
object(stdClass)[156]
public 'manage_terms' => string 'manage_categories' (length=17)
public 'edit_terms' => string 'manage_categories' (length=17)
public 'delete_terms' => string 'manage_categories' (length=17)
public 'assign_terms' => string 'edit_posts' (length=10)
public 'name' => string 'product_type' (length=12)
public 'object_type' =>
array
0 => string 'products' (length=8)
Thanks for that, hopefully later this week I’ll be able to confirm using that data that my fix works.
The topic ‘[Plugin: Breadcrumb NavXT] Too few arguments for sprintf()’ is closed to new replies.