YOOtheme Pro is here! The best WordPress and Joomla theme. Learn more

Avatar brandon.scivolette asked

UIkit Sticky Menu: Not Working Anymore

Yesterday I updated a handful of extensions, including Widgetkit to 2.9.11 and the Warp framework of the Bento theme. After I cleared the cache and tested the site I found I was getting a console error for the sticky menu: Uncaught TypeError: $.UIkit.sticky is not a function

My theme is configured so the main nav is sticky, and follows the user as they scroll the page. Is it possible that this function is broken by the most recent update of either WK or the theme framework?

  • Widgetkit
  • UIkit
  • Bento

6 Answers

2

Avatar sven.grossenbacher answered

Disable Widgetkit and see if the error is still showing. If the error disappears please follow my thread here. As we just came to the conclusion there is some conflict with Widgetkit and the support is investigating the problem.

Update

I found a solution

Change in your theme.js on line 44 or close to that:

$.UIkit.sticky($('.tm-navbar'), (function(){

to new

UIkit2.sticky($('.tm-navbar'), (function(){

Edited

1

Avatar brandon.scivolette answered

No solution yet. I've investigated and found similar reports, but not enough to suggest it is an issue with the template or Joomla itself. I've tried a number of possible solutions but none have resolved it. Unfortunately I don't know enough about jquery to troubleshoot further.

1

Avatar hendrik Yootheme answered

Hi,

this error could be caused by outdated custom widgets in your template folder.

Please check if you have created any custom widgets and update them with the following code in _widgetkit/widgets/custom_widget_name/plugin.php:

'init.site' => function($event, $app) {    
    $app['scripts']->add('uikit-grid', 'vendor/assets/uikit/js/components/grid.min.js', array('uikit2'));    
    $app['scripts']->add('uikit-grid-parallax', 'vendor/assets/uikit/js/components/grid-parallax.min.js', array('uikit2'));    
},

the scripts are now registered with the name 'uikit2'.

Regards

Edited

0

Avatar hendrik Yootheme answered

Hi,

the error is raised in the file 'media/plg_jchoptimize/assets2/jscss.php'
This is not the original source of UIkit in Widgetkit or the template. Is this some kind of plugin that tries to combine every asset of every plugin into one file?

It looks like this produces errors. Please deactivate this plugin and check if it solves the issue.

Regards

0

Avatar brandon.scivolette answered

You are correct about the plg_jchoptimize, it is a compression plugin. However, I did disable the plugin and clear the full cache and I still received the error, this time showing the uncombined/compressed folder. So it isn't the plugin that is causing the issue. The source of the errors are listed below.

/templates/yoo_bento/js/theme.js:20:17
/media/jui/js/jquery.min.js:3:12392
/media/jui/js/jquery.min.js:3:9156

0

Avatar roland.steiner answered

Hello .. I am getting the same errors. Did you find a solution for this, @hendrik?

Know someone who can answer? Share a link to this question via email or twitter.