Empty Panels After Fresh Installation On Mac

After installing XWiki 13.3 on MacOS 11.3.1, Tomcat 9.0.45, JDK 11.0.10 I see the Home page, but the side panels are empty as well as the Admin panels page. I’m sure to have installed the full flavor. Tomcat runs under my user account and the xwiki and permanent directories belong to that user. Any other idea what might have gone wrong? Thanks

Hi @Kido

Is this a clean install or an upgrade? If it’s an upgrade how was this wiki customized (did you modify any template, created a skin, installed extensions)? Any info in the xwiki logs too?

Maybe also try to clean your browser cache although we should no longer have this kind of problems AFAIK.

Last, you could try to find out the problem by putting debug logging into leftpanels.vm for example.

Yes, @vmassol, it’s a clean install and I cleaned the browser cache a lot. The leftpanels div is just empty. Here is what I see

Screenshot 2021-05-18 at 15.23.30

The leftpanels.vm code is:

#if($showLeftPanels == "1" || $request.getParameter("forceLeftPanels"))
<div id="leftPanels" class="panels left panel-width-$!{leftPanelsWidth}"#if($showLeftPanels != "1" && $request.getParameter("forceLeftPanels")) style="display: none;"#end>
## Global Variable
#set($xwikiPanelWidth = $leftPanelsWidth)
#set($panelUixs = $services.uix.getExtensions('platform.panels.leftPanels'))
#foreach($panelUix in $panelUixs)
  #set($panelDocName = $panelUix.getDocumentReference())
  #if($panelDocName && $services.security.authorization.hasAccess('view', $panelDocName))
    $services.rendering.render($panelUix.execute(), "html/5.0")
  #end
#end
</div>
#end
#set($xwikiPanelWidth = "Medium")

As I mentioned you could try to check what the different lines return. For example $services.uix.getExtensions('platform.panels.leftPanels').

Now I see some errors (in red) in your JS console so that needs to be fixed first. I don’t have any idea about it though. Maybe @mflorea has?

Thx

When I add

$panelDocName 
$services.security.authorization.hasAccess('view', $panelDocName)
$panelUix.execute()

to the loop over panelUixs I see

xwiki:Panels.Applications true org.xwiki.rendering.block.MetaDataBlock@6e7a5b20 
xwiki:Panels.Navigation true org.xwiki.rendering.block.MetaDataBlock@21571723

so it seems to be the rendering that fails

The first error as shown in safari

TypeError: b.get is not a function. (In 'b.get("attach.label")', 'b.get' is undefined)
(anonymous function) — resourcePicker.bundle.min.js:17
execCb — require.min.js:5:16733
check — require.min.js:5:10506
(anonymous function) — require.min.js:5:12921
(anonymous function) — require.min.js:5:1548
(anonymous function) — require.min.js:5:13378
each — require.min.js:5:1022
emit — require.min.js:5:13349
check — require.min.js:5:11063
enable — require.min.js:5:13248
init — require.min.js:5:9612
(anonymous function) — require.min.js:5:11638
(anonymous function) — require.min.js:5:1548
(anonymous function) — require.min.js:5:13378
each — require.min.js:5:1022
emit — require.min.js:5:13349
check — require.min.js:5:11063
enable — require.min.js:5:13248
init — require.min.js:5:9612
(anonymous function) — require.min.js:5:11918
(anonymous function) — require.min.js:5:1548
(anonymous function) — l10n.min.js:1:472
i — jquery.js:3187
fireWith — jquery.js:3317
z — jquery.js:8757
(anonymous function) — jquery.js:9124

My environment:

Server version name:   Apache Tomcat/8.5.66
Server built:          May 8 2021 22:44:01 UTC
Server version number: 8.5.66.0
OS Name:               Mac OS X
OS Version:            11.3.1
Architecture:          x86_64
Java Home:             /usr/local/Cellar/openjdk@11/11.0.10/libexec/openjdk.jdk/Contents/Home
JVM Version:           11.0.10+9
JVM Vendor:            Oracle Corporation
CATALINA_BASE:         /usr/local/Cellar/tomcat@8/8.5.66/libexec
CATALINA_HOME:         /usr/local/Cellar/tomcat@8/8.5.66/libexec
Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED
Command line argument: --add-opens=java.base/java.util=ALL-UNNAMED
Command line argument: --add-opens=java.base/java.util.concurrent=ALL-UNNAMED
Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
Command line argument: -Djava.util.logging.config.file=/usr/local/Cellar/tomcat@8/8.5.66/libexec/conf/logging.properties
Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
Command line argument: -Dfile.encoding=UTF-8
Command line argument: -Xms256m
Command line argument: -Xmx4096m
Command line argument: -XX:PermSize=256m
Command line argument: -XX:MaxPermSize=1024m
Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
Command line argument: -Dignore.endorsed.dirs=
Command line argument: -Dcatalina.base=/usr/local/Cellar/tomcat@8/8.5.66/libexec
Command line argument: -Dcatalina.home=/usr/local/Cellar/tomcat@8/8.5.66/libexec
Command line argument: -Djava.io.tmpdir=/usr/local/Cellar/tomcat@8/8.5.66/libexec/temp

@Kido could it be that the screen size is just too small? On small screens we don’t display the panels on the side but below. Your screenshot at Empty Panels After Fresh Installation On Mac - #4 by Kido is showing a small screen size.

Unfortunately not. It just looks like, since the debug window takes a lot of space. I can see other XWiki installations with the same screen size without problems.

The two failing JavaScript modules are used by the CKEditor Integration and indirectly by the In-place editing (which is enabled on the wiki home page as long as the preferred editor is WYSIWYG). The reason seems to be that the localization tool (JavaScript module) used by CKEditor Integration fails to be loaded properly. Basically in this code:

define('resource', ['l10n!resource'], function(translations) {
  'use strict';

  var types = {
    attach: {
      label: translations.get('attach.label'),

translations.get is undefined. Note that translations itself is not undefined (otherwise the error message would be different) so it looks like RequireJS loads the wrong module for l10n!resource. Can you filter the Network tab (browser developer tools) by “l10n” and see what you get. It should be only l10n.min.js matching. Do you have it? Is the response OK?

Regarding the panels, I think some of the panels are loaded (rendered) asynchronously, but only the first time or when there’s no cached rendering, @tmortagne right? Maybe the asynchronous rendering of the panels fails, but I guess you should see some error log on the server.

Looks good:

Screenshot 2021-05-19 at 15.30.04

What do you get if you execute this in the JavaScript console (from the wiki home page where you have the problem):

require(['l10n!resource'], function(translations) {console.log(translations.get)});

what about:

require(['l10n!resource'], function(translations) {console.log(translations)});

I checked again the code of l10n.js and the issue seems to be that it fails to retrieve the translations from the server (the code could be improved to fail safe). Can you filter the Network tab by “translator”. I get 7 requests. Do you have them? Are they 200 OK? Can you check if their response is valid JSON?

Yes all the default panels of the Standard Flavor are async and cached (except for Tips panels which is only async since its content is random and navigation which is neither) so a refresh should show them even if there was a problem with async js.

Screenshot 2021-05-19 at 16.11.32

I’ve got 5 requests:

Screenshot 2021-05-19 at 16.28.11

The response tab shows “This request has no response data available”

This is not expected. So you’re getting an empty response for an URL like this:

/xwiki/bin/get/CKEditor/Translator?outputSyntax=plain&language=en&prefix=resource&key=attach.label

What do you see when you access the CKEditor.Translator page? Can you check its history, see if its content has been modified (compared to the 1.53.2 version of CKEditor Integration).

The URL

http://localhost:8080/xwiki/bin/get/CKEditor/Translator

shows a completely empty page. I didn’t modify anything. It’s a fresh install. What I noticed is, that all files I added manually to the distribution (e.g. mysql-connector-java-5.1.46-bin.jar) had an xattribute “com.apple.quarantine” which I removed with e.g.

xattr -d com.apple.quarantine mysql-connector-java-5.1.46-bin.jar

I don’t know how this MacOS feature works and whether it could have ruined the installation in some way.

Access the page in view mode http://localhost:8080/xwiki/bin/view/CKEditor/Translator and check it’s content (edit the page with the Wiki editor). Does it match the code from application-ckeditor/application-ckeditor-ui/src/main/resources/CKEditor/Translator.xml at master · xwiki-attic/application-ckeditor · GitHub (minus the XML encoding)?