Call to a member function hasPageThemeGridFrameworkOffsetClasses() on a non-object

Permalink
New to using 5.7 (5.7.5.2)

I followed the tutorialhttp://documentation.concrete5.org/developers/designing-for-concret... for making a theme from an existing html theme. The them has some old complex css, and div structure, but I don't think it should be effecting this.

When I add the editable area
<?php
    $a = new Area('Area Name');
    $a->display($c);
?>

it works fine, and creates the editable area. But, if I name the area 'Main' an area that already exists in the sample site, it returns the following error:
Call to a member function hasPageThemeGridFrameworkOffsetClasses() on a non-object


The only difference between the default.php that throws the error and the one that doesn't is the name of the area. Also it doesn't throw the error when added to an empty site.

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

I would look at this bug report.
https://www.concrete5.org/developers/bugs/5-7-5-2/haspagethemegridfr...
LordByron replied on at Permalink Reply
LordByron
Thank you for the quick reply. Of course I did see that bug report (that is officially marked as "not a bug"), I did search before posting. ;)

The "right answer" there is to upgrade to the new version of the theme, which doesn't really help when I'm just adding an editable area created from the tutorial, there isn't a new version to upgrade to, and it doesn't address the actual problem, it just means the theme creator solved it.

The last answer is a little more informative but it looks like it is still talking about the package theme that was in question. The tutorial didn't say anything about creating a page_theme.php so I don't have one.

As for the first "answer" on the bug report, I can't add anything to what the op said about how bad of an "answer" it was.

Other than using a different theme (which is just HTML and CSS so it shouldn't create PHP/SQL errors, I am just following the tutorial on creating theme, if I use an empty site (like Andrew does) it works, but if the site has content it breaks. Maybe I have done something wrong, but if the tutorial only works for creating a theme that can be applied to a new site, it has a problem. I have no idea what the new site might even do if I change the theme, will I be able to change back?

Is this a problem or a bug? Do I have to write some other file (page_theme.php) to make a theme? If I do, where is the tutorial for that?