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

Error: Upload File #29

Open
MaGiOBooK opened this issue Apr 12, 2016 · 7 comments
Open

Error: Upload File #29

MaGiOBooK opened this issue Apr 12, 2016 · 7 comments

Comments

@MaGiOBooK
Copy link

Hi, when i try to upload file with $has_one 'VideoFile' => 'File' i've this error:
Object->__call(): the method 'parent' does not exist on 'File'

How can i fix it?

@robingram
Copy link

I'm getting the same problem but on Image rather than File. The problem occurs on line 74 of Hierarchy.php. Maybe the Image instance has a ParentID set but no Parent attribute?

I'm assuming it is a missing attribute because Parent() is a magic method.

@ryanbadger
Copy link

I had this on all uploads in my site, I couldn't figure it out, so I just changed all instances of:

static $has_one = array(
"Image" => "Image"
);

to:

static $has_one = array(
"Image" => "CloudImage"
);

and now my site runs fine

@joeherbert
Copy link

I'm experiencing this issue, and used @ryanbadger solution, which works great except for inline images and files. Any ideas?

@ryanbadger
Copy link

@joeherbert which version of SS are you using?

@joeherbert
Copy link

@ryanbadger version 3.5

@ryanbadger
Copy link

@joeherbert I think in the end I rolled back to a previous version.... there were too many problems otherwise

@joeherbert
Copy link

Alas I need 3.5 for other reasons, I will try to find a work around, I'm going to try to make CloudFile the default class used by the inline upload tool and see if that does the job, not pretty but I need this solved.

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