Title: &#039;Alternative&#039; Shortcode Bug
Last modified: August 24, 2016

---

# 'Alternative' Shortcode Bug

 *  Resolved [corrideat](https://wordpress.org/support/users/corrideat/)
 * (@corrideat)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/alternative-shortcode-bug/)
 * Hello,
 * I believe I’ve found a bug in your plugin when using a shortcode and an alternative.
   Your code never actually uses the “content” of the shortcode and a warning is
   issued.
 * So, [cmwizard …]THIS IS NEVER USED[/cmwizard].
 * I believe I’ve been able to solve it (at least insofar as I got it to work, you
   may be more knowledgeable of how to fix it properly.)
 * Both the warning an the fix occur at custom-menu-wizard.php at line 804. The 
   warning is about an undefined index when you call apply_filters( ‘custom_menu_wizard_sanitize_alternative’,
   $instance[‘switch_to’] );
 * The fix was to replace $instance[‘switch_to’] by $content. So you get:
    $instance[‘
   switch_to’] = apply_filters( ‘custom_menu_wizard_sanitize_alternative’, $content);
 * I’d appreciate it if you could fix this with the next update.
 * Thanks for your help and for building this great plugin!
 * [https://wordpress.org/plugins/custom-menu-wizard/](https://wordpress.org/plugins/custom-menu-wizard/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [wizzud](https://wordpress.org/support/users/wizzud/)
 * (@wizzud)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/alternative-shortcode-bug/#post-5966459)
 * Thanks for the heads up.
    Just released v3.1.4 which fixes this bug and another
   one, also related to shortcode processing of an Alternative. Apologies for the
   inconvenience, and thank you for your investigation and feedback: it’s appreciated.

Viewing 1 replies (of 1 total)

The topic ‘'Alternative' Shortcode Bug’ is closed to new replies.

 * ![](https://ps.w.org/custom-menu-wizard/assets/icon-256x256.png?rev=1381901)
 * [Custom Menu Wizard Widget](https://wordpress.org/plugins/custom-menu-wizard/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-menu-wizard/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-menu-wizard/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-menu-wizard/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-menu-wizard/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-menu-wizard/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [wizzud](https://wordpress.org/support/users/wizzud/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/alternative-shortcode-bug/#post-5966459)
 * Status: resolved