Log1x / navi

A developer-friendly alternative to the WordPress NavWalker.
https://github.com/Log1x/navi
MIT License
316 stars 30 forks source link

Conflict with Polylang menu language switcher #11

Closed uixprt closed 4 years ago

uixprt commented 4 years ago

Hi. very helpful extension.

  1. when Polylang is activated as the main localization plugin which I preferred.
  2. after added polylang Language switcher to the primary navigation rendered by Navi -
  3. and checked the option Displays as a dropdown
  4. as a result the site crashed and get into an infinite loop and acquired a fatal error Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 1421312 bytes) in /var/www/html/wp-content/themes/prfwp/vendor/log1x/navi/src/Navi.php on line 97

Screenshot from 2019-12-10 18-15-03

by the way, in the documentation for Sage10 the line 102 on README.md {{ get_field('custom_nav_item_label', $child->object_id) ?: $child->label }} are contain get_field function that should not work without ACF...

Big Thx!

Log1x commented 4 years ago

I'll have to take a closer look at this later, but I'm not sure if it is fixable. Looking at Polylang's PLL_Frontend_Nav_Menu class – the way they are handling it is a little bizarre to me.

Edit: & I updated the README for the ACF example.

Log1x commented 4 years ago

I'm closing this as I don't believe there is a possible solution on my part. I'm sorry.