Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Installing SilverStripe

Getting SilverStripe up and running on your computer and on your web server.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

[User Error] Uncaught Exception: Object->__call(): the method 'loaduploaded' does not exist on 'Image'


Reply

5 Posts   2002 Views

Avatar
gakenny

8 January 2011 at 10:01am Community Member, 153 Posts

Hello,

I have discovered an issue relating to the case of file extensions for FileListingPage and Gallery page types.

If the file extension is lowercase (ie. jpg), all works fine.

However, if the file extension is uppercase (ie. JPG) this reports errors:
(1) When calling the page:
[User Error] Uncaught Exception: Object->__call(): the method 'loaduploaded' does not exist on 'Image'
(2) When calling the image directly (http://www.domain.com/assets/gallery/image.JPG):
Page Not Found (this is caused by the .htaccess rule protecting the assets folder using FilesMatch

Is this working as intended or should this be logged as a bug?

Cheers,

Gary

Avatar
Sean

14 January 2011 at 5:14pm Forum Moderator, 921 Posts

Hi,

(1) This looks like an API was changed in the core, but the module(?) was not updated. This may need to be patched to call a different method instead of "loaduploaded"

(2) is already raised as a known bug against the 2.4.5 milestone: http://open.silverstripe.org/ticket/6321

Sean

Avatar
_Vince

6 June 2011 at 2:03pm (Last edited: 6 June 2011 2:13pm), Community Member, 161 Posts

I've just struck the same problem myself.

[User Error] Uncaught Exception: Object->__call(): the method 'loaduploaded' does not exist on 'Image'

I can't anything else on this: how do I fix it?

Added:

Looking around in sapphire/core/model/image.php, I see that there's a function called loadUploadedImage.

But when I call that function (while trying to upload an image called Cricket-Ball-CB-County-01.jpg), I get

[Warning] copy(/var/www/bridge//var/www/bridge/assets/Image/Cricket-Ball-CB-County-01.jpg): failed to open stream: No such file or directory

How do I pass it the right path?

Avatar
_Vince

9 June 2011 at 9:30am Community Member, 161 Posts

*bump*

Anybody..?

Avatar
gakenny

9 June 2011 at 9:53am Community Member, 153 Posts

Hello,

This does not appear to be the same issue that I originally posted.

The cause of your issue is highlighted in this error message:
[Warning] copy(/var/www/bridge//var/www/bridge/assets/Image/Cricket-Ball-CB-County-01.jpg): failed to open stream: No such file or directory

'/var/www/bridge/' appears twice in the source path. Does this help?

Cheers,

Gary