Custom html on look and feel
Asked by Pepe wow:

I added some custom html in the look and feel area and save it. Now it doesnt show, and when i click the edit button, the boxes wont be enabled, and the code dissapeared. Cant go back either and tried that /admin/doeditcustomhtml.action and doesnt work either.


Answers:
author: Adrien Ragot 2
body: Hi Pepe,

The url is /admin/editcustomhtml.action . You said /admin/**do**editcustomhtml.action, and the "do" is too much.

Maybe you didn't need to go to the database level ;)

Cheers,

Adrien


author: Fabio Racobaldo _Herzum_
body: Hi Pepe,

please execute this query in order to retrieve where your custom html has been stored

```
select * from bandana where bandanavalue like '%customHtmlSettings%';
```

Locate your custom code and remove it from the related tag so that you have the following situation

```
... &lt;customHtmlSettings&gt;    &lt;beforeHeadEnd&gt;&lt;/beforeHeadEnd&gt;    &lt;afterBodyStart&gt;&lt;/afterBodyStart&gt;    &lt;beforeBodyEnd&gt;&lt;/beforeBodyEnd&gt; &lt;/customHtmlSettings&gt;...
```

PLEASE, perform a db dump first so you can roolback if something goes not well.

Let me know,

Fabio

comments: author: Pepe wow
body: Thanks, ill try and let you know. Need to reach the DB guy. :D


author: Pepe wow
body: Checking the DB it was ok, so we tried restarting confluence and it worked.

Thanks for your help! Have a great weekend!!


author: Fabio Racobaldo _Herzum_
body: you too. Please, mark this question as closed accepting my answer.regards,Fabio


author: Fabio Racobaldo _Herzum_
body: Don't worry Pepe, no panic. We can remove it from the DB. I'm working in order to provide u the necessary query.

Fabio


author: Pepe wow
body: tried loging out and back, and also with another admin user.... nothing :(


author: Fabio Racobaldo _Herzum_
body: Hello Pepe,

here a useful link that explains you how to revert your code

[https://confluence.atlassian.com/display/CONFKB/Customized+HTML+Breaks+the+'Edit+Custom+HTML'+Page](https://confluence.atlassian.com/display/CONFKB/Customized+HTML+Breaks+the+%27Edit+Custom+HTML%27+Page)

Hope this helps,

Fabio


author: Pepe wow
body: I tried that, but it gives me the following error:  
"The request cant be processed because a security token is missing. You might need to resend the form or refresh the page"

comments: author: Fabio Racobaldo _Herzum_
body: Try to open another administration page first so that you can take your security tokens.

Let me know,

Fabio


author: Pepe wow
body: What i saw is that error is before saving the html. I could save it in the first place... the thing is that know, the fields wont enable to modify it (or even show that code). Would you happen to know where that html i added is stored?? DB?? or somewhere else maybe i can erase ir manually?


author: Pepe wow
body: i added in the head area:

\<script src="http://www.mydomain.com/confluence/js/bootstrap.min.js"\>\</script\>  
\<link type="text/css" rel="stylesheet" href="http://www.mydomain.com/confluence/css/master.css" \>

and in the top of the body part a navigation:

\<div class="navbar navbar-default " role="navigation"\>  
\<div class="navbar-collapse collapse"\>  
\<ul id="main-nav" class="main-navbar nav navbar-nav "\>  
\<li class="dropdown"\>  
\<a href="http://confluence.mydomain.com/display/AGR/A+mydomain" class="dropdown-toggle" data-toggle="dropdown" data-description="nossas ess?ncias"\>A mydomain\</a\>  
\</li\>  

\<li class="dropdown"\>  
\<a href="#" class="dropdown-toggle" data-toggle="dropdown" \>Produtos\</a\>  
\<ul class="dropdown-menu"\>  
\<li\>\<a href="http://confluence.mydomain.com/display/S2/S2+Home"\>mydomain S2\</a\>\</li\>  
\<li\>\<a href="http://confluence.mydomain.com/display/SIA/SIA+Home"\>SIA\</a\>\</li\>  
\<li\>\<a href="http://confluence.mydomain.com/display/ABCS/ABCS+Home"\>ABCS\</a\>\</li\>  
\<li\>\<a href="http://confluence.mydomain.com/display/MELHORES/Home+page"\>Melhores da Suinocultura\</a\>\</li\>  
\<li\>\<a href="http://confluence.mydomain.com/display/NEC/Nectar+Home"\>Nectar\</a\>\</li\>  
\<li\>\<a href="http://confluence.mydomain.com/pages/viewpage.action?pageId=5865503"\>Usu?rio mydomain\</a\>\</li\>  
\</ul\>  
\</li\>  

\<li class="dropdown"\>  
\<a href="#" class="dropdown-toggle" data-toggle="dropdown" \>Programas\</a\>  
\<ul class="dropdown-menu"\>  
\<li\>\<a href="http://confluence.mydomain.com/display/LEAN/LEAN"\>mydomain Enxuta\</a\>\</li\>  
\</ul\>  

<br />

\</li\>  

\<li class="dropdown"\>  
\<a href="#" class="dropdown-toggle" data-toggle="dropdown" \>Projetos\</a\>  
\<ul class="dropdown-menu"\>  
\<li\>\<a href="http://confluence.mydomain.com/display/CON/Confluence+Home"\>Confluence\</a\>\</li\>  
\<li\>\<a href="http://confluence.mydomain.com/pages/viewpage.action?pageId=8290414"\>Consist?ncia de dados de produ??o\</a\>\</li\>  
\</ul\>  
\</li\>  

\<li class="dropdown"\>  
\<a href="http://confluence.mydomain.com/display/PAD" class="dropdown-toggle" \>Padr?es\</a\>  
\</li\>  

\<li class="dropdown"\>  
\<a href="http://confluence.mydomain.com/display/PRO/Procedimentos+Home" class="dropdown-toggle" \>Procedimentos\</a\>  
\</li\>  

\<li class="dropdown"\>  
\<a href="#" class="dropdown-toggle" data-toggle="dropdown" data-description="conhe?a a estrutura"\>Equipe\</a\>  
\<ul class="dropdown-menu"\>  
\<li\>\<a href="http://confluence.mydomain.com/pages/viewpage.action?pageId=10485835"\>Dire??o\</a\>\</li\>  
\<li\>\<a href="http://confluence.mydomain.com/display/ADM/Administrativo+Home"\>Administrativo\</a\>\</li\>  
\<li\>\<a href="http://confluence.mydomain.com/pages/viewpage.action?pageId=10485839"\>Comunica??o\</a\>\</li\>  
\<li\>\<a href="http://confluence.mydomain.com/pages/viewpage.action?pageId=10485841"\>Estrat?gico\</a\>\</li\>  
\<li\>\<a href="http://confluence.mydomain.com/pages/viewpage.action?pageId=10485843"\>?rea de Neg?cio\</a\>\</li\>  
\<li\>\<a href="http://confluence.mydomain.com/display/REL/Relacionamento+Home"\>?rea de Relacionamento\</a\>\</li\>  
\<li\>\<a href="http://confluence.mydomain.com/display/TI/TI"\>Tecnologia\</a\>\</li\>  
\<li\>\<a href="http://confluence.mydomain.com/display/INFRA/Infra+Home"\>Infra\</a\>\</li\>  
\</ul\>  
\</li\>  

\<li class="dropdown"\>  
\<a href="#" class="dropdown-toggle" data-toggle="dropdown" data-description="ficar por dentro de tudo"\>PARA VOC?\</a\>  

\</ul\>  
\</div\>  
\</div\>  
\<!--/navbar--\>


author: Fabio Racobaldo _Herzum_
body: Hello Pepe,

did u added some javascipt into your custom html code? Please, could you attach your code so that I can perform a double check?

Regards,

Fabio


Tags: html