cannot edit some block on the page

Hi, I seem to have lost access to editing some block on my webpage. I have a 3 column layout using html blocks, i can edit the first 2 but the second while in edit mode responds just like when im not in edit mode.
I have accordion code and some inline css, while this never caused me problems before, it is now, i have changed the theme to elemental and it still acts the same way.
I have also lost the ability to move or delete that block, as it turns out i have also lost the ability add or delete other blocks. I also cannot edit/add/delete any layout as well.
advice please

View Replies:
MrKDilkington replied on at Permalink Reply
Hi davetl,

Do you have any errors in your browser console when trying to interact with blocks (add, edit, move, etc.)?

If the issue is caused by code added using the HTML block, switching themes won't resolve the problem.
davetl replied on at Permalink Reply
loaded chrome - inspect page - click console and it get this

989b6351c0cd076aa9eedf5112fbc7fa01341323.js:5 Uncaught TypeError: Cannot read property 'replace' of undefined
at Function.x.template (
at x.(anonymous function) [as template] (
at d.Area.init (
at new d.Area (
at HTMLDivElement.<anonymous> (
at Function.each (
at m.fn.init.each (
at d.EditMode.scanBlocks (
at d.EditMode.init (
at new d.EditMode (
MrKDilkington replied on at Permalink Reply

If code added with the HTML block is causing errors, you could try the Safe HTML add-on by JohntheFish.
davetl replied on at Permalink Reply
Ok thank you, i wil test it.
davetl replied on at Permalink Reply
I installed it and activated it to true, but the page still responds in the same way.
I have added last week some custom css in design, would this cause it or am i chasing the wrong avenue? The custom css just styles the accordion code.

/* border-top-width: 1px;*/
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-top-color: rgb(229, 229, 229);
border-right-color: rgb(229, 229, 229);
border-bottom-color: rgb(229, 229, 229);
border-left-color: rgb(229, 229, 229);
-moz-border-top-colors: none;
-moz-border-right-colors: none;
-moz-border-bottom-colors: none;
-moz-border-left-colors: none;
border-image-source: none;
border-image-slice: 100% 100% 100% 100%;
border-image-width: 1 1 1 1;
border-image-outset: 0 0 0 0;
border-image-repeat: stretch stretch;
font-family: verdana;
font-size: 21px;
margin: 10px;
MrKDilkington replied on at Permalink Reply

Just to make sure you have the Safe HTML add-on working, are your HTML blocks displaying code?

The CSS you added shouldn't cause a JavaScript error.
davetl replied on at Permalink Reply
not sure how i tell if safe html is working or not.
but, out of my 3 columns, i have always been able to edit the first 2, seeing the html inside the html block, but the 3rd responds like your not in edit mode.
It does seem to be more the home page is broke, as other pages respond fine.
just to add, i cannot add or alter any layouts on the page either. other pages are all ok, just the home page is broken.
davetl replied on at Permalink Reply
actually scrub last message, adding a layout is not working 100%, i add a 3 column on a fresh page and when i add it it disappears..
MrKDilkington replied on at Permalink Reply

"actually scrub last message, adding a layout is not working 100%, i add a 3 column on a fresh page and when i add it it disappears.."

Is there a browser console error when this happens on a newly created page?

Do you have any custom blocks installed or custom code added to your site?
davetl replied on at Permalink Reply
not going to believe this, but the other pages are now working.. (ffs), there are no console logs appearing when i load any pages now, even the home page.
what i do have, and its been doing this for a while is every time i load the home page (while logged in) i get to blu boxes on the top right with review in them, and i have to keep closing them. this happens only on home page loading.

The only custom code is the accodion inside html blocks. i will paste the accordion code now, there will be 3 sets, 1 for each box. i have been rebuilding the site on another domain i have, i have also seperated the css code which was inline and added this to cog-design-cusome css. also on last box (which is the one i still cannot edit on live site, is a <script>, i have added it to all 3 boxes on new site.
let me know what you think.


<button class="accordion">Sales</button>
<div class="panel">
<p>Stocking a wide variety of products from <strong>Laptops</strong>, <strong>Computers</strong>, <strong>Tablets</strong> and <strong>peripherals</strong> to <strong>mobile phone</strong> <strong>cables</strong> and <strong>SD</strong> <strong>storage</strong> cards in store. We cater for <strong>Home</strong> and <strong>Business</strong> user, The <strong>Gamer</strong>, The <strong>Programmer</strong>, The <strong>Musician</strong> and everyone else. If we dont have it in store, we can order it and get it delivered to you direct, usually next day.</p>
<button class="accordion">Support</button>
<div class="panel">
<p>We help business's lower the cost of IT by providing <strong><a href="">Managed Support</a></strong> at either a fixed monthly payment or charged per visit to <strong>Maintain</strong> and <strong>Support</strong> your company.</p><p>Alongside <strong><a href="">Business Support</a></strong> we also provide <a href=""><strong>Home</strong></a><strong> / </strong><a href=""><strong>Residential support</strong></a> and delivery. Whether you have <strong>Computer</strong>, <strong>Laptop</strong>, <strong>telephone</strong>, <strong>broadband</strong>, <strong>wifi</strong> issues, <strong>printer</strong> issues or something else such as <a href=""><strong>Virus</strong></a> or <strong><a href="">Spyware</a></strong> invaders - we can solve your issues for you.<br></p><p>Along side our many <strong>services</strong>, we now offer <strong><a href="">flexible IT finance</a></strong> solutions <span style="font-size: 12px;">(**Business users only**)</span>.</p><p>Our aim is to provide a high level of bespoke service, tailored for you , your home and your business needs.</p>

<button class="accordion">Service & Repairs</button>
<div class="panel">
<p>With a  wide range of <strong><a href="">Service</a></strong> /  <a href=""><strong>Repairs</strong></a> and <a href=""><strong>IT services</strong></a>, if you have a problem with your <strong>PC computer</strong>, <strong>Server</strong>, <strong>Laptop</strong>, <strong>Tablet, Backup</strong>,  <strong></strong><strong>Mobile Device</strong>, <strong>telephone</strong>, <strong>broadband</strong> or <strong>Wifi </strong> we can help you with it. We offer <strong>Remote</strong>, <strong>E-mail</strong>, < strong>Telephone</strong>, <strong>Workshop</strong> and <strong>on-site</strong>.
<button class="accordion">Leasing</button>
<div class="panel">
<p data-redactor-inserted-image="true"><strong><a href="">Finance</a></strong><a href=""> </a><strong><a href="">Lease</a></strong> equipment such as <strong><a href="">Computers</a></strong>, <strong>Laptop</strong>, <strong>Server,</strong> <strong>Printer</strong> / <strong>MFP</strong> to <strong>Photocopiers</strong>. <strong>Finance lease</strong> will allow you to spread the total cost of new equipment and spread it over up to 3 years. For the <strong>cost of less that a cup of coffee a day</strong>, <strong>leasing</strong> becomes attractive. <span style="font-size: 14px;">**Business users ONLY**</span>

button.accordion {
    background-color: #0055a5;
    color: #ffffff;
    cursor: pointer;
    padding: 12px;
    width: 100%;
    border: none;
    text-align: left;
    vertical-align: middle;
    outline: none;
    font-size: 18px;
    transition: 0.4s;
}, button.accordion:hover {

Like i said the last one has inline css which i have seperated, and i also added the script to each box on new site.
JohntheFish replied on at Permalink Reply
As its only the last column that fails, suggests this could be broken HTML somewhere. Perhaps in the theme or an HTML block you have a mis-matched tag, either an un-closed element, or closing before it should be.

To check, you can 'view source' (not developer console), then copy/paste that into an HTML checker. It will likely hignlight numerous concerms, but waht you would be looking for is an explicit message about mis-matched tags.
Gondwana replied on at Permalink Reply
I hope the <body> tags aren't actually there!

I'd also be worried about some of the class names; they may not be unique.
davetl replied on at Permalink Reply
It was the accordion code that was causing the problem, the only way to fix it was to delete code from mysql.
I had to search using keyword accordion and verify it was those block's then delete it, delete the cache and the site seems to be working properly.
so, when adding html inside htnl block i should not use <body></body>? and could you expand on why not for knowledge please.

JohntheFish replied on at Permalink Reply
An html page only has one body. Any more and the code is illegal. Browsers try and cope with illegal html, but not consistently and not necessarily successfully.
davetl replied on at Permalink Reply
Ok john,
thanks i understand.