Error: Call to undefined method Concrete\Core\File\Image\Thumbnail\Type\Type::setName() [Resolved]

Permalink 1 user found helpful
I have a new install of 5.8 and when I install the Stucco theme, I get the above error.. The result is no pages; just a while home page.

Did I do something incorrectly?

Many thanks...

Todd

rtcary
 
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi rtcary,

I just downloaded and installed Stucco 1.1.3 on concrete5 8.0.3.

It threw two errors:
1. Call to a member function getTreeNodeTypeClass() on null
packages\theme_stucco\content.xml
- lines 4963 and 4968, "topic_category" should be "category"
change this:
<topic_category name="Reviews" default="1">
   <topic name="Gadgets"/>
   <topic name="Movies"/>
   <topic name="Books"/>
   <topic name="Music"/>
</topic_category>

to this:
<category name="Reviews" default="1">
   <topic name="Gadgets"/>
   <topic name="Movies"/>
   <topic name="Books"/>
   <topic name="Music"/>
</category>

2. Call to a member function isLoggedIn() on null
packages\theme_stucco\themes\stucco\inc\header.php
- line 32, I don't believe global $u is available
change this:
<div class="global-navi<?php   global $u; if ( $u -> isLoggedIn() ) { echo ' login'; } ?>">

to this:
<div class="global-navi<?php $u = new User(); if ($u -> isLoggedIn()) { echo ' login'; } ?>">

It did not throw a Call to undefined method Concrete\Core\File\Image\Thumbnail\Type\Type::setName() error.
rtcary replied on at Permalink Reply
rtcary
I made those changes and I still have the same error.

I removed the Theme and then ftp'd the updated theme followed by a reinstall.

Error:

Call to undefined method Concrete\Core\File\Image\Thumbnail\Type\Type::setName()

Any debugging suggestions? A way to find where C5 goes off the rails?

Todd
MrKDilkington replied on at Permalink Reply
MrKDilkington
@rtcary

Starting with an empty site, and then installing Stucco, I received the Type errors.

In the Stucco package controller (controller.php), do a search and replace:
packages\theme_stucco\controller.php
- search for this:
$type = new \Concrete\Core\File\Image\Thumbnail\Type\Type();

- replace with this:
$type = new \Concrete\Core\Entity\File\Image\Thumbnail\Type\Type();
rtcary replied on at Permalink Reply
rtcary
Now I got a new error:

Call to a member function getTreeNodeTypeClass() on null

Is there something wrong with my new C5.8 or me?

I'll do a search for getTreeNodeTypeClass() and see what comes up. However, my knowledge of the inner workings of C5 is quite limited.

Merry Christmas...

Todd
MrKDilkington replied on at Permalink Reply
MrKDilkington
@rtcary

In addition to the Type error fix, you have to apply these two fixes:
https://www.concrete5.org/community/forums/themes/error-call-to-unde...
rtcary replied on at Permalink Reply
rtcary
I just reinstalled C5.8 and had it install the default theme since the first time I selected to have it blank; I had planned on going straight to Stucco. Not sure if this makes a difference, especially due to the fact that I select to have Concrete5 to clean the existing theme before installing Stucco.

I'll give it a try tomorrow.

Thank you for the assistance....

Todd
rtcary replied on at Permalink Reply
rtcary
Success!!

Many thanks, and have a great New Year.

Todd Cary