Errors after installing a theme
Permalink
I'm new to concrete5, and I'm currently learning how to create my own theme.
I try to change different built-in themes by the following steps:
1. copy dark_chocolate from concrete/themes to application/themes
2. Go to dashboard => Themes
3. Install the theme, and activate the theme.
4. Back to home to see what happened.
But then the whole site shut down with the error message:
An unexpected error occurred.
An error occurred while processing this request.
I cannot debug since there's no useful information in the error message. I'm creating theme with a blank site which means no sample content in my site.
I just want to learn how to make a custom theme by knowing how to change themes first.
Am I missing anything?
Thank you very much for any suggestions!
I try to change different built-in themes by the following steps:
1. copy dark_chocolate from concrete/themes to application/themes
2. Go to dashboard => Themes
3. Install the theme, and activate the theme.
4. Back to home to see what happened.
But then the whole site shut down with the error message:
An unexpected error occurred.
An error occurred while processing this request.
I cannot debug since there's no useful information in the error message. I'm creating theme with a blank site which means no sample content in my site.
I just want to learn how to make a custom theme by knowing how to change themes first.
Am I missing anything?
Thank you very much for any suggestions!
Are you using version 5.7.0 or 5.7.0.1?
5.7.0
any difference?
thx!
any difference?
thx!
Some folk have had similar issues with unexpected theme installing, 5.7 is still buggy to I would try the upgrade to eliminate that first.
I re-installed with 5.7.0.1 version, but the same error happened.
Installed themes successfully, but error happened after activating.
Installed themes successfully, but error happened after activating.
Only theme you could try modifying is the 'Elements' theme with 5.7 I think.
I copied 'Elements' theme, give it a new name, change the description.txt file.
Then I cannot open the 'Pages &Themes' in dashboard anymore...
An unexpected error occurred.
An error occurred while processing this request.
Even if I removed the copied folder...
Then I cannot open the 'Pages &Themes' in dashboard anymore...
An unexpected error occurred.
An error occurred while processing this request.
Even if I removed the copied folder...
Have you removed the themes from the directory before uninstalling from the dashboard?
Hi, I have a similar problem. To remove new theme delete record from the database (pagethemes).
If you set debugging to show on page you will se the error, Call to a member function getPageThemeGridFrameworkRowStartHTML() on a non-object It was supposed to have been fixed in 5.7.0.1 but it is still happening.
It's something to do with a class file and the $ptThemeGridFrameworkHandle = 'bootstrap3'but it is still a secret how to do it
It's something to do with a class file and the $ptThemeGridFrameworkHandle = 'bootstrap3'but it is still a secret how to do it
Hi, thanks.
I remove the theme files and records in PageThemes table.
Now I can open Pages & Themes in dashboard without any error.
But once I want to create a custom theme, the same error happen.
So.. what should I do to try my first theme?
I'm just start to learn how to build my custom theme.
I remove the theme files and records in PageThemes table.
Now I can open Pages & Themes in dashboard without any error.
But once I want to create a custom theme, the same error happen.
So.. what should I do to try my first theme?
I'm just start to learn how to build my custom theme.
OK this may be a bit lengthy but I have detailed everything I did to try and ensure you don't get any problems..
Copy the elemental theme into 'application/themes' directory.
Rename the folder from elemental to something like ‘my_new_theme’
Go into the theme and keep the 'css', 'elements' and 'images' folders (good to have but not required).
Get rid of all other files apart from 'default.php', 'description.txt', 'full.php' (again good to have) and 'view.php'
Change your 'description.txt' to something like
'full.php' just includes 'default.php' and 'view.php' just includes the 'header.php' and 'footer.php' elements and prints the content so we really only have to edit 'default.php' and the elements
Open 'default.php' and remove
This appears after each new area and will throw an error if you keep it in. We may as well keep the areas in so we have something to test on install.
Now jump into your 'elements/header.php' and remove everything apart from
Hop into 'elements/footer.php' and remove everything apart from
Leave 'elements/header_top.php' alone apart from removing
And replacing with
This will give you an unmodified version of bootstrap
Leave 'elements/footer_bottom.php' alone
Go into css directory and remove 'styles.xml' and 'presets' directory (if you want your theme to have customisable styles look these up and add back in later) also remove 'bootstrap-modified.css'
Open main.less and remove everything apart from
Jump into 'css/build' and remove 'blocks', 'custom-design-classes', 'fonts' and 'mobile directories' also remove all the '.less' files apart from 'body.less'
Open 'css/build/body.less' and delete everything
And finally remove everything from the 'images' directory
Swing over to the themes dashboard, install and activate.
This will give you a very bare bones theme but you can always reference back and put things back in if you want. Also as a note your new theme as is doesn't make use of anything from bootstrap yet.
Fingers crossed!!
Copy the elemental theme into 'application/themes' directory.
Rename the folder from elemental to something like ‘my_new_theme’
Go into the theme and keep the 'css', 'elements' and 'images' folders (good to have but not required).
Get rid of all other files apart from 'default.php', 'description.txt', 'full.php' (again good to have) and 'view.php'
Change your 'description.txt' to something like
My New Theme This is my new theme
'full.php' just includes 'default.php' and 'view.php' just includes the 'header.php' and 'footer.php' elements and prints the content so we really only have to edit 'default.php' and the elements
Open 'default.php' and remove
$a->enableGridContainer();
This appears after each new area and will throw an error if you keep it in. We may as well keep the areas in so we have something to test on install.
Now jump into your 'elements/header.php' and remove everything apart from
Hop into 'elements/footer.php' and remove everything apart from
Leave 'elements/header_top.php' alone apart from removing
<link rel="stylesheet" type="text/css" href="<?php echo $this->getThemePath()?>/css/bootstrap-modified.css">
And replacing with
<?php echo $html->css($view->getStylesheet('build/bootstrap-3.2.0/bootstrap.less'))?>
This will give you an unmodified version of bootstrap
Leave 'elements/footer_bottom.php' alone
Go into css directory and remove 'styles.xml' and 'presets' directory (if you want your theme to have customisable styles look these up and add back in later) also remove 'bootstrap-modified.css'
Open main.less and remove everything apart from
@import "build/body.less";
Jump into 'css/build' and remove 'blocks', 'custom-design-classes', 'fonts' and 'mobile directories' also remove all the '.less' files apart from 'body.less'
Open 'css/build/body.less' and delete everything
And finally remove everything from the 'images' directory
Swing over to the themes dashboard, install and activate.
This will give you a very bare bones theme but you can always reference back and put things back in if you want. Also as a note your new theme as is doesn't make use of anything from bootstrap yet.
Fingers crossed!!
Hi kieranrushby
Thanks for you're elaborated description there is however one small problem I'm having at the end. I can't actually get on the theme's page because every page gives an error :(. I have not yet figured out how to restore that after trying to install a custom theme
Thanks for you're elaborated description there is however one small problem I'm having at the end. I can't actually get on the theme's page because every page gives an error :(. I have not yet figured out how to restore that after trying to install a custom theme
I suggest maybe a fresh install to clear the errors your getting on the themes page or clean up the pagethemes table mentioned above to try and resolve the error then try again.
Hi all,
The above ended up throwing me an error, also. After some playing around, I discovered the culprit to be in default.php:
I'm still new to C5, but it seems that naming that there's something particular about the naming conventions for areas that I'm not quite privy to. Renaming the area to "Main Content" instead of "Main" solved the error for me:
Hope this helps those in similar situations!
The above ended up throwing me an error, also. After some playing around, I discovered the culprit to be in default.php:
<?php $a = new Area('Main'); $a->display($c); ?>
I'm still new to C5, but it seems that naming that there's something particular about the naming conventions for areas that I'm not quite privy to. Renaming the area to "Main Content" instead of "Main" solved the error for me:
<?php $a = new Area('Main Content'); $a->display($c); ?>
Hope this helps those in similar situations!
v5.7.0.1
Copied dark_chocolate to the /themes folder and renamed it biff, changing also the description.txt file. Installed it and received the following error:
ReflectionException thrown with message "Class helper/concrete/scrapbook does not exist"
Stacktrace:
#17 ReflectionException in /hsphere/local/home/fishing/xxxx/concrete5/concrete/vendor/illuminate/container/Illuminate/Container/Container.php:501
#16 ReflectionClass:__construct in /hsphere/local/home/fishing/xxxx/concrete5/concrete/vendor/illuminate/container/Illuminate/Container/Container.php:501
#15 Illuminate\Container\Container:build in /hsphere/local/home/fishing/xxxx/concrete5/concrete/vendor/illuminate/container/Illuminate/Container/Container.php:425
#14 Illuminate\Container\Container:make in /hsphere/local/home/fishing/xxxx/concrete5/concrete/src/Support/Facade/Facade.php:113
#13 Concrete\Core\Support\Facade\Facade:__callStatic in /hsphere/local/home/fishing/xxxx/concrete5/concrete/src/Legacy/Loader.php:23
#12 Concrete\Core\Support\Facade\Application:make in /hsphere/local/home/fishing/xxxx/concrete5/concrete/src/Legacy/Loader.php:23
#11 Concrete\Core\Legacy\Loader:helper in /hsphere/local/home/fishing/xxxx/concrete5/concrete/src/Block/Block.php:59
#10 Concrete\Core\Block\Block:getByName in /hsphere/local/home/fishing/xxxx/concrete5/application/themes/biff/elements/header.php:32
#9 include in /hsphere/local/home/fishing/xxxx/concrete5/concrete/src/View/View.php:56
#8 Concrete\Core\View\View:inc in /hsphere/local/home/fishing/xxxx/concrete5/application/themes/biff/full.php:3
#7 include in /hsphere/local/home/fishing/xxxx/concrete5/concrete/src/View/View.php:153
#6 Concrete\Core\View\View:renderViewContents in /hsphere/local/home/fishing/xxxx/concrete5/concrete/src/View/AbstractView.php:123
#5 Concrete\Core\View\AbstractView:render in /hsphere/local/home/fishing/xxxx/concrete5/concrete/src/Routing/DispatcherRouteCallback.php:20
#4 Concrete\Core\Routing\DispatcherRouteCallback:sendResponse in /hsphere/local/home/fishing/xxxx/concrete5/concrete/src/Routing/DispatcherRouteCallback.php:152
#3 Concrete\Core\Routing\DispatcherRouteCallback:execute in /hsphere/local/home/fishing/xxxx/concrete5/concrete/src/Application/Application.php:284
#2 Concrete\Core\Application\Application:dispatch in /hsphere/local/home/fishing/xxxx/concrete5/concrete/bootstrap/start.php:245
#1 require in /hsphere/local/home/fishing/xxxx/concrete5/concrete/dispatcher.php:36
#0 require in /hsphere/local/home/fishing/xxxx/concrete5/index.php:2
Edit: So the question is why getByName() is trying to load 'helper/concrete/scrapbook' (/concrete/src/Block/Block.php line 59)?
Copied dark_chocolate to the /themes folder and renamed it biff, changing also the description.txt file. Installed it and received the following error:
ReflectionException thrown with message "Class helper/concrete/scrapbook does not exist"
Stacktrace:
#17 ReflectionException in /hsphere/local/home/fishing/xxxx/concrete5/concrete/vendor/illuminate/container/Illuminate/Container/Container.php:501
#16 ReflectionClass:__construct in /hsphere/local/home/fishing/xxxx/concrete5/concrete/vendor/illuminate/container/Illuminate/Container/Container.php:501
#15 Illuminate\Container\Container:build in /hsphere/local/home/fishing/xxxx/concrete5/concrete/vendor/illuminate/container/Illuminate/Container/Container.php:425
#14 Illuminate\Container\Container:make in /hsphere/local/home/fishing/xxxx/concrete5/concrete/src/Support/Facade/Facade.php:113
#13 Concrete\Core\Support\Facade\Facade:__callStatic in /hsphere/local/home/fishing/xxxx/concrete5/concrete/src/Legacy/Loader.php:23
#12 Concrete\Core\Support\Facade\Application:make in /hsphere/local/home/fishing/xxxx/concrete5/concrete/src/Legacy/Loader.php:23
#11 Concrete\Core\Legacy\Loader:helper in /hsphere/local/home/fishing/xxxx/concrete5/concrete/src/Block/Block.php:59
#10 Concrete\Core\Block\Block:getByName in /hsphere/local/home/fishing/xxxx/concrete5/application/themes/biff/elements/header.php:32
#9 include in /hsphere/local/home/fishing/xxxx/concrete5/concrete/src/View/View.php:56
#8 Concrete\Core\View\View:inc in /hsphere/local/home/fishing/xxxx/concrete5/application/themes/biff/full.php:3
#7 include in /hsphere/local/home/fishing/xxxx/concrete5/concrete/src/View/View.php:153
#6 Concrete\Core\View\View:renderViewContents in /hsphere/local/home/fishing/xxxx/concrete5/concrete/src/View/AbstractView.php:123
#5 Concrete\Core\View\AbstractView:render in /hsphere/local/home/fishing/xxxx/concrete5/concrete/src/Routing/DispatcherRouteCallback.php:20
#4 Concrete\Core\Routing\DispatcherRouteCallback:sendResponse in /hsphere/local/home/fishing/xxxx/concrete5/concrete/src/Routing/DispatcherRouteCallback.php:152
#3 Concrete\Core\Routing\DispatcherRouteCallback:execute in /hsphere/local/home/fishing/xxxx/concrete5/concrete/src/Application/Application.php:284
#2 Concrete\Core\Application\Application:dispatch in /hsphere/local/home/fishing/xxxx/concrete5/concrete/bootstrap/start.php:245
#1 require in /hsphere/local/home/fishing/xxxx/concrete5/concrete/dispatcher.php:36
#0 require in /hsphere/local/home/fishing/xxxx/concrete5/index.php:2
Edit: So the question is why getByName() is trying to load 'helper/concrete/scrapbook' (/concrete/src/Block/Block.php line 59)?
I've been playing with 5.7 and watching the videos Andy has done. I have now got my head around the basics. Three of my custom themes run perfectly, apart from customisation.
If you want to try installing and playing with good old GY, I've attached to download. just put it in the application/themes folder.
If you want to try installing and playing with good old GY, I've attached to download. just put it in the application/themes folder.
Another issue that was reported previously occurs with your greek_yogurt:
Whoops\Exception\ErrorException thrown with message "Call to a member function getPageThemeGridFrameworkRowStartHTML() on a non-object"
Stacktrace:
#0 in /hsphere/local/home/fishing/xxxx/concrete5/concrete/blocks/core_area_layout/view_grid.php:9
Edit:
Interesting that the function called immediately prior to return the ThemeGridFrameworkObject (getThemeGridFrameworkObject) is able to return randomness if there is no handle. Why is it doing that here?
Whoops\Exception\ErrorException thrown with message "Call to a member function getPageThemeGridFrameworkRowStartHTML() on a non-object"
Stacktrace:
#0 in /hsphere/local/home/fishing/xxxx/concrete5/concrete/blocks/core_area_layout/view_grid.php:9
Edit:
Interesting that the function called immediately prior to return the ThemeGridFrameworkObject (getThemeGridFrameworkObject) is able to return randomness if there is no handle. Why is it doing that here?
it is missing page_theme.php
As in /concrete/themes/concrete/page_theme.php? Does not seem to help. But I am just throwing darts in the dark, as I have not poked around at this code yet.
Edit:
So it seems like supportsGridFramework() is ignored when rendering Areas, which have their own flag in a db table. Why would that be?
Edit:
So it seems like supportsGridFramework() is ignored when rendering Areas, which have their own flag in a db table. Why would that be?
So the real problem seems to be that if a theme supports this grid thing (like the Elements theme), then any Area created has that flag checked in the Area db table. So if you switch to another theme that does not support grids, you are hosed.
So do not install the sample site, always start with a blank one. Also, don't create any content while using a theme that supports grids if you ever want to change in the future to one that does not.
So do not install the sample site, always start with a blank one. Also, don't create any content while using a theme that supports grids if you ever want to change in the future to one that does not.
As long as you have page_theme.php when you install your theme you can add to it later. It does seem a little tricky to make a theme that you can switch to if you aleady have Elemental installed. I tried a little to get one to work with the sample content but kept running into problems and moved on to other things. I guess you could rename Elemental and use it as a template and if you had everything from Elementals page_theme.php and had all of the area names that Elemental uses it might work. Starting with an empty site all goes together pretty easily.
Have you added this to the bug tracker? It sounds like a real usability error that will hinder developers and clients from using the CMS well.
I've added the bug.
http://www.concrete5.org/developers/bugs/5-7-0-1/once-an-area-is-gi...
http://www.concrete5.org/developers/bugs/5-7-0-1/once-an-area-is-gi...
Hello, try to add to the line in your page_theme.php
;
protected $pThemeGridFrameworkHandle = 'bootstrap3'
changed
namespace Concrete\Theme\Yourthemename;
in page_theme.php and change references to elements in other doc to your theme name seemed to work for me
namespace Concrete\Theme\Yourthemename;
in page_theme.php and change references to elements in other doc to your theme name seemed to work for me