Error Message for URL
Permalink 1 user found helpful
When I select my URL on my projects, I receive the following error message:
<link rel="stylesheet" media="screen" type="text/css" href="<br /> <b>Fatal error</b>: Call to a member function getPackageHandle() on a non-object in <b>/home/c5host/msm_versions/032113/concrete/core/libraries/view.php</b> on line <b>105</b><br />
I just started with Concrete5 and purchased a theme today. I'm eager to get started.
Thanks.
<link rel="stylesheet" media="screen" type="text/css" href="<br /> <b>Fatal error</b>: Call to a member function getPackageHandle() on a non-object in <b>/home/c5host/msm_versions/032113/concrete/core/libraries/view.php</b> on line <b>105</b><br />
I just started with Concrete5 and purchased a theme today. I'm eager to get started.
Thanks.
For a quick fix, you could move your style.css to your_root/css/, then use one of the following examples where appropriate.
I would try removing and re-installing the theme. I don't believe this kind of error can be fixed by re-locating a css file. What theme did you purchase? You should ask the developer of the theme for help.
mhawke, pardon my candor, I think your answer has no merit. Why don't you think that moving the file to your_root/css will fix the problem? Did you try it? The problem here concerns the URL, according to snowhook.
snowhook, try replacing getPackageHandle() with getThemePath(), as seen in the following example.
If I were you, though, I'd certainly try out one of my first suggestions.
snowhook, try replacing getPackageHandle() with getThemePath(), as seen in the following example.
<link href="<?php echo $this->getThemePath(); ?>/css/style.css" rel="stylesheet" type="text/css" />
If I were you, though, I'd certainly try out one of my first suggestions.
Just in case anyone finds this page after searching for something like "PHP Fatal error: Call to a member function getPackageHandle() on a non-object in ... concrete/core/libraries/view.php on line 124" try this:
As suggested by McCormick above, this particular failure is down to the inability of the system to find and load the theme's CSS file. In my case this was because I had removed all the default themes then installed my own. What I hadn't appreciated, being fairly new to concrete5, is that after installing, a theme has to be activated (blue button on the Themes page). Because the theme had not been activated, the system could not find its CSS file, and threw the error. Simples!
As suggested by McCormick above, this particular failure is down to the inability of the system to find and load the theme's CSS file. In my case this was because I had removed all the default themes then installed my own. What I hadn't appreciated, being fairly new to concrete5, is that after installing, a theme has to be activated (blue button on the Themes page). Because the theme had not been activated, the system could not find its CSS file, and threw the error. Simples!
Thanks for that, spot on. A quick solutions is to go to yoururl/index.php/dashboard and then you can activate the theme.