Jump to:

10930 Posts in 2613 Topics by 1810 members

All other Modules

SilverStripe Forums » All other Modules » Slideshow (jQuery Cycle) - Javascript Problem

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 2059 Views
  • ocean
    Avatar
    Community Member
    37 Posts

    Slideshow (jQuery Cycle) - Javascript Problem Link to this post

    Hi There,

    Hopefully someone can help...

    Installed the Slideshow module as instructed, all usual SS stuff plus the additional config line to activate it only on home page. The CMS all working beautifully, however, when I go to view the homepage (in dev mode) I get this;

    [Warning] file_get_contents() [function.file-get-contents]: Unable to access /home/***/public_html/www_test1/slideshow/javascript/init_slideshow.js
    GET /?flush=1

    Line 527 in /home/***/public_html/www_test1/sapphire/core/Requirements.php

    Source

    518       else $this->customHeadTags[] = $html;
    519    }
    520    
    521    /**
    522     * Load the given javascript template with the page.
    523     * @param file The template file to load.
    524     * @param vars The array of variables to load. These variables are loaded via string search & replace.
    525     */
    526    function javascriptTemplate($file, $vars, $uniquenessID = null) {
    527       $script = file_get_contents(Director::getAbsFile($file));
    528       $search = array();
    529       $replace = array();
    530
    531       if($vars) foreach($vars as $k => $v) {
    532          $search[] = '$' . $k;
    533          $replace[] = str_replace("\\'","'", Convert::raw2js($v));

    Was not what I was expecting : ) Any ideas?

    Best wishes
    ~ Sean

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: Slideshow (jQuery Cycle) - Javascript Problem Link to this post

    It means PHP tried to read that file and couldn't. Check your permissions on the file (webserver should have read access to that file - public_html/www_test1/slideshow/javascript/init_slideshow.js

  • ocean
    Avatar
    Community Member
    37 Posts

    Re: Slideshow (jQuery Cycle) - Javascript Problem Link to this post

    Thanks very much Willr, I'll keep a note of that one for future reference!

    ...I ended up moving to another JS solution from the latest 2.4 book.

    2059 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.