Javascript problem

Javascript problem, a forum discussion on Jojo CMS. Join us for more discussions on Javascript problem on our Themes Support forum.

Back to Forum Index : Back to Themes Support   RSS
ayoub

27 Feb 2010
Posts: 39

Hi jojo cms team

I'm having the same problem as this post I don't understand.
http://www.jojocms.org/topics/379/how-to-customize-forms-globally/

Ive tried different methods (included js code in function.js or customhead.tpl and even head.tpl from core files) And force refresh (ctrl+F5) doesn't work also.

The javascript shows in view source but the page doesnt work.


when i go to http://localhost/css/mbTabset.css I can view file and images and everything but the page wont load properly (even the images are broken)

Ive been trying to solve this problem for 4 days desperatly

I ve attached a working html example and my plugin with theme

Thank you very much for all your help

Its jqueri User Interface plugin

Attached Files

ayoub

27 Feb 2010
Posts: 39

By the way I've put the body html in a new page...Is it because of this? Does it have to be a full plugin (with json folder,description file etc..) to work?
Harvey

Core Developer

Harvey

4 Mar 2010
Posts: 327

I have only had a quick look and noticed 2 issues so far which might be the problem.

In myplugin/js/functions.js there is an extra right brace "}" character at the end of the file.

In the same file, the function should be enclosed in a $(document).ready(); call as those tabsets don't exist in the HTML at the time when functions.js gets included in the page load. The code is probably running, but $("#tabset") isn't matching anything.

Try fixing these and see if that helps.
ayoub

5 Mar 2010
Posts: 39

It works! Thanks Harvey u really saved me on this one.
ayoub

5 Mar 2010
Posts: 39

I have noticed that when I force refresh the page while not connected to the internet breaks the site (and even admin section)
Safari says cant get the jquery file from google api
Is there a way to have jojo automatically use another jquery file the site hosts rather than the google one ( somewhere in the core files i guess)
I cant seem to visualize how a customhead.tpl file could work for both end user and admin section.
Rick Rick

5 Mar 2010
Posts: 336

Easiest way is to change the setting Options->Site->Google Hosted Javascript.

You could look at something like the onerror attribute, but there'd be little point for that code to get to your production server.
ayoub

6 Mar 2010
Posts: 39

There is something strange happening.
Now that I'm connected online, javascript works again but some sections in admin are broken:
- customize/options (menu appears but options wont show)
-configuration/edit fielddata (left drag n drop menu wont show)

I dunno if its still related to the jquery being loaded from the internet since all the rest seems to work properly.
ayoub

6 Mar 2010
Posts: 39

I've managed to change the google api lib from database directly and it worked.
But the admin section is still broken in some parts.
Ive tried many force refresh and even erase the cache folder but the problem persists

Was this referenced as a bug before?
Jaijaz Jaijaz

6 Mar 2010
Posts: 215

Trying running Setup, domain.com/setup

This might sound a little silly, but it has worked for me several times when this type of thing happens and the Crtl+F5 or Mac equiv Shift+Refresh doesn't work.
If you not living on the edge you taking up too much space.
ayoub

6 Mar 2010
Posts: 39

That didn't work. Even when google api option is on and i do domain/setup and force refresh the above parts are still broken.
Now even the page list is "edit pages" is broken.

I really don't understand this used to work perfectly fine before!

Pleeease help
tom

Developer

tom

7 Mar 2010
Posts: 379

Can you do some debugging and post the results? - Firebug and/or Charles should be able to show you what scripts are not loading or what errors they are returning.
The admin eventlog may also have some clues as to what is going wrong.
Jaijaz Jaijaz

7 Mar 2010
Posts: 215

After re-reading your earlier posts, you have some custom javascript code. That would be the area I would look at first. On several occasions I "broken" that admin section with code for the front-end.

If you use Firebug or Charlie as Tom suggests you should be able to find an error in the console and this should then be able to point you in the right direction for what is braking it.
If you not living on the edge you taking up too much space.
Harvey

Core Developer

Harvey

8 Mar 2010
Posts: 327

I had a similar issue recently where the left hand tree wouldn't show. I updated to the latest SVN copy of the 1.0 branch and this fixed the issue.
Rick Rick

8 Mar 2010
Posts: 336

The jsTree guys moved around all the files in their repo into folders such as "_stable".

Existing sites worked fine if they had the files cached under the old path but if it was a new site or the cache was cleared then the tree menu broke.
ayoub

11 Mar 2010
Posts: 39

After fresh install of jojo cms everything is back in order. I'm running the same javascript code in the frond end and it didnt break anything.
I installed and uninstalled a lot of plugins (always did domain/setup) so maybe that had something to do with it.
The firebug consoled mentioned the Jstree script but if everything works back to normal with the same rc2 files i downloaded 3 month ago, Im pretty sure the problem comes from those plugins i installed.

If that happens to anyone else clean up database and reinstall jojo cms. Your plugins and admin back end should work properly
Back to Forum Index : Back to Themes Support   RSS
You must be logged in to post a reply



You need to Register or Log In before posting on these forums.