ioMenuPlugin icon indicating copy to clipboard operation
ioMenuPlugin copied to clipboard

isCurrent method is buggy with https

Open dator-zz opened this issue 14 years ago • 1 comments

Hi :)

I have my domain in https and since i put the ssl, the isCurrent method of ioMenuItem seems buggy.

In the code you have

$url = $this->getCurrentUri();
$menuUrl = $this->getUri(array('absolute' => true));

In my context :

$menuUrl = "http://domain.com/ad" and $url = "http://domain.com:443/ad"

When the isCurrent method do the comparison, $menuUrl and $url are not equal.

Do you have an idea how to fix that ? :)

Thanks a lot !

dator-zz avatar Oct 03 '11 08:10 dator-zz

Hey Clément!

So, the "is current" functionality for this plugin is basically "good" but not perfect. So, if it's not working for you (and this looks legit), my recommendation would be to subclass ioMenuItem and override getCurrentUri, Inside your method, you can normalize however you need - add the port etc.

This is probably the best way to go - you'll have full control of your situation. Let me know if that works!

Thanks!

weaverryan avatar Oct 03 '11 14:10 weaverryan