Remove erroneous custom HTML


I added erroneous HTML to the Custom HTML section in Confluence Administration (shame on me) and now I can't rectify it, because I'm locked out.

Is there a possibility to remove all / the specific custom HTML directly from the confluence installation?


5 answers

1 accepted

1 vote
Answer accepted

Thanks for your reply, Amalia.

I tried that, but the bug I introduced, resulted in an empty browser window. :) I forgot an </script> tag and the whole page body was considered as part of the script.

Finally, I found someone in our company with knowledge of mySQL and we removed the faulty script via an SQL update.

Now, one question came up to me: Shouldn't the editor of Custom HTML check for such simple errors that have such big consequences?

You should always test things like this in another instance. Even if jira checked for closing tags and so on, it couldn't catch all logic errors. A simple check would just give a false sense of security.

Happily enough it was our staging instance of confluence I messed up. :) But nevertheless, it gave me some embarassment.

I agree, that user can't exspect a fully-featured HTML editor in Confluence, but I also think that some essential checks to avoid lock-out problems wouldn't be just convenient but necessary.

Just wanted to add my agreement that it is not acceptable that the 'Custom HTML' editor seems to have no checks whatsoever on the code entered.  It does not have to be a full HTML-syntax checker, but the fact that a missing </script> tag can render your Confluence instance irretrievably hosed, has been a long-standing problem from Confluence 2 through Confluence 5.

A Restore to Default button would also be nice ... for those of us who can see the editor, but can't edit the text boxes.

You can navigate your browser directly to <confluence-url>/admin/viewcustomhtml.action to delete/remove the custom HTML

Hi Kirstin, Would you mind sharing the sql script you used? Thanks!

Sorry, Abilene. It's too long ago, we couldn't reconstruct the SQL statement.

My colleague who has mySQL knowledge told me that he

  • made a database dump
  • searched for the faulty script in this dump
  • looked for the BANDANAID of the database record, containing the content we wanted to remove
  • applied an update (which removed the custom HTML) to this database record with this BANDANAID

Hope that gives you a hint.

Thanks Kirstin. These steps helped a lot. :)

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

571 views 2 13
Read article

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