Uneditable page

Permalink
Hi all,

I built a site for a friendhttp://www.ragsriches.co.uk, which is going well. However back when Concrete was at v5.3 I added a ticker to the home page in an html block.

This survived up until the v5.4.2 upgrade at which point it now only appears in IE7. Newer browsers do not display it. I was going to take a look at the code to see if I could figure out the problem, but I now find that the edit button does not work on the homepage. It is functional for all other pages, and I am logged in as administrator.

Has anyone got any idea how I can restore the ability to edit the home page?

Please PM me if you need a login to help diagnose the issue.

Thanks

Iain

 
icowden replied on at Permalink Reply
Ok - an update.

I aw using a jquery news ticker. The html is:-

<div id="ticker-wrapper" class="no-js">
   <ul id="js-news" class="js-hidden">
      <li class="news-item"><a href="#">School or Youth Theatre Group?</a></li>
      <li class="news-item"><a href="mailto:enquiries@ragsriches.co.uk">E-mail us to perform Rags to Riches now! </a></li>
   </ul>
</div>


It appears that this doesn't want to work with concrete 5 for some reason (the code itself works with all browsers). The javascript is uploaded to my themes directory and is loaded in the theme template.

Iain

Javascript:-
js-news
/*
    jQuery News Ticker is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, version 2 of the License.
    jQuery News Ticker is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    You should have received a copy of the GNU General Public License
    along with jQuery News Ticker.  If not, see <http://www.gnu.org/licenses/>.
*/
(function($){  
   $.fn.ticker = function(options) { 
      // Extend our default options with those provided.
      // Note that the first arg to extend is an empty object -


js-site
$(function () {
     // start the ticker 
   $('#js-news').ticker();
   // hide the release history when the page loads
   $('#release-wrapper').css('margin-top', '-' + ($('#release-wrapper').height() + 20) + 'px');
   // show/hide the release history on click
   $('a[href="#release-history"]').toggle(function () {   
      $('#release-wrapper').animate({
         marginTop: '0px'
      }, 600, 'linear');
   }, function () {
      $('#release-wrapper').animate({
         marginTop: '-' + ($('#release-wrapper').height() + 20) + 'px'
      }, 600, 'linear');
   });
JohntheFish replied on at Permalink Reply
JohntheFish
You could be able to get to the dashboard directly
(yoursite.com/login and then yoursite.com/dashboard )

Once there, in the sitemap you can revert the version of the home page to a version before the html block with the ticker in it.

Another possibility is to hack the database using phpMyAdmin to find the content of the offending html block in the database and set the html block content to " ". On a brief inspection of C5 code, it looks like the table you want is 'btContentLocal' and the field name 'content' (table seems to be shared by at least both the content block and the html block). If you do this, backup the database first!!

If you try to add the block again, put the script inside something like:
if (CCM_EDIT_MODE){
document.write('<p>SCRIPT INSIDE - EDIT AT EXTREME PERIL</p>'); 
} else { 
// YOUR SCRIPT HERE
}

This will stop it running in edit mode, so less likely to break edit.
icowden replied on at Permalink Reply
hi John,

I managed to remove the offending block using IE7. The question is, how do I find out what is in the block that was:-

a) Preventing it displaying
b) Preventing activation of edit mode

and fix it?

Iain
JohntheFish replied on at Permalink Best Answer Reply
JohntheFish
The easy solution is to not worry.

If the ticker code does not need to interact with anything else on the page, you could just put it inside an iframe (script and html). This will protect the rest of the page from the content of the iframe.

There are a couple of free iframe add-ons in the marketplace.