cannot edit some block on the page

Permalink
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

 
MrKDilkington replied on at Permalink Reply
MrKDilkington
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 (https://www.tlsystems.co.uk/application/files/cache/js/989b6351c0cd076aa9eedf5112fbc7fa01341323.js:5:13120)
at x.(anonymous function) [as template] (https://www.tlsystems.co.uk/application/files/cache/js/989b6351c0cd076aa9eedf5112fbc7fa01341323.js:5:12613)
at d.Area.init (https://www.tlsystems.co.uk/updates/concrete5-8.2.1_remote_updater/concrete/js/app.js:7:1103)
at new d.Area (https://www.tlsystems.co.uk/updates/concrete5-8.2.1_remote_updater/concrete/js/app.js:7:867)
at HTMLDivElement.<anonymous> (https://www.tlsystems.co.uk/updates/concrete5-8.2.1_remote_updater/concrete/js/app.js:6:18782)
at Function.each (https://www.tlsystems.co.uk/updates/concrete5-8.2.1_remote_updater/concrete/js/jquery.js:2:2975)
at m.fn.init.each (https://www.tlsystems.co.uk/updates/concrete5-8.2.1_remote_updater/concrete/js/jquery.js:2:835)
at d.EditMode.scanBlocks (https://www.tlsystems.co.uk/updates/concrete5-8.2.1_remote_updater/concrete/js/app.js:6:18709)
at d.EditMode.init (https://www.tlsystems.co.uk/updates/concrete5-8.2.1_remote_updater/concrete/js/app.js:6:18311)
at new d.EditMode (https://www.tlsystems.co.uk/updates/concrete5-8.2.1_remote_updater/concrete/js/app.js:6:11284)
MrKDilkington replied on at Permalink Reply
MrKDilkington
@davetl

If code added with the HTML block is causing errors, you could try the Safe HTML add-on by JohntheFish.
https://www.concrete5.org/marketplace/addons/safe-html...
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.

.greyquarterboxright{
background-color:#f4f4f4;
min-height:120px;
/* 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;
margin-bottom:10px;
}
.titleblue{
color:#569bd2;
font-family: verdana;
font-size: 21px;
margin: 10px;
}
MrKDilkington replied on at Permalink Reply
MrKDilkington
@davetl

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
Hi
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
MrKDilkington
@davetl

"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
Hi
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.

thanks

<body>
<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>
</div>
<button class="accordion">Support</button>
<div class="panel">
<p>We help business's lower the cost of IT by providing <strong><a href="https://www.tlsystems.co.uk/services/business-customers">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="https://www.tlsystems.co.uk/services/business-customers">Business Support</a></strong> we also provide <a href="https://www.tlsystems.co.uk/services/home-customers"><strong>Home</strong></a><strong> / </strong><a href="https://www.tlsystems.co.uk/services/home-customers"><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="https://www.tlsystems.co.uk/shop/index.php?main_page=index&cPath=67_71&zenid=hjgaolh5k6ht9b7l7fiv1qlgk6"><strong>Virus</strong></a> or <strong><a href="https://www.tlsystems.co.uk/shop/index.php?main_page=index&cPath=67_71&zenid=hjgaolh5k6ht9b7l7fiv1qlgk6">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="https://www.tlsystems.co.uk/finance">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>
</div>
</body>

<body>
<button class="accordion">Service & Repairs</button>
<div class="panel">
<p>With a  wide range of <strong><a href="https://www.tlsystems.co.uk/services/computer-service">Service</a></strong> /  <a href="https://www.tlsystems.co.uk/services/computer-service"><strong>Repairs</strong></a> and <a href="https://www.tlsystems.co.uk/services"><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>.
</p>
</div>
<button class="accordion">Leasing</button>
<div class="panel">
<p data-redactor-inserted-image="true"><strong><a href="https://www.tlsystems.co.uk/finance">Finance</a></strong><a href="https://www.tlsystems.co.uk/finance"> </a><strong><a href="https://www.tlsystems.co.uk/finance">Lease</a></strong> equipment such as <strong><a href="https://www.tlsystems.co.uk/finance">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>
</p>
</div>
</body>

<style>
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.active, 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
JohntheFish
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
Gondwana
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
Ok,
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.

cheers
JohntheFish replied on at Permalink Reply
JohntheFish
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.