JS Syntax and Reference errors after Confluence upgrade to 5.0.2

I upgraded from 4.3 to 5.02 this morning, and in the process it looks like some javascript broke. When I load Confluence, it looks like CSS isn't loading, and I see the following line on top of the page in my browser

$soyTemplateRendererHelper.getRenderedTemplateHtml("com.atlassian.auiplugin:aui-experimental-soy-templates", "aui.page.header.soy", $templateParameters)

Additionally, I see the following errors in my browser

Uncaught SyntaxError: Unexpected identifier batch.js:1871
Uncaught ReferenceError: AJS is not defined confluence.web.resources:login.js:1
Uncaught ReferenceError: placeFocus is not defined login.action:88

I've tried restarting the server and re-running the upgrade, but neither helped.

Here's my stderr log:

2013-03-11 11:45:02 Commons Daemon procrun stderr initialized
Mar 11, 2013 11:45:02 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server} Setting property 'debug' to '0' did not find a matching property.
Mar 11, 2013 11:45:02 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine} Setting property 'debug' to '0' did not find a matching property.
Mar 11, 2013 11:45:02 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host} Setting property 'debug' to '0' did not find a matching property.
Mar 11, 2013 11:45:02 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property.
Mar 11, 2013 11:45:03 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-80
Mar 11, 2013 11:45:03 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-443
Mar 11, 2013 11:45:03 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 966 ms
Mar 11, 2013 11:45:03 AM org.apache.catalina.core.StandardService start
INFO: Starting service Tomcat-Standalone
Mar 11, 2013 11:45:03 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.35
Mar 11, 2013 11:45:54 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-80
Mar 11, 2013 11:45:54 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-443
Mar 11, 2013 11:45:54 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 50976 ms

And my stdout log:

2013-03-11 11:45:02 Commons Daemon procrun stdout initialized
2013-03-11 11:45:05,510 INFO [main] [com.atlassian.confluence.lifecycle] contextInitialized Starting Confluence 5.0.2 [build 4108 based on commit hash b47156ace146e4f759b49ef98258cb637bdd5af8]
2013-03-11 11:45:08,646 WARN [main] [atlassian.config.xml.AbstractDom4jXmlConfigurationPersister] saveDocumentAtomically Unable to move C:\Program Files\Atlassian\Application Data\Confluence\confluence.cfg.xml7274199780793782864tmp to C:\Program Files\Atlassian\Application Data\Confluence\confluence.cfg.xml. Falling back to non-atomic overwrite.

Obviously there's a few warnings in there, but from what I could tell in my searching, they probably don't mean much. Feel free to correct me if I'm wrong!

6 answers

1 accepted

This widget could not be displayed.

After contacting support, I found out that this can happen when the upgrade tasks don't run. I reverted to my database and home directory backups and re-ran the upgrade, and now everything is working correctly.

I suspect this happened because I stopped the server to re-enable SSL in the server config files, but I must have stoppped it too soon. During the second upgrade I made to sure to let the installer open Confluence in a local browser, and then I waited for that page to fully load. Once I new the upgrade was working, then I stopped the server to make my changes.

This widget could not be displayed.
Ruchi Tandon Atlassian Team Jun 16, 2013

I just figured out that the problem could also be caused due to the fact that not all modules of the Soy plugin are enabled. Please refer to this KB article : Comment Box Disappears: $soyTemplateRendererHelper.getRenderedTemplateHtml and verify that all modules are enabled and then restart the instance. Hopefully that should resolve the problem.

This widget could not be displayed.

I had to look up the URL for the admin/viewplugins.action page since the admin page seems to be missing a link to it, but it looks like the bulk of the plugins are disabled. It could be that the Plugin Manager is just showing more stuff since the formatting is missing, so I'm not sure if this is relevant or not.

This widget could not be displayed.

I upgraded a test Confluence 4.3.7 system this morning to 5.0.2, and on browsing the URL for the first time, I also had a similar error message, along with the main page looking rather wonky.

"Error formatting macro: recently-updated-dashboard: com.atlassian.confluence.renderer.template.TemplateRenderingException: Unable to compile Soy template in plugin module: confluence.macros.dashboard:dashboard-macros-resources"

It came right after I bounced Confluence. I presume yours did too?

Stuartu,

Check out the answer I left. You may have restarted the server before the upgrade tasks completed.

This widget could not be displayed.

i have the same exact problem, except i did a fresh installation, not an upgrade.

i ran confluence via the *.bin installation file in a fresh virtualized virtualbox ubuntu 12.04LTS 64bit OS.

after installation i restarted the whole server, the license key page appeard and i continued with the setup installation. later on, right after the key page (took a lot of time to load the second page while some java process eat 100% cpu, but it loaded and i did not kill anything), the folowing pages remain broken, like there was none css (in fact css files loaded OK but some javascript is broken).

how should i proceed? try to install it all over again?

problem solved after system restart

This widget could not be displayed.

Do you mean computer/server restart or the confluence tomcat restart ?

to be honest, i already forgot. i'm running confluence within a virtual machine in my desktop, so either it was tomcat, or virtual server, or at last, the desktop pc restart.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

468 views 6 6
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you