On Wed, Jul 6, 2011 at 2:58 AM, Marius Dumitru Florea <[email protected]> wrote: <snip>
Ok, I tried the all-in-one zip, and there were no issues when displaying the editor menu. It was there, fully functioning. Just for kicks, I ran a diff between the all-in-one and the uncompressed WAR contents and saw nothing significantly different between the two. The differences mostly amounted to my changes to set up a JNDI datasource (in the hibernate.cfg.xml file) for Oracle and turning on stats. I've also tried bouncing tomcat just to make sure that any changes to configuration files were applied.
If the JavaScript code from resources/js/xwiki/wysiwyg/xwe is the same and the editor configuration is fine then the menu should be displayed both on Jetty and Tomcat. You should check three things:
(1) View the HTML source when in WYSIWYG edit mode and search for "wysiwygConfig". The first match should be a JavaScript object that holds the WYSIWYG editor configuration. The value of the 'menu' property should be similar to: 'link image table macro import'.
I never saw anything quite that simple. I did see a "menu" associative array (hash) key used in a javascript variable named "wysiwygConfigdJG4". Here's the relevant key/value: menu: '[{\"feature\":\"link\",\"subMenu\":[\"linkEdit\",\"linkRemove\",\"linkWikiPage\",\"linkAttachment\",\"|\",\"linkWebPage\",\"linkEmail\",\"|\",\"alfrescoLink\"]},{\"feature\":\"image\",\"subMenu\":[\"imageInsertAttached\",\"imageInsertURL\",\"imageEdit\",\"alfrescoImage\",\"imageRemove\"]},{\"feature\":\"table\",\"subMenu\":[\"inserttable\",\"insertcolbefore\",\"insertcolafter\",\"deletecol\",\"|\",\"insertrowbefore\",\"insertrowafter\",\"deleterow\",\"|\",\"deletetable\"]},{\"feature\":\"macro\",\"subMenu\":[\"macroInsert\",\"macroEdit\",\"|\",\"macroRefresh\",\"|\",\"macroCollapse\",\"macroExpand\"]},{\"feature\":\"import\",\"subMenu\":[\"importOffice\"]}]'
(2) In Firefox, if you have Firebug extension installed you can open the Console tab and click on the "Break On All Errors" icon then reload the page. You should get only one or two "null has no properties" (harmless) exceptions.
It broke on two null values. No issues there I guess.
(3) Open the HTML tab of Firebug and search for "gwt-MenuBar" (use the search box in the right corner of the Firebug window). Does it find something? Maybe the menu is there but is hidden for some reason.
This is where I'm seeing nothing in my tomcat-deployed wiki. I did find the toolbar DIV (class="xToolBar") in the table having the xRichTextEditorTabPanel class. Within the xRichTextEditor DIV, there is only the toolbar DIV. Conversely, in the Jetty-based wiki (which has the menubar) I can see that the xRichTextEditor DIV does indeed contain a gwt-MenuBar DIV above the toolbar DIV. This really seems like it might be related to some configuration item since the only thing that remains significantly different between the Tomcat is the persistence layer. I might just try blowing away the schema in Oracle (10g) and restarting to see if I did something screwy while setting it up.