On 03/24/2011 11:51 AM, Vincenzo Brancato wrote:
Hi Xwiki users,
we are using Xwiki in our Intranet and I have a problem with the Navigation Panel. I've dragged and dropped the Navigation Panel from the Panel Wizard to the left Panel of my site. After that I edited the Panel to my satisfaction. By the way I am using the Default Skin with "Nature" Color Theme. Now to my problem. If you edit the content of the Navigation Panel you will also find the following code:
$xwiki.jsfx.use('js/scriptaculous/scriptaculous.js') $xwiki.jsfx.use('js/xwiki/accordion/accordion.js') <script type="text/javascript"> document.observe('xwiki:dom:loaded', function() { var obj = {div:'xwikinav', no:$spacecount, height:250}; var acc = createAccordion(obj); }); </script>
I think the "document.observe" function expands/collapses the Navigation Fields. This function is also used to expand the Panel Wizard Fields where you can drag and drop the panels in the Wiki administration. I was able to expand the fields wit Firefox 3.6.x and Internet Explorer 8.
Yesterday I updated Firefox to version 4 and Internet Explorer to version 9. If I am viewing the site with Firefox 4 the fields remain collapsed/closed and I can't open them. So I can't use the Navigation Panel. Same problem with the Panel Wizard in wiki administration. With Internet Explorer 9 and Opera 11 no problems. I can use the Navigation Panel and the Panel Wizard without problems. I also tested Chrome 10. Same problem as Firefox 4. With these two Browser (and these are the most used Browsers of my users) I am not able to view and edit my Wiki correctly.
Now where is the problem? Is that a bug in Xwiki or a bug in the javascript engine of Firefox and Chrome? Could you give me a quick solution or workaround please?
Best regards.
Enzo
Which version of XWiki are you using? I fixed a similar bug a few weeks ago. http://jira.xwiki.org/jira/browse/XE-845 To fix it in your instance, waiting for 3.0 to be released, you have to edit webapps/xwiki/resources/js/scriptaculous/scriptaculous.js and add the following condition at the start of the require function:
require: function(libraryName) { if ($$("script[src$='" + libraryName.replace(/^.*\//, '') + "']").length > 0) { return; }
-- Sergiu Dumitriu http://purl.org/net/sergiu/