Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
WP Custom Menu broken after installing beta
Avatar
kailas
Member
Free Members
sp_UserOfflineSmall Offline
Feb 1, 2012 - 4:14 am

Installed the beta in my dev sandbox. Installed cleanly and I stepped through all the configuration settings to check it out. So far so good. - then I went to the menu item "Forum" which took me to the Forum page. My menu (standard wp custom menu) was broken - only on the Forum page. The rest of the site is fine. So there must be some conflict.

 

The dropdown menu styling and javascript-driven action has been broken, and now the list of menu items is written out w/out any style in unordered lists across the top of my page. See attachment.

 

I presumed this could have been a CSS reset, or some Javascript conflict. I don't use any of my own or any plugins for these menus. They are wp default.

 

Please take a quick look. I will keep these links active as examples. Main site URL: http://wordpress.shreemaa.org shows the menus working fine. However, the Online Satsang menu -> Forum (http://wordpress.shreemaa.org/forum) shows the menus in their broken state.

 

Also attached are two JPEGs to illustrate.

Peace,

Kailas

Avatar
kailas
Member
Free Members
sp_UserOfflineSmall Offline
Feb 1, 2012 - 4:18 am

Tried uploading two jpegs but they exceeded the max allowed size. They were only 800px wide and about 80kb each. Can you increase your allowed size for screenshot examples?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Feb 1, 2012 - 5:09 am

Let me first say that why this is just showing up on the forum page is, I think, just a matter of chance as it is dependent upon what scripts are used on each page. Basically your site is throwing script errors (all pages) and you have some scripts that are being loaded twice and many that are not being loaded correctly via the WP api. This is just a matter of bad coding.

The ones I can find are:

Actual Errors being thrown:

wp-ui.js - (plugin) this is throwing a jquery error. it is also being loaded with a malformed path which may be part of the problem. This error appears on every page.

app.js - (theme) uses a '$' to run jQuery. This is not the way to call jQuery when using WordPress.

Bad/Double Loads:

jquery-ui.min.js - (?) This is being (a) loaded from the google cdn. It should be loaded from the supplied version with WordPress. (b) It does not use the WP API to load it so this reults in a second copy also being loaded. There is also the risk of these being differemt versions. I have no idea what is loading this.

swfobject.js - (plugins I think): You have two copies being loaded - one from the WP repository and one from a plugin called 'video-embed-thumbnail-generator'.  The second is being loaded from the wrong place and at least one of them, maybe both, is not loading via the WP API or there would not be two copies.

jquery-orbit-1.3.0.min.js - (theme and wp-orbit-slider plugin) Two copies being loaded which again means at least one, maybe both, is not using the WP api to load scripts.

If this were me I would be making a fuss with the theme and plugin authors. But that's because it would help all other authors and end-users if people coded their work correctly.

andy-signature.png
YELLOW
SWORDFISH
Avatar
kailas
Member
Free Members
sp_UserOfflineSmall Offline
Feb 1, 2012 - 6:13 pm

Thank you for taking a look. I cleaned up all the plugin related .js issues, and found the problem. The theme uses the Foundation.css from Zurb, which animates the navbars from app.js.

The issue you mention:

app.js – (theme) uses a '$' to run jQuery. This is not the way to call jQuery when using WordPress.

Is the source of the problem because I renamed that file, and then all the navbars across my site showed the same error as on the Forum page.

I would be grateful to know what you suggest.

Kailas

Avatar
kailas
Member
Free Members
sp_UserOfflineSmall Offline
Feb 1, 2012 - 6:23 pm

It's just these two lines in app.js that are making the menubar error out on the Forum page.

 

    $('.nav-bar li').has('ul').addClass("has-flyout");
    $('.nav-bar li ul').addClass("flyout");

 

I don't know enough about jQuery to guess why it's conflicting.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 1, 2012 - 7:01 pm

I still see many errors:

"NetworkError: 404 Not Found - http://wordpress.shreemaa.org/.....ndation.js"
"NetworkError: 404 Not Found - http://wordpress.shreemaa.org/.....t-1.3.0.js"
"NetworkError: 404 Not Found - http://wordpress.shreemaa.org/.....pts/app.js"

those errors appear to be preventing other js from completing...

Avatar
kailas
Member
Free Members
sp_UserOfflineSmall Offline
Feb 1, 2012 - 7:13 pm

Topic can be closed. The developer of Foundation told me to add jQuery instead of $

 

jQuery('.nav-bar li').has('ul').addClass("has-flyout"); jQuery('.nav-bar li ul').addClass("flyout"); So I did a search and replace on all the $ and the entire script runs w/no conflict. Now... I can test my Simple-Press Fourm! Kailas
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 1, 2012 - 7:35 pm

yes.  standard for wp...  did we not say that earlier?  sorry, doesnt look like we were explicit...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 617
Members: 17359
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10125
Posts: 79620