Title: [Plugin: Polylang] Undefined index Error
Last modified: August 20, 2016

---

# [Plugin: Polylang] Undefined index Error

 *  Resolved [tubak](https://wordpress.org/support/users/tubak/)
 * (@tubak)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-polylang-undefined-index-error/)
 * I inserted Language switcher widget in sidebar and it gives me the following 
   error:
    Notice: Undefined index: in \wp-content\plugins\polylang\include\core.
   php on line 527 [http://konferencija.psihologija.hr](http://konferencija.psihologija.hr)
 * I use 0.6.1 and Evento (ProEvento) theme.
 * [http://wordpress.org/extend/plugins/polylang/](http://wordpress.org/extend/plugins/polylang/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Chouby](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-polylang-undefined-index-error/#post-2522093)
 * If you go to Languages->Menus and click on save changes, does the Notice disappear?
 *  Thread Starter [tubak](https://wordpress.org/support/users/tubak/)
 * (@tubak)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-polylang-undefined-index-error/#post-2522095)
 * Unfortunatly not! I have set-up two languages, so I tried to create two different
   menus, and put for each language unique menu, and also I tried to put the same
   menu for each language, but the same error it’s always visible.
    And I have another
   question. I created a page called Dobrodoslica, and then translated into Wellcome,
   so now I have two different pages (ID) but both of those pages are in the main
   header menu! Shouldn’t there be only one link in the menu, or I have to create
   different main menu for each language? Thanks in advance.
 *  Plugin Author [Chouby](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-polylang-undefined-index-error/#post-2522101)
 * For the notice, I believe that I understood what happens. It should occur only
   when you setup a custom menu widget. Here is a quick fix which should solve the
   issue. Edit include/core.php and replace line 527:
 *     ```
       return $menu_lang[$args->theme_location]['switcher'] ?
       ```
   
 * by:
 *     ```
       return isset($menu_lang[$args->theme_location]['switcher']) && $menu_lang[$args->theme_location]['switcher'] ?
       ```
   
 * For the menu, I did not see any welcome entry… However you have to create one
   menu for each language and for each location. Then you assign menu to languages
   and lacations in the languages->menus admin panel.
 *  Thread Starter [tubak](https://wordpress.org/support/users/tubak/)
 * (@tubak)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-polylang-undefined-index-error/#post-2522115)
 * That did the trick! And thanks for the clearing things up regarding the menus!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘[Plugin: Polylang] Undefined index Error’ is closed to new replies.

 * ![](https://ps.w.org/polylang/assets/icon-256x256.png?rev=3433336)
 * [Polylang](https://wordpress.org/plugins/polylang/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/polylang/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/polylang/)
 * [Active Topics](https://wordpress.org/support/plugin/polylang/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/polylang/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/polylang/reviews/)

## Tags

 * [core php](https://wordpress.org/support/topic-tag/core-php/)
 * [undefined index](https://wordpress.org/support/topic-tag/undefined-index/)

 * 4 replies
 * 2 participants
 * Last reply from: [tubak](https://wordpress.org/support/users/tubak/)
 * Last activity: [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-polylang-undefined-index-error/#post-2522115)
 * Status: resolved