Can't edit pages.

Permalink
can someone tell me why I can't edit any page?Here is the code from my default page.

<?php $view->inc('elements/header.php'); ?>
<?php
$a = new Area('Content');
if (($a->getTotalBlocksInArea($c) > 0) || ($c->isEditMode())) {
?>
<div class="container-fluid">
   <div class="row">
      <div class="col-md-12 zero">
         <?php $a->display($c); ?>
      </div>
   </div>
   <div class="row blue-box">
      <?php $a->display($c); ?>
   </div>
   <header>



code from page_theme
 
<?php
namespace Concrete\Theme\Concrete;
class PageTheme extends \application\themes\tr
{
public function registerAssets() {
$this->requireAsset('javascript', 'jquery');
$this->providesAsset('javascript', 'bootstrap/*');
$this->providesAsset('css', 'bootstrap/*');
$this->requireAsset('css', 'font-awesome');
}
protected $pThemeGridFrameworkHandle = 'bootstrap3';

}

 
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi garyb10,

What is the name of your theme and where is it located?

The main problem I see is that you are attempting to display areas without creating them first.
<?php $a->display($c); ?>

When you create new Area objects, they need a name that is unique to each area.
Example:
<?php
$a = new Area('Main');
$a->display($c);
?>
garyb10 replied on at Permalink Reply
Hi,
That made things worst. Now the icons on the tool bar and the edit areas disappear.
Here is the changed code.
<?php $view->inc('elements/header.php'); ?>
<?php
$a = new Area('Content');
if (($a->getTotalBlocksInArea($c) > 0) || ($c->isEditMode())) {
?>
<div class="container-fluid">
   <div class="row">
      <div class="col-md-12 zero">
         <?$a = new Area('Slider');
          $a->display($c); ?>
      </div>
   </div>
   <div class="row blue-box">
      <?php $a = new Area('Blue');
       $a->display($c); ?>
MrKDilkington replied on at Permalink Reply
MrKDilkington
Your example code has errors in it.

I recommend reading the documentation on theme building.
https://www.concrete5.org/documentation/developers/5.7/designing-for...

It would also be useful to look at how the default Elemental theme is constructed.

If you want to zip up your theme and attach it in a reply, I can look at it.
garyb10 replied on at Permalink Reply 1 Attachment
Hi, Thanks for the help. I have attached a zip with the files.

Here is what it suppose to be in the end;

http://1900tr.com/test/
MrKDilkington replied on at Permalink Reply 1 Attachment
MrKDilkington
I have attached a working copy of your theme.

I commented the code that was causing the editing interface to break.
garyb10 replied on at Permalink Reply
Thank for all the help. Looks like I was trying to put more then I should of into the default page. I should of gone back to doing it the 5.6 and below way and just added names for the areas.

I am now getting this error.

Call to a member function hasPageThemeGridFrameworkOffsetClasses()
MrKDilkington replied on at Permalink Reply
MrKDilkington
What action preceded the error?

I am not sure what the exact nature of the error is, but there is an open bug tracker issue for it. I recommend voting on it.
https://www.concrete5.org/developers/bugs/5-7-5-2/haspagethemegridfr...
garyb10 replied on at Permalink Reply
I tried that patch and the editor disappeared. Guess i will have to wait until the next version.