Site crash | Call to a member function getURL() on a non-object
Permalink Browser Info Environment
I'm getting an: "An unexpected error occurred. Call to a member function getURL() on a non-object" (screenshot:http://screencast.com/t/oiAEsgbkf)...
This happened when I added a image block, <saved> then deleted same image block a few minutes later after publishing.
Thanks,
Mark
This happened when I added a image block, <saved> then deleted same image block a few minutes later after publishing.
Thanks,
Mark
Type: | Ticket |
---|---|
Status: | Archived |
Hi.
Regarding this issue I tried rolling it back. At first it wouldn't let me access versioning. I changed the theme and was able to roll it back. But when I changed the theme back I got the same error message again. Tried it twice.
If I uninstall & reinstall Fundamental is there a way to retain the customized settings?
Thanks,
Mark
Regarding this issue I tried rolling it back. At first it wouldn't let me access versioning. I changed the theme and was able to roll it back. But when I changed the theme back I got the same error message again. Tried it twice.
If I uninstall & reinstall Fundamental is there a way to retain the customized settings?
Thanks,
Mark
I've continued the discussion at 5.7 Discussion Forums as requested.https://www.concrete5.org/community/forums/5-7-discussion/site-crash...
Some are suggesting this is a Fundamental theme related issue. Can you help or join in the discussion?
Thanks,
Mark
Some are suggesting this is a Fundamental theme related issue. Can you help or join in the discussion?
Thanks,
Mark
@c5hub can you take a look into this. The error that was posted at https://www.concrete5.org/community/forums/5-7-discussion/site-crash... seems to indicate a problem with one of the theme blocks.
Our first assumption based on the description of the support ticket was this was related to the core image block. Reading your community forum post this sounds like this may not be the root cause of your issues. We will investigate further and let you know what we discover. .
Thanks.
Thanks.
We have been looking at the code in the section block controller and the test to see if an image has been set looks appropriate. May I ask, did you delete any images from your file manager? It seems that maybe the background image is set in the section block but the file no longer exists in the file manager.
Hi,
Yes. Right after the crash, I went to the file manager and deleted the JPG. Troubleshooting, I uploaded the same JPG later.
Something else that may be helpful. In the Dashboard, I don't get a response when I select Settings. However, when I activate a different theme, I can access Settings and rollback to an earlier version. But when I switch back to Fundamental I still get the same error message.
Thanks,
Mark
Yes. Right after the crash, I went to the file manager and deleted the JPG. Troubleshooting, I uploaded the same JPG later.
Something else that may be helpful. In the Dashboard, I don't get a response when I select Settings. However, when I activate a different theme, I can access Settings and rollback to an earlier version. But when I switch back to Fundamental I still get the same error message.
Thanks,
Mark
The issue here sounds like you had a problem with adding/deleting a core image block and then you deleted an image which was also used in a section block on your page. As the images are assigned by ID and not name, re-uploading this would not fix the issue.
It seems as though this section block in now left in limbo with an image assigned that no longer exists, hence the error you can see.
Had you done much work to the site before the error? Uninstalling the theme and re-installing may solve the issue but any changes you had made would be lost.
It seems as though this section block in now left in limbo with an image assigned that no longer exists, hence the error you can see.
Had you done much work to the site before the error? Uninstalling the theme and re-installing may solve the issue but any changes you had made would be lost.
To get your site back up and running, we may just have a solution - this will involve amending a file in the package.
If you could open this file
Then online 152 change...
to...
This may get your site back up and running. Once you have done this, you should either delete the section block on the page or change the image to one that exists...
Thanks
If you could open this file
packages/fundamental/blocks/fundamental_section/controller.php
Then online 152 change...
if($this->sectionBackgroundImage) { $file = $this->getFileObject(); $file = $file->getURL(); $backgroundImage = 'background-image:url('.$file.');background-repeat:'.$this->sectionBackgroundImageRepeat.';background-size:'.$backgroundSize.';background-attachment:'.$backgroundmentAttachment.';'; $this->set('backgroundImage', $backgroundImage); }
to...
if($this->sectionBackgroundImage) { $file = $this->getFileObject(); if($file) { $file = $file->getURL(); } $backgroundImage = 'background-image:url('.$file.');background-repeat:'.$this->sectionBackgroundImageRepeat.';background-size:'.$backgroundSize.';background-attachment:'.$backgroundmentAttachment.';'; $this->set('backgroundImage', $backgroundImage); }
This may get your site back up and running. Once you have done this, you should either delete the section block on the page or change the image to one that exists...
Thanks
Upgrading the package to 2.0.4 should also solve your issue...
Hi,
Apologies for the delayed response.
I made the update today. Thank you for your help!
Best regards,
Mark
On Monday, August 3, 2015, concrete5 Community <discussions@concretecms.com>
wrote:
Apologies for the delayed response.
I made the update today. Thank you for your help!
Best regards,
Mark
On Monday, August 3, 2015, concrete5 Community <discussions@concretecms.com>
wrote:
Attention: Since there has been no activity on this issue for two weeks, this issue has been automatically archived.
To re-open this issue, reply to this message.
To re-open this issue, reply to this message.
If this issue persists you should submit a bug report to concrete5 and or post in the public forums to see if anyone else has encountered a similar issue.
Thanks