Admin bar gone!

Permalink
I'm using Concrete5 5.7 (Elemental theme) and the edit bar has just disappeared on one of my pages. Have tried clearing cache, logging out and in, but the edit bar is still not there. Only happening on one page though.

I have seen posts on this in the discussion. Did anyone find out how to fix it?

Cheers
p

 
PJSAndo replied on at Permalink Reply
OK, I've sort of figured out what the problem is here.

I cleared the cache and revisited the page. Initially, the admin bar was there, and as the page loaded the admin bar disappeared. So it must be something in the page that is conflicting and making the admin bar disappear. I have a Google My Maps embedded within the page, and I think it might be that.

However, much of the code used to produce the page was put in a php block. As far as I can see, however, without the admin bar there is no way to edit the contents of the inserted php block. If this is the case and I have to re-write code then it looks like Joomla...:(
edbeeny replied on at Permalink Reply
edbeeny
The only time I have experienced an issue with the edit bar is when I have made a mistake within some javascript.

Inspect the element within your browser and see if any errors show.
PJSAndo replied on at Permalink Reply
OK, so with only JS errors ticked in the console window I get one error. But I've got no idea what it means !

"KL.CB DocumentNotifier.onLoadDocument exc: Unknown window"
PJSAndo replied on at Permalink Reply
BTW the page ishttp://gotimetrekkers.com/concrete5/index.php/tour/test2...

The space for the admin button is there but the buttons are absent...

I'm really struggling with this, so if anyone can help with the specifics of how to solve this that would be greatly appreciated!

Thanks
P
MrKDilkington replied on at Permalink Reply
MrKDilkington
@PJSAndo

"the edit bar has just disappeared on one of my pages"

Can you remember what you last did before the edit bar disappeared?

BTW, because you are adding code directly into Php Code Block blocks instead of PHP files - are you saving copies of the code somewhere?

What you are making is very fragile and hard to debug when things go wrong. I think it might be time to consider using blocks and single pages to add features instead of inlining the code.
PJSAndo replied on at Permalink Reply
Thanks.
I managed to get it back to a working version.

Yes it does feel as you said fragile but as a newbie I couldn't figure out a better way to get things going, considering that all much of the data are dynamic and pulled in from an external site and linked to an external site.

For example, I have the php code below which displays my page herehttp://gotimetrekkers.com/concrete5/index.php/tour/test2.... The code is simply inserted into a php block that has been dragged into the Main area of the page.

What steps would you suggest to get the same page but in a more stable way?

I'm guessing that I should create custom blocks/stacks for each section of the page (page type). Let's say I wanted to create custom blocks that would display the Tour name and Tour image etc (using php) how would I go about this? I did try to create separate blocks but had a problem with using 'include' multiple times

Thanks

<div class="container">
   <div class="row">
      <div class="col-sm-8">
            <?php 
            include_once("config.php");
            include_once('tourcms.php');
            $tc = new TourCMS($marketplace_account_id, $api_private_key, 'simplexml');
            $result = $tc->show_tour(xx, xxxx);
            $tour = $result->tour;
         ?>
         <h1>
         <?php 
            echo $tour->tour_name.'';
         ?>
         </h1>