Possible Javascript/ jquery issue in 5.4.2.2 - Need help

Permalink
I just installed a clean concrete5 with the latest version on my server. Keep in mind that I have 10 other sites on this server with the older version which works perfectly fine!

So i started setup my site with the latest version and added my functions (Mainly advanced form and Deluxe gallery).

First I notice that the sitemap and file manager in the editor bar does not show a dialog (see screenshot).

Second, When i'm logged in everything works fine, the upload form on advanced form works and deluxe gallery shows in lightbox popup function which is perfekt! BUT when i logout and view the site as public visitor, non of the above work or show as it should?! (see screenshot).


The concrete5 was installed without any errors or issues.

How do i solve this matter?

Thanks
Jimmy

4 Attachments

 
Mainio replied on at Permalink Reply
Mainio
Hi,

Probably some of your javascript isn't loading properly. Is that site live already and can you post a link to it?

Sometimes it's because you don't have jQuery UI loaded when you're not logged in. If this is the case, just add the following as the first thing in your theme:
$html = Loader::helper('html');
$this->addHeaderItem($html->javascript('jquery.ui.js', 'CORE'));
$this->addHeaderItem($html->css('jquery.ui.css', 'CORE'));


You might also need some others but for more information, I'd really like to see some JavaScript errors that your site is popping up.

Br,
Antti / Mainio
jimmybj replied on at Permalink Reply
Seems strange, never needed to add before and not working either :/

Here is the location of the concrete5 installhttp://www.dincanvas.se/ram/

Thanks!
Jimmy
Mainio replied on at Permalink Reply
Mainio
I get these JavaScript errors on that page with Chrome:
Uncaught TypeError: Cannot read property 'dialog' of undefined
Uncaught TypeError: Object [object Object] has no method 'dialog'


The first one comes from:
http://www.dincanvas.se/ram/concrete/js/ccm.dialog.js


And the error states that
$.ui.dialog

is not set. This is probably because $.ui is undefined (I guess because it's not loaded).


So, my first post SHOULD do the trick. However, I noticed that jquery ui still isn't loaded on that page.

Have you tried to clear cache on that page to get jQuery UI loaded?

Br,
Antti
jimmybj replied on at Permalink Reply
I cleared the cache and no success.. I also installed concrete5 5.4.2.2 on a different server, and same result.. :s
Mainio replied on at Permalink Reply
Mainio
Hmm... Where did you exactly put the code I provided?

Just want to be sure about this.

Antti
jimmybj replied on at Permalink Reply
In the head tag
<?php  Loader::element('header_required'); ?>
<?php
$html = Loader::helper('html');
$this->addHeaderItem($html->javascript('jquery.ui.js', 'CORE'));
$this->addHeaderItem($html->css('jquery.ui.css', 'CORE'));
?>
Mainio replied on at Permalink Reply
Mainio
Ok, put it BEFORE that, so you'd have:
<?php
$html = Loader::helper('html');
$this->addHeaderItem($html->javascript('jquery.ui.js', 'CORE'));
$this->addHeaderItem($html->css('jquery.ui.css', 'CORE'));
?>
<?php  Loader::element('header_required'); ?>
jimmybj replied on at Permalink Reply
Ah, that did the trick! Thanks alot! :)
2excelprogrammer replied on at Permalink Reply
Thanks man its work for me..
2excelprogrammer replied on at Permalink Reply
Thank man its work for me..
Great Work
jordanlev replied on at Permalink Reply
jordanlev
The issue with the sitemap and file manager links in the toolbar is due to a bug in 5.4.2.2:
http://www.concrete5.org/developers/bugs/5-4-2-2/sitemap-and-file-m...