HELP! Site crashed when adding favicons

Permalink 2 users found helpful
I am using 5.7.2.1 and I was added the various favicon sizes and when I loaded the .ico file to my file manager the site crashed. It doesn't matter what browser I try I get the same message. "An unexpected error occurred.
Call to a member function getRelativePath() on a non-object"

I can't get into the dashboard to see the logs and I was not able to make a backup just yet. Does anyone know how to get out of this jam?

Thanks

1 Attachment

jmnino
 
Mnkras replied on at Permalink Reply
Mnkras
Could you possibly share the icon(s)?

If you have any logs that would be helpful also.
jmnino replied on at Permalink Reply
jmnino
So I dug into the database and pulled these two reoccurring errors:
This code is the one i get the most
Exception Occurred: /home/yspuco5/public_html/concrete/elements/header_required.php:126 Call to a member function getRelativePath() on a non-object (1)

Here is the code snippet for this issue:
<link rel="shortcut icon" href="<?php echo $f->getRelativePath()?>" type="image/x-icon" />

I got this one just once I belive.
Exception Occurred: /home/yspuco5/public_html/concrete/controllers/backend/user_interface/block.php:33 Call to a member function setBlockAreaObject() on a non-object (1)

Here is the code snippet for this issue:
$b->setBlockAreaObject($a); // set the original area object
Mnkras replied on at Permalink Reply
Mnkras
Im wondering if the file didn't full upload but c5 thinks it did...

Either way, we need to add some checks in there.
Mnkras replied on at Permalink Best Answer Reply
Mnkras
To disable the favicons go to

/application/config/generated_overrides/concrete.php

and remove the lines

'favicon_fid' => '18',
'iphone_home_screen_thumbnail_fid' => '18',
'modern_tile_thumbnail_fid' => '18',
'modern_tile_thumbnail_bgcolor' => ''
jmnino replied on at Permalink Reply
jmnino
That did the trick! Thank you so much. So by editing those lines will i be able to use favicon? i also went ahead and deleted the images i uploaded.
Mnkras replied on at Permalink Reply
Mnkras
Yea you should be fine, the next version will have additional checks

On Fri, Nov 28, 2014, 1:02 PM concrete5 Community <
discussions@concretecms.com> wrote:
rainbow replied on at Permalink Reply
Your Solution saved me a lot of distress. Was about to give up, thinking I would need to start all over again! My issue happened when I tried to delete the current image and upload a new app icon. I selected it and it listed "delete" as an option and that ruined it. It seems that 5.7 allows you to delete images when selecting an image without even confirming if you want to go ahead. This then causes the error that no file can be found and locks me out of the site. Happened on another occasion. I hope this can be fixed in the next update. I don't know how to stop clients from doing this and then having the site break down every time. I think it is really silly to have the option to delete a file when clicked and then it causes error :( Do you have any advice around this?
Mnkras replied on at Permalink Reply
Mnkras
Yep, in the next version, there are additional checks to make sure that even if files are deleted, that it won't break the site.
rainbow replied on at Permalink Reply
Thanks for your feedback. That would be great. I am so worried about managing this with my client. Hope the update comes through soon :)
whollands replied on at Permalink Reply
whollands
Thank you so much! One of the sites I run had been down for a couple of hours due to this problem, and I had disabled error messages so had no idea where to start fixing!

Luckily a dig around in the database came up with the error message described above and the site is back up and running now 😀