# Routing and Plugin error

**URL:** <https://discourse.cakephp.org/t/routing-and-plugin-error/7933>\
**Category:** Need Help\
**Created:** [June 11, 2020, 5:39pm UTC](https://discourse.cakephp.org/t/routing-and-plugin-error/7933 "2020-06-11T17:39:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![6120](https://avatars.discourse-cdn.com/v4/letter/6/278dde/32.png) [@6120](https://discourse.cakephp.org/u/6120)\
**Post date:** [June 11, 2020, 5:39pm UTC](https://discourse.cakephp.org/t/routing-and-plugin-error/7933/1 "2020-06-11T17:39:50Z")

</div>

I have a plugin named “medias”.  
It works fine and is not the heart of the problem.  
I have an admin menu with various links to articles, categories, tags and (plugin) medias etc.  
Link to “medias” is :  
\<?= $this-\>Html-\>link(\_\_('Medias Manager'), ['plugin' =\> 'Medias', 'controller' =\> 'Dossiers', 'action' =\> 'home']) ?\>  
When my current session expires, if I click the medias link, I am redirected to :  
/medias/users/login?redirect=%2Fmedias  
but it should be :  
/users/login?redirect=%2Fmedias

This menu worked perfectly in 3.3.  
I am trying to update to 3.8 and came across this problem.

---

<div class="post-metadata">

**Author:** ![Zuluru](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/zuluru/32/1230_2.png) [@Zuluru](https://discourse.cakephp.org/u/Zuluru)\
**Post date:** [June 11, 2020, 6:37pm UTC](https://discourse.cakephp.org/t/routing-and-plugin-error/7933/2 "2020-06-11T18:37:37Z")

</div>

Wherever you’re declaring the login link to be used for unauthenticated access, add `'plugin' => false`. If you’re building menus anywhere, you may need to do the same with all of those links.

---

<div class="post-metadata">

**Author:** ![6120](https://avatars.discourse-cdn.com/v4/letter/6/278dde/32.png) [@6120](https://discourse.cakephp.org/u/6120)\
**Post date:** [June 12, 2020, 4:40am UTC](https://discourse.cakephp.org/t/routing-and-plugin-error/7933/3 "2020-06-12T04:40:04Z")

</div>

Thank you for not sleeping any time 🙂
