Jump to:

10929 Posts in 2613 Topics by 1809 members

All other Modules

SilverStripe Forums » All other Modules » Flickr Gallery - problems with restful arguments

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 1537 Views
  • syncroswitch
    Avatar
    Community Member
    2 Posts

    Flickr Gallery - problems with restful arguments Link to this post

    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?

  • syncroswitch
    Avatar
    Community Member
    2 Posts

    Re: Flickr Gallery - problems with restful arguments Link to this post

    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.

    1537 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.