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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

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

Flickr Gallery - problems with restful arguments


Go to End


2 Posts   2521 Views

Avatar
syncroswitch

Community Member, 2 Posts

4 February 2009 at 11:46pm

I receive the following errors when loading a flickr gallery looking for photos by user id,
#####################################################

FATAL ERROR: Missing argument 1 for RestfulService::connect(), called in /var/www/SilverStripe/flickrservice-v0.2/code/FlickrService.php on line 98 and defined
At line 68 in /var/www/SilverStripe/sapphire/api/RestfulService.php

RestfulService->connect()
line 98 of FlickrService.php

FlickrService->User(gentlejackel)
line 65 of FlickrService.php

FlickrService->getPhotos(,gentlejackel,20,1,date-posted-desc)
line 48 of FlickrGallery.php

FlickrGallery->FlickrPhotos()

call_user_func_array(Array,Array)
line 177 of Object.php

Object->__call(FlickrPhotos,Array)

FlickrGallery_Controller->FlickrPhotos()
line 105 of FlickrGallery.php

FlickrGallery_Controller->Content()

call_user_func_array(Array,Array)
line 404 of ViewableData.php

ViewableData->XML_val(Content,,1)
line 198 of .cache.var.www.SilverStripe.themes.blackcandy.templates.Layout.Page.ss

include(/tmp/silverstripe-cache-var-www-SilverStripe/.cache.var.www.SilverStripe.themes.blackcandy.templates.Layout.Page.ss)
line 197 of SSViewer.php

SSViewer->process(FlickrGallery_Controller)
line 189 of SSViewer.php

SSViewer->process(FlickrGallery_Controller)
line 296 of Controller.php

Controller->defaultAction(index,Array)
line 267 of Controller.php

Controller->run(Array)
line 22 of ModelAsController.php

ModelAsController->run(Array)
line 104 of Director.php

Director::direct(/pics/)
line 158 of main.php
Context
Debug (Debug::showError() in line 180 of Debug.php)

Notice: Undefined variable: subURL in /var/www/SilverStripe/sapphire/api/RestfulService.php on line 69

FATAL ERROR: Missing argument 1 for RestfulService::connect(), called in /var/www/SilverStripe/flickrservice-v0.2/code/FlickrService.php on line 73 and defined
At line 68 in /var/www/SilverStripe/sapphire/api/RestfulService.php

RestfulService->connect()
line 73 of FlickrService.php

FlickrService->getPhotos(,gentlejackel,20,1,date-posted-desc)
line 48 of FlickrGallery.php

FlickrGallery->FlickrPhotos()

call_user_func_array(Array,Array)
line 177 of Object.php

Object->__call(FlickrPhotos,Array)

FlickrGallery_Controller->FlickrPhotos()
line 105 of FlickrGallery.php

FlickrGallery_Controller->Content()

call_user_func_array(Array,Array)
line 404 of ViewableData.php

ViewableData->XML_val(Content,,1)
line 198 of .cache.var.www.SilverStripe.themes.blackcandy.templates.Layout.Page.ss

include(/tmp/silverstripe-cache-var-www-SilverStripe/.cache.var.www.SilverStripe.themes.blackcandy.templates.Layout.Page.ss)
line 197 of SSViewer.php

SSViewer->process(FlickrGallery_Controller)
line 189 of SSViewer.php

SSViewer->process(FlickrGallery_Controller)
line 296 of Controller.php

Controller->defaultAction(index,Array)
line 267 of Controller.php

Controller->run(Array)
line 22 of ModelAsController.php

ModelAsController->run(Array)
line 104 of Director.php

Director::direct(/pics/)
line 158 of main.php
Context
Debug (Debug::showError() in line 180 of Debug.php)

Notice: Undefined variable: subURL in /var/www/SilverStripe/sapphire/api/RestfulService.php on line 69

#########################################

And the following error when looking for tags,
#########################################

FATAL ERROR: Missing argument 1 for RestfulService::connect(), called in /var/www/SilverStripe/flickrservice-v0.2/code/FlickrService.php on line 73 and defined
At line 68 in /var/www/SilverStripe/sapphire/api/RestfulService.php

RestfulService->connect()
line 73 of FlickrService.php

FlickrService->getPhotos(rosebud,,20,1,date-posted-desc)
line 51 of FlickrGallery.php

FlickrGallery->FlickrPhotos()

call_user_func_array(Array,Array)
line 177 of Object.php

Object->__call(FlickrPhotos,Array)

FlickrGallery_Controller->FlickrPhotos()
line 105 of FlickrGallery.php

FlickrGallery_Controller->Content()

call_user_func_array(Array,Array)
line 404 of ViewableData.php

ViewableData->XML_val(Content,,1)
line 198 of .cache.var.www.SilverStripe.themes.blackcandy.templates.Layout.Page.ss

include(/tmp/silverstripe-cache-var-www-SilverStripe/.cache.var.www.SilverStripe.themes.blackcandy.templates.Layout.Page.ss)
line 197 of SSViewer.php

SSViewer->process(FlickrGallery_Controller)
line 189 of SSViewer.php

SSViewer->process(FlickrGallery_Controller)
line 296 of Controller.php

Controller->defaultAction(index,Array)
line 267 of Controller.php

Controller->run(Array)
line 22 of ModelAsController.php

ModelAsController->run(Array)
line 104 of Director.php

Director::direct(/pics/)
line 158 of main.php
Context
Debug (Debug::showError() in line 180 of Debug.php)

###########################################

Oddly, under the error output, the gallery is correctly displayed with the appropriate photos by user or tag...

what's going on?

Avatar
syncroswitch

Community Member, 2 Posts

5 February 2009 at 3:05am

Edited: 05/02/2009 3:22am

OK,

I modified lines 68 and 69 of sapphire/api/RestfullService.php from ___

function connect($subURL){
$url = $this->constructURL() . $subURL; //url for the request

to__

function connect(){
$url = $this->constructURL() ; //url for the request

which eliminates the problem, in a fast and dirty way ... probably breaks something else, but I haven't had any problems yet.