Title: Undefined Index?
Last modified: August 30, 2016

---

# Undefined Index?

 *  Resolved [Andrew Rothman](https://wordpress.org/support/users/arothman/)
 * (@arothman)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/undefined-index-56/)
 * When I save my custom menu settings, I get a string of these:
 * Notice: Undefined index: menu-item-cpcm-item-count in C:\inetpub\site\wp-content\
   plugins\category-posts-in-custom-menu\category-posts-in-custom-menu.php on line
   366
 * Notice: Undefined index: menu-item-cpcm-item-skip in C:\inetpub\site\wp-content\
   plugins\category-posts-in-custom-menu\category-posts-in-custom-menu.php on line
   367
 * Notice: Undefined index: menu-item-cpcm-item-count in C:\inetpub\sites\wisbase\
   wp-content\plugins\category-posts-in-custom-menu\category-posts-in-custom-menu.
   php on line 366
 * Notice: Undefined index: menu-item-cpcm-item-skip in C:\inetpub\site\wp-content\
   plugins\category-posts-in-custom-menu\category-posts-in-custom-menu.php on line
   367
 * Notice: Undefined index: menu-item-cpcm-item-count in C:\inetpub\site\wp-content\
   plugins\category-posts-in-custom-menu\category-posts-in-custom-menu.php on line
   366
 * Notice: Undefined index: menu-item-cpcm-item-skip in C:\inetpub\site\wp-content\
   plugins\category-posts-in-custom-menu\category-posts-in-custom-menu.php on line
   367
 * Notice: Undefined index: menu-item-cpcm-item-count in C:\inetpub\site\wp-content\
   plugins\category-posts-in-custom-menu\category-posts-in-custom-menu.php on line
   366
 * Notice: Undefined index: menu-item-cpcm-item-skip in C:\inetpub\site\wp-content\
   plugins\category-posts-in-custom-menu\category-posts-in-custom-menu.php on line
   367
 * It doesn’t appear to affect function, but I was wondering if I should be concerned
   or if something needs to be altered?
 * [https://wordpress.org/plugins/category-posts-in-custom-menu/](https://wordpress.org/plugins/category-posts-in-custom-menu/)

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/undefined-index-56/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/undefined-index-56/page/2/?output_format=md)

 *  Plugin Author [Diana van de Laarschot](https://wordpress.org/support/users/anaid/)
 * (@anaid)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/undefined-index-56/#post-6265246)
 * Hi,
 * thanks for your message. I’m sorry to hear you’re getting errors.
 * Would you be able to narrow down which of the CPCM menu items causes this? Have
   you manually set values for count or skip?
 * Kind regards,
    Diana
 *  Thread Starter [Andrew Rothman](https://wordpress.org/support/users/arothman/)
 * (@arothman)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/undefined-index-56/#post-6265254)
 * Hi Diana,
 * The error appears when I click “Save Menu” on any menu. I don’t believe manual
   values for count or skip have been set, but I’m not sure – where would I look?
 *  Plugin Author [Diana van de Laarschot](https://wordpress.org/support/users/anaid/)
 * (@anaid)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/undefined-index-56/#post-6265257)
 * Hi,
 * I’m afraid I haven’t had this error before and cannot reproduce it so far.
    Since
   the same two errors occur 4 times, there could be up to 4 menu items that have
   the same issue.
 * To check the count and skip values, please review your settings for “Number of
   Posts” and “Skip Posts” for every item that has “Create submenu containing links
   to posts in this category.” checked. Do all of them have valid numeric values?
 * Since when are you experiencing this issue?
    Are you using other plugins and 
   could you disable them one by one to see if the issue persists? (Unlikely but
   possible nonetheless)
 * I hope I can help you help me narrow it down.. Thank you for your swift reply.
 * Kind regards,
    Diana
 *  Plugin Author [Diana van de Laarschot](https://wordpress.org/support/users/anaid/)
 * (@anaid)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/undefined-index-56/#post-6265258)
 * Ah, found it!
    The reason you are seeing this error and I am not, is because 
   you probably have
 * define(‘WP_DEBUG’, true);
 * defined in wp-config.php
    Set it to false to suppress this warning.
 * In the meantime, I’m obviously going to work to fix this.
    Thank you for reporting!
 * Kind regards,
    Diana
 *  Plugin Author [Diana van de Laarschot](https://wordpress.org/support/users/anaid/)
 * (@anaid)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/undefined-index-56/#post-6265259)
 * (Will be fixed in next release. Unfortunately this was too late for 1.1, will
   bring out 1.1.1 at a later time probably.)
 *  Thread Starter [Andrew Rothman](https://wordpress.org/support/users/arothman/)
 * (@arothman)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/undefined-index-56/#post-6265262)
 * Ah! I very likely do have the debugger enabled. Glad to help with the reporting
   and I’ll keep an eye out for the update whenever it should come.
 * Thanks for the great plugin!
 *  [JohnSeddon](https://wordpress.org/support/users/johnseddon/)
 * (@johnseddon)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/undefined-index-56/#post-6265419)
 * I am also getting this notice (with debug enabled)…
 * Undefined index: menu-item-cpcm-item-count in …wp-content/plugins/category-posts-
   in-custom-menu/category-posts-in-custom-menu.php on line 531
    Undefined index:
   menu-item-cpcm-item-skip in …wp-content/plugins/category-posts-in-custom-menu/
   category-posts-in-custom-menu.php on line 532
 * I have version 1.2.0 on WordPress 4.2.2
 *  Plugin Author [Diana van de Laarschot](https://wordpress.org/support/users/anaid/)
 * (@anaid)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/undefined-index-56/#post-6265420)
 * Hi John,
 * I’m sorry you’re experiencing this, I thought I had tackled this. I will look
   into it ASAP.
 * Kind regards,
    Diana
 *  [Philipp Bammes](https://wordpress.org/support/users/tyrannous/)
 * (@tyrannous)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/undefined-index-56/#post-6265424)
 * Hi Diana,
    I also get the error messages John sees. If it helps: I have the plugin“
   Ubermenu” ([http://wpmegamenu.com/](http://wpmegamenu.com/)) installed. But I
   get the errors on all menus, even on menus where Ubermenu isn’t active.
 * Hope that helps!
    Thank you
 *  Plugin Author [Diana van de Laarschot](https://wordpress.org/support/users/anaid/)
 * (@anaid)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/undefined-index-56/#post-6265426)
 * Hi John and tyarnn0us,
 * thank you for your messages. I’m afraid in my test environment I don’t see this
   problem at all. I’m guessing there’s some default parameter that isn’t being 
   set properly, but at first glance I don’t see where the problem is.
 * Which actions are you performing when you see this error? Editing the menu or
   viewing the website? (Both?)
 * Kind regards,
    Diana
 *  [Philipp Bammes](https://wordpress.org/support/users/tyrannous/)
 * (@tyrannous)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/undefined-index-56/#post-6265430)
 * Hi Diana,
    sorry for getting back to you so late. I get the following errors 
   in the backend ([http://xyz/wp-admin/nav-menus.php?action=edit&menu=xy](http://xyz/wp-admin/nav-menus.php?action=edit&menu=xy)):
   Notice: Undefined offset: 2935 in /var/www/vhosts/xyz/httpdocs/wp-content/plugins/
   category-posts-in-custom-menu/category-posts-in-custom-menu.php on line 531 Notice:
   Undefined offset: 2935 in /var/www/vhosts/xyz/httpdocs/wp-content/plugins/category-
   posts-in-custom-menu/category-posts-in-custom-menu.php on line 532
 * This happens when I save the menu even if I haven’t changed any settings.
 *  Plugin Author [Diana van de Laarschot](https://wordpress.org/support/users/anaid/)
 * (@anaid)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/undefined-index-56/#post-6265432)
 * Hi tyrann0us,
 * thank you for getting back to me on this. I can’t explain yet why this happens.
 * What I can tell you is that it pertains to the ‘count’ and ‘skip’ parameters 
   of a specific menu item. To be exact, menu item 2935 somehow does not receive
   a ‘count’ or ‘skip’ parameter when you save the menu.
 * Are you by any chance able to identify which menu item is 2935 and what the count
   and skip parameters are? (Identifying this ID is not always possible, but if 
   you are comfortable with inspecting HTML/CSS, if the menu item is still present
   in the menu it should have <li id=”menu-item-2935″ in HTML.) Another way would
   be to inspect the ‘count’ and ‘skip’ parameters manually in Appearances > Menus.
   These should not be letters or special symbols, only digits are allowed.
 * Anyway, I will look into it again next weekend. Now that I know it should be 
   seen in the backend when saving the menu, I hope I can reproduce this.
 * My apologies for this issue and my slow responses and thank you for getting back
   to me on this!
 * Kind regards,
    Diana
 *  [Philipp Bammes](https://wordpress.org/support/users/tyrannous/)
 * (@tyrannous)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/undefined-index-56/#post-6265433)
 * Hi Diana,
    thanks for getting back to me!
 * The menu in question consists out of several menu item like this:
 *     ```
       Page
       	Page
       	Page
       	Page
       	...
       Custom Taxonomy
       	Custom Taxonomy
       	Custom Taxonomy
       	...
       	Page
       	Page
       Custom Taxonomy
       	Custom Taxonomy
       	Custom Taxonomy
       	...
       	Page
       	Page
       Page
       	Page
       	Page
       Page
       	Page
       	Page
       ```
   
 * If that matters: I have the checkbox “Create submenu containing links to posts
   in this taxonomy.” checked for all “Custom Taxonomy” items.
 * Here’s what I see: For each “page” menu item I will get a PHP notice (my menu
   has 23 pages -> 46 PHP notices). The IDs also match the “page” menu item IDs.
   
   Since I get the notices only for pages there are no “count” and “skip” parameters
   I can inspect.
 * Hope this helps!
    tyrann0us
 *  Plugin Author [Diana van de Laarschot](https://wordpress.org/support/users/anaid/)
 * (@anaid)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/undefined-index-56/#post-6265434)
 * tyrann0us,
 * brilliant, I reproduced it thanks to your description. I’m on it 🙂
 * Kind regards,
    Diana
 *  Plugin Author [Diana van de Laarschot](https://wordpress.org/support/users/anaid/)
 * (@anaid)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/undefined-index-56/#post-6265435)
 * I think I’ve fixed it.
 * Is someone willing to try out the development version? It can be found on the
   Developers tab page under ‘Other Versions’
 * Kind regards,
    Diana

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/undefined-index-56/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/undefined-index-56/page/2/?output_format=md)

The topic ‘Undefined Index?’ is closed to new replies.

 * ![](https://ps.w.org/category-posts-in-custom-menu/assets/icon-128x128.png?rev
   =2539336)
 * [Category Posts in Custom Menu](https://wordpress.org/plugins/category-posts-in-custom-menu/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/category-posts-in-custom-menu/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/category-posts-in-custom-menu/)
 * [Active Topics](https://wordpress.org/support/plugin/category-posts-in-custom-menu/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/category-posts-in-custom-menu/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/category-posts-in-custom-menu/reviews/)

 * 17 replies
 * 4 participants
 * Last reply from: [Diana van de Laarschot](https://wordpress.org/support/users/anaid/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/undefined-index-56/page/2/#post-6265437)
 * Status: resolved