Confluence Syntax error in Header

Hi

I updated the the header section of the Custom HTML option in the admin section.

Insert Custom HTML.jpg

 

The code I inserted was:

   <script>jQuery(document).ready(function() {
    jQuery(".external-link").attr("target", "_blank");
});

The problem is that I forgot thew closing tag </script>. And now all code following that code, means the BODY is not displayed in the browser. Only an empty page is shown.

view source code.jpg

 

Question:

As I can not login anymore, I need to change / backout the code on file server. Any idea where I can do that?

Thanks in advance for your help!

Regards Alex

 

1 answer

1 accepted

Hope you have already fond some solution, if not here a few options to fix it:

Hard way

Available only if you have RW access to the DB. You should try to find where Custom HTML stores their configuration and clear it using SQL.

More simpler way

1. Open Custom HTML edit page in Chrome browser directly "%your_host%/admin/editcustomhtml.action"

2. You will see blank page :) It is OK. Open developer toolbox (F12 hotkey)

3. Find a place with your broken <script> tags and cut everytning from <body> tag and put it to real <body> tag of the page.

4. You will be able to see Login window. Fill your user name and password.

5. Page will be updated and now you are athenticated, but still see nothing. 

6. Repeat steps 2 and 3 to see Custom HTML edit window. Delete broken tags. Save it.

Hi Domenico

Thanks for your help! Although I already found a different solution

https://confluence.atlassian.com/confkb/unable-to-use-confluence-upon-adding-some-customizations-in-custom-html-648218529.html?_ga=2.159195130.191219446.1509349175-1730866595.1495439074

Nevertheless in my opinion it is not state of the art not to have a basic tag validator for such options. Atlassian should solve this really quick.

But again thanks Domenico!

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Friday in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

274 views 11 10
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