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.

Archive /

Our old forums are still available as a read-only archive.

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

FlickerService error


Go to End
Reply


17 Posts   6619 Views

Avatar
NathanNZ

Community Member, 6 Posts

3 June 2008 at 11:06am

Edited: 03/06/2008 11:07am

Hi, I have just installed wampserver and Silverstripe 2.2.2 on my desktop pc for testing (Vista SP1). Silverstripe installed successfully, so I added the FlickerService module and followed the install instructions which also seemed to work successfully and I was able to create a new Flickr Gallery page in the CMS. I have set my flickr API key in _config.php and published a gallery page, but when I browse to the published page I am getting this error:

FATAL ERROR: Missing argument 1 for RestfulService::connect(), called in C:\wamp\www\silverstripe-v2.2.2\flickrservice\code\FlickrService.php on line 73 and defined
At line 68 in C:\wamp\www\silverstripe-v2.2.2\sapphire\api\RestfulService.php

I haven't been able to find anything in these forums about this error, any help would be much appreciated! Otherwise, very impressed with Silverstrip so far!

cheers, Nathan

Avatar
Willr

Forum Moderator, 5513 Posts

3 June 2008 at 8:20pm

This was an API change with 2.2.2. Connect now needs a parameter. So open up that line where the error comes from - FlickrService line 73 it looks like and look for a ->connect() and change it so it sends something ->connect(''); or something

Avatar
NathanNZ

Community Member, 6 Posts

6 June 2008 at 12:59pm

Hi, thanks for that advice.

I made the changes you suggested (change connect() to connect('') in FlickrService.php) - unfortunately I now get a different error:

Fatal error: Call to undefined function curl_init() in C:\wamp\www\silverstripe-v2.2.2\sapphire\api\RestfulService.php on line 83

Avatar
NathanNZ

Community Member, 6 Posts

10 June 2008 at 10:55pm

OK, the "Call to undefined function curl_init() " error is easliy resolved (assuming you are running WAMP server).

Enable the PHP setting for Client URL library:

PHP > PHP extensions > php_curl

Avatar
Apophenian

Community Member, 46 Posts

27 June 2008 at 1:47pm

Hi there.

I was getting the same problem with RestfulService::connect() which i fixed, but now I seem to be getting the following errors in dev mode:

Warning: No current controller available in /home/ranebow/public_html/tina/sapphire/core/control/Controller.php on line 379

Fatal error: Call to a member function getSession() on a non-object in /home/ranebow/public_html/tina/sapphire/core/Session.php on line 34


Any help would be much appreciated!

Avatar
Willr

Forum Moderator, 5513 Posts

27 June 2008 at 1:54pm

Fatal error: Call to a member function getSession() on a non-object in /home/ranebow/public_html/tina/sapphire/core/Session.php on line 34

It doesnt seem as your page has a Controller class attached to it. Where are you trying to call the FlickrServices

Avatar
Apophenian

Community Member, 46 Posts

27 June 2008 at 2:01pm

Thanks for your response!

Hah sorry forgot to mention! It's just a Flickr gallery type page.

Avatar
Willr

Forum Moderator, 5513 Posts

27 June 2008 at 2:03pm

is there a FlickrGallery_Controller extends Page_Controller in FlickrGallery.php

Go to Top