rainlab/pages-plugin

Static menu does not mark menu item active correctly due to cache bug.

Closed this issue · 0 comments

  • OctoberCMS Build: 2.1.14
  • RainLab Pages Plugin Version: 1.4.9
  • PHP Version: 8

Description:

I just installed this plugin to my website and created 2 static pages. This works perfect. After I created 2 static pages i added a static menu to my partial to render a menu based on those 2 static pages. When i visit static page 1 the menu marks this menu item as active. When I navigate to the second page the static menu keeps stuck on marking static page 1 as active.

I think this is happening because the static menu gets cached.

Steps To Reproduce:

  1. Install static pages plugin
  2. Create two static pages.
  3. Create a static menu with 2 items reffering the two static pages as descriped above.
  4. Include the static menu in a layout or partial.
  5. Navigate to the first static page
  6. Navigate to the second static page

The first menu item (static page 1) keeps the class active while the second menu should be active.