How to configure Vimeo-Service-module in Silverstripe

176 Views Asked by At

Forgive me for my English

I am new in PHP. And I'm building a site using Silverstripe and trying to configure Vimeo-Service-module. I'd follow the steps from this link

https://github.com/r0nn1ef/Silverstripe-Vimeo-Service-module

I did everything that mentions in the article. And created a page in admin panel of VimeoGallery page type and set the parameters on Videos tab to grab the videos for display.

After created page, I visited my and clicked on video menu but then all I see is no videos returned. It is showing blank page and no any error messages.

Is that I've done anything wrong. Please guide me...

Thanks in advance.

1

There are 1 best solutions below

9
On BEST ANSWER

OK, I think I see the issue here. You are calling VimeoService::setAPIKey() however accessing the method like that is deprecated in the new version (the 2.0 branch - I was incorrect in my comment when I mentioned master) of the module.

The module instead uses the Site Config in the CMS to set the API key and a few other settings.

Now just remove VimeoService::setAPIKey() from your _config.php file, run /dev/build and set the API key through the CMS.

EDIT

On line 142 of VimeoGalleryPage.php, there is a function called flushCache. Replace the code in that function with the following:

public function flushCache($persistent = true) {
    parent::flushCache($persistent);
    unset($this->_cachedVideos);
}

Basically, the code in the 2.0 branch for this function does not correctly extend the same named function in SiteTree.