Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal Error: #5

Open
JohnEmory opened this issue Mar 24, 2016 · 3 comments
Open

Fatal Error: #5

JohnEmory opened this issue Mar 24, 2016 · 3 comments

Comments

@JohnEmory
Copy link

Exporting a batch of blog posts (ProBlog to be specific) dating back to 2013, >100 posts.
Get the following error white page error of death:

Fatal error: Call to a member function getFileID() on a non-object in /home/primary/public_html/updates/concrete5.6.3.4/concrete/core/models/attribute/types/image_file.php on line 30.

Got error first in c5.6.3.3, then recalled there was an update so did that, same error tho.

@Mesuva
Copy link

Mesuva commented Apr 18, 2016

I hit this as well. I was able to solve it by editing /concrete/core/models/attributes/types/image_file.php, changing the exportValue function to:

public function exportValue($akn) {
        $av = $akn->addChild('value');
        $file = $this->getValue();
        if ($file) {
            $av->addChild('fID', ContentExporter::replaceFileWithPlaceHolder($file->getFileID()));
        }
    }

I think this is just cases where the original file is deleted, so it's not really going to lose data - it doesn't have the file anymore to reference.

@madesimplemedia
Copy link

I have this issue too in c5.6.3.3. Mesuva I tried your code change but still an issue.

@buurvrouw
Copy link

This solution works for me, thanks mesuva!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants