Blank page on Edit, Uncaught TypeError: Cannot read property 'innerHTML' of null
Asked by Sean Dowd:

I've recently upgraded from 5.9.x to 6.15.4 (server version, running on Amazon linux in AWS). When anyone tries to edit a page by clicking Edit (or typing e), they get a blank page. The browser console shows the error below. View page source shows that the page is not empty.

But if they hold control down when clicking (open in a new tab/window), Edit works as expected.

Nothing shows up in the logs on the server.

```
com.atlassian.confluence.plugins.confluence-editor-v4:editor-resources-v4.js?locale=en-US:5 Uncaught TypeError: Cannot read property 'innerHTML' of null
at com.atlassian.confluence.plugins.confluence-editor-v4:editor-resources-v4.js?locale=en-US:5
at com.atlassian.confluence.plugins.confluence-editor-v4:editor-resources-v4.js?locale=en-US:5
at Array.forEach (<anonymous>)
at Object.initialise (com.atlassian.confluence.plugins.confluence-editor-v4:editor-resources-v4.js?locale=en-US:5)
at Object.<anonymous> (com.atlassian.confluence.plugins.quickedit:quick-edit-general.js?locale=en-US:18)
at k (com.atlassian.plugins.jquery:jquery.js:31)
at Object.fireWith [as resolveWith] (com.atlassian.plugins.jquery:jquery.js:32)
at Object.<anonymous> (com.atlassian.plugins.jquery:jquery.js:35)
at k (com.atlassian.plugins.jquery:jquery.js:31)
at Object.fireWith (com.atlassian.plugins.jquery:jquery.js:32)
```


Answers:
author: MichaelD
body: Hello,

From the support ticket, we identified the cause for this issue was from some JavaScript in the custom HTML being added at the end of the body.

Removing the custom HTML fixed the edit issues.

Regards,  
Michael

comments: author: Shannon S
body: Hi Michael,

Thank you very much for sharing. I've accepted your answer.

Take care, and have a pleasant rest of your week.

Regards,

Shannon


author: Shannon S
body: Hello Sean,

So sorry for the delay in getting a reply to you. Are you still encountering this issue? I've seen this before, but it was caused by a problematic add-on. You can test this by [enabling Safe Mode](https://confluence.atlassian.com/upm/disabling-and-enabling-apps-273875716.html) on your instance.

Could you try that and let me know how it goes?

Regards,

Shannon

comments: author: Sean Dowd
body: Thanks. I Just tried that, but the behavior was the same - blank page on Edit.

\[Edited: restarting confluence fixed the issue below\]

And now after updating our plugins, I get this when trying to exit Safe Mode (it worked before the plugin updates):
>
> ```
> System failed to restore from Safe Mode. Reenabling plugin 'Confluence Mobile Plugin' failed while exiting safe mode.
> ```


author: Shannon S
body: Thank you for confirming, Sean.

Does this occur on all pages in Confluence, even if you create a new blank page?

Do you also happen to be working behind a firewall or proxy? If so, would you be able to [bypass the proxy](https://confluence.atlassian.com/confkb/how-to-bypass-a-proxy-to-test-network-connectivity-402031184.html) to test if it works without it?

Lastly, does it occur on all browsers, machines, and various networks?

Regards,

Shannon


author: Sean Dowd
body: All browsers, all machines (it's company-wide). If you create a new page, it goes right into the editor and saves correctly. However if you then click Edit on that page, it comes back blank.

No firewall or proxy is in place, this effects users at home and office.

Confluence is in AWS behind an application load balancer. I'm not sure if there's an easy way to bypass that. I tried ssh port-fowarding 18090 to remote:8090, but login did not work - it just returns to login page.


author: Shannon S
body: Hello Sean,

Thank you for clarifying. If the editor is working on new pages and not on existing pages, then it might not be the load balancer causing the issue.

Could you please generate a [HAR file](https://confluence.atlassian.com/kb/generating-har-files-and-analyzing-web-requests-720420612.html)r while replicating the file and then create a [Support Zip](https://confluence.atlassian.com/support/create-a-support-zip-790796819.html). Then, raise a request at [Atlassian Support](https://support.atlassian.com/contact) and include these files on the request.

If you have any trouble, please let me know!

Once we're able to resolve the issue on the support side, please update this thread with the resolution, so that it can help other users in the future.

Regards,

Shannon


author: Sean Dowd
body: Thanks - just submitted ticket.


author: Shannon S
body: Thank you, Sean! I left an internal comment there as well so the engineer can review this thread if they need.

Take care,

Shannon


Tags: confluence-server

server