Call to a member function hasPageThemeGridFrameworkOffsetClasses() on null
Permalink
I am creating a custom theme by following the Theme Development Training youtube series. I was moving the header contents from default.php to header.php. That failed on getthemepath not found so I moved the code back into default.php and received this error. Code worked previously. I tried deactivating and re-installing my theme to no avail. I have no idea where to go from here. I am using version 5.7.5.9. Thanks in advance.
Bump
Take a look out how to the elemental theme includes the header.php file into default:
You shouldn't need to use getThemePath for including a php file, as that's what the built in $this->inc method is for.
Also check out the cloneamental theme (https://www.concrete5.org/marketplace/themes/cloneamental/... )
Its a great starting point for building a custom theme.
$this->inc('elements/header.php');
You shouldn't need to use getThemePath for including a php file, as that's what the built in $this->inc method is for.
Also check out the cloneamental theme (https://www.concrete5.org/marketplace/themes/cloneamental/... )
Its a great starting point for building a custom theme.
Thank you for responding. At this point I am just trying to get to working the way it was before. I have attached my source if anyone would be kind enough to take a look.
hasPageThemeGridFrameworkOffsetClasses() doesn't seem to be mentioned in that file. Perhaps you've still got it in an included file. Find it, see what object it's being applied to, and ensure that that object is being initialised or passed.
Whats the link to the video your watching?
I suggest you use some kind of code editor, if your on windows try Sublime Text. Currently your file has DOS line breaks at the end of every line (could be because it was saved as a .txt though).
I suggest you use some kind of code editor, if your on windows try Sublime Text. Currently your file has DOS line breaks at the end of every line (could be because it was saved as a .txt though).
This is part one: https://www.youtube.com/watch?v=a9iTASByiQM...
I may have found the problem. If I call localhost/index.php/ I get the error. If I call localhost/index.php/home, the page resolves correctly. Is this a configuration issue or an id10t issue?
Thanks for the multiple tips. I will be checking the all out.
I may have found the problem. If I call localhost/index.php/ I get the error. If I call localhost/index.php/home, the page resolves correctly. Is this a configuration issue or an id10t issue?
Thanks for the multiple tips. I will be checking the all out.
Another possible factor is .htaccess. You could have a very careful look in there to see if it's doing any URL rewriting.
Not unless concrete5 added it. This software seems to be anything but easy to use.
I think some of the settings in concrete5's SEO area in dashboard can change .htaccess. CPanel (if relevant) can also be used to change it.
We had a Japanese user who had exact same problem after upgrading from 5.7.4.x. to 5.7.5.8.
I fixed her problem by adding
to the page_theme.php even though your theme doesn't use grid system.
Those tutorial video was probably made pre 5.7.5.x, which did't have this problem,
I fixed her problem by adding
protected $pThemeGridFrameworkHandle = 'bootstrap3';
to the page_theme.php even though your theme doesn't use grid system.
Those tutorial video was probably made pre 5.7.5.x, which did't have this problem,
This one?:
<?php
namespace Concrete\Theme\Concrete;
class PageTheme extends \Concrete\Core\Page\Theme\Theme {
public function registerAssets() {
$this->providesAsset('css', 'core/frontend/*');
$this->requireAsset('javascript-conditional', 'html5-shiv');
$this->requireAsset('javascript-conditional', 'respond');
}
}
Where should the line be added? Thanks.
<?php
namespace Concrete\Theme\Concrete;
class PageTheme extends \Concrete\Core\Page\Theme\Theme {
public function registerAssets() {
$this->providesAsset('css', 'core/frontend/*');
$this->requireAsset('javascript-conditional', 'html5-shiv');
$this->requireAsset('javascript-conditional', 'respond');
}
}
Where should the line be added? Thanks.
put it after the registerAssets function:
And if this solves your problems I'd mark katz515 as the best answer.
<?php namespace Concrete\Theme\Concrete; class PageTheme extends \Concrete\Core\Page\Theme\Theme { public function registerAssets() { $this->providesAsset('css', 'core/frontend/*'); $this->requireAsset('javascript-conditional', 'html5-shiv'); $this->requireAsset('javascript-conditional', 'respond'); } protected $pThemeGridFrameworkHandle = 'bootstrap3'; }
And if this solves your problems I'd mark katz515 as the best answer.
Thanks but I am getting the same error after adding the above...
Did you clear the site cache? It may be loading the cached file.
Regrettably that did not help...
Can you zip your files up for us to look at?