OliveStudio / olivemenus

A powerful menus plugin for Craft CMS built for the need of simplicity and flexibility
MIT License
40 stars 22 forks source link

active menu item check not working for live environment #48

Closed NKimenai closed 4 years ago

NKimenai commented 4 years ago

So for local development the menu works fine but when i go to my live environment this check does not work.

What i am doing now to quick fix it for myself is going to: vendor/olivestudio/craft-olivemenus/src/services/OlivemenusService.php

Then i have to change: $menu_item_url_filtered = preg_replace('#^https?://#', '', $menu_item_url); to: $menu_item_url_filtered = 'www.'.preg_replace('#^https?://#', '', $menu_item_url);

I need to add the string 'www' everytime for the menu items to get the active class on a live environment.

Is there something i'm doing wrong, a setting i skipped or is this a bug?

MitchBred commented 4 years ago

@NKimenai delete the vendor directory and do composer install, maybe it helps?

NKimenai commented 4 years ago

@MitchBred The builder we use makes a fresh install including composer. Also tried removing the folder but I think it might be a flaw in the code of the plugin. The point where there is a check in the url's as I mentioned above