Unable to edit pages. Firebug gives jsTree error

Unable to edit pages. Firebug gives jsTree error, a forum discussion on Jojo CMS. Join us for more discussions on Unable to edit pages. Firebug gives jsTree error on our Administration (backend and configuration) forum.

Back to Forum Index : Back to Administration (backend and configuration)   RSS
spiralux

29 Jun 2009
Posts: 4

Hi guys,
I started playing with JoJo a week or so ago. I firstly downloaded RC1 from the website, got that installed and working. I was having problems getting the slideshow and galleries working (they did not seem to be embedding in the pages as expected) so I decided to check out the SVN.

That installed OK, (apart from I had to disable PHP safe mode) however I do not get the page drop down (jsTree) on the left when editing pages and the HTML/BBCODE entry box is non-existent unless I toggle the HTML/BBCODE radio check buttons.

Firebug gives the following error :-
$.tree_create is not a function
http://localhost/testingserver/6DegreesArk/_www/admin/edit/page/1/
Line 196



It is possible to get at the pages from the admin home, where all the pages appear in the list.

I'm running Ubuntu 8.04 with PHP Version 5.2.4-2ubuntu5.6. I have tried it with and without google hosted javascript, it makes no difference.

The installation was fine with no errors (aside from the php safe mode).
I also installed it on my production server (SVN version) to ascertain whether the problem was local or not. The issue is exactly the same on my production server running CentOS4.something
and is running PHP 5.28

So far everything else is working well, I'm very impressed with the whole CMS system, well done guys. I particularly like the Gallery 3 plugin, vary impressive.

If anyone can provide some guidance, that would be great.
I've tried it from Firefox and also IE but the result is the same.

Thanks

John
tom

Developer

tom

29 Jun 2009
Posts: 379

it may just be an issue with an old cache (left over from the RC1 install - it didn't use jsTree) - can you delete the cache folder from your mysite folder, run setup (to reinstate it) and try admin again.

If you haven't got it already i highly recommend Charles as a debugging proxy to find out where the requests are going wrong: http://www.charlesproxy.com/

spiralux

29 Jun 2009
Posts: 4

Hi Tom,
Thanks for the quick reply.

I wasn't convinced about the cache issue for 2 reasons

1) the RC1 and SVN were installed in completely different web directories
2) Only the SVN was uploaded to the production server (RC1 was never installed there)

However, Charles was fantastic, and has revealed the problem, thanks

It appears when the request is made for the js.Tree files it's looking under _www/external/jsTree/sources...e.t.c. but the external directory is below the _www and the jsTree files did not appear to exist in the external directory. I have created the external directory tree under the _www and grabbed the jsTree files from the web and put them in, and bingo it works.
I realise that this is not ideal as they are now under the web root, and figure there is something amiss with the .htaccess file.

# Jojo .htaccess file.
# Version 1740
RewriteEngine On

RewriteBase /_www

# Catch all requests
RewriteRule ^$ index.php?uri= [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?uri=$1

I'm not entirely sure that the RewriteBase is correct.

this is the current web root

/var/www/vhosts/6degressark.com.au/httpdocs/_www

I realise that this may be contributing to the problem as the external directory is inside the webroot, however it seems to me that the jsTree files did not come down from the svn properly.

Just as a note that may help anyone else using Charles, I found it much easier to install and use on my XP Virtual Machine than under Ubuntu.

Thanks again for your help Tom, and if you have any guidance on what may be amiss with my .htaccess file I would be most grateful.

Kind Regards

John
tom

Developer

tom

29 Jun 2009
Posts: 379

can you try putting a trailing slash on the rewrite line?
I'm presuming the domain points to /var/www/vhosts/6degressark.com.au/httpdocs/ ?
spiralux

29 Jun 2009
Posts: 4

Hi Tom,
That did the trick, I added the trailing slash, renamed the external directory that I had put under the _www and tested OK. I then restarted the httpd service on the production server and tested again, it was still good :)

It still seems to me though that the jsTree directory is not in the external folder from the svn

I've just tried adding the trailing slash on my testing server, that hasn't made any difference, but there may be something else going on there, I'll look into it and post back if I find the solution.

But Yay, it's working on the production server, thanks again Tom.

Kind Regards

John
spiralux

29 Jun 2009
Posts: 4

Hi again Tom,

Jumped for joy too soon, when the same thing didn't make any difference on the testingserver (which has the normal directory structure) I tried it from a different browser and it was broken again.
I've put the external directory back under the _www and it is all good again.
I can work with it like that while I build the site and figure it all out later. I guess that once the site is built I can remove the external directory from the _www as it doesn't affect the cms too much.
I'm so impressed with the speed of your replies considering this is an open source project and am looking forward to playing with JoJo.

Regards

John
tom

Developer

tom

30 Jun 2009
Posts: 379

I've been having similar issues with the jsTree when developing test sites within domain folders (eg siteurl = domain.com/test). Production sites are no problem.

I suspect either jsTree or the Jojo admin templates are not implementing the base href properly (most probably by including an opening slash on the url), but I haven't had time to look at it properly yet.

and I had the same problem with jsTree not updating through svn, although it seemed ok when i tried it again last weekend.
Back to Forum Index : Back to Administration (backend and configuration)   RSS
You must be logged in to post a reply



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