jDownloads Support Forum

Older Versions => jDownloads 3.2 (Support ended) => General => Topic started by: romagromov on 20.12.2016 11:12:47

Title: External downloads does not work with CDN [Not a jDownloads problem]
Post by: romagromov on 20.12.2016 11:12:47
Hi!
I have enabled CloudFlare service for my site.
After that External downloads does not opens.
JDownloads opens my site page with blank page - like mysite.com/internet/browser/google-chrome/download instead external URL

(https://dl.dropboxusercontent.com/s/leo124kvwzynjml/2016-12-20%20at%2012.12.png)
Title: Re: External downloads does not work with CDN [Not a jDownloads problem]
Post by: Arno on 20.12.2016 12:38:12
Hi,
when you try the stored link directly in the browser then is loaded the extern page correctly?

In the script is this simple line used:
// when url goes to another website - open it in a new browser window
            if ($extern_site){
                echo "<script>document.location.href='$filename';</script>\n"; 
                exit;   
            }
(The $filename is in this case the url which you typed in before)

I have not any experiences with Cloudflare.
Title: Re: External downloads does not work with CDN [Not a jDownloads problem]
Post by: romagromov on 20.12.2016 13:07:22
So, it just use JavaScript to open link in new tab?
Title: Re: External downloads does not work with CDN [Not a jDownloads problem]
Post by: romagromov on 20.12.2016 13:46:53
Quote from: Arno on 20.12.2016 12:38:12
Hi,
when you try the stored link directly in the browser then is loaded the extern page correctly?

In the script is this simple line used:
// when url goes to another website - open it in a new browser window
            if ($extern_site){
                echo "<script>document.location.href='$filename';</script>\n"; 
                exit;   
            }
(The $filename is in this case the url which you typed in before)

I have not any experiences with Cloudflare.

I can't see this code...

I find only this one:

// check is set link to a new window?
                if ($this->item->extern_file && $this->item->extern_site   ){
                    $blank_window = 'target="_blank"';
                }


And site opens page in new tab. But it not redirects to extern_site. It opens internal page.
Title: Re: External downloads does not work with CDN [Not a jDownloads problem]
Post by: Arno on 20.12.2016 20:33:32
You must open the file /controllers/download.php and search the send() function (around line 395).
Title: Re: External downloads does not work with CDN [Not a jDownloads problem]
Post by: romagromov on 21.12.2016 22:08:45
Ok, I got it.
Problem was with CloudFlare option, called Rocket Loader.
It should be disabled.

(https://dl.dropboxusercontent.com/s/mdjcom624ijdt89/2016-12-21%20at%2023.07.png)
Also I want to noticed, that this option have too many bugs with other JS scripts on site.
Title: Re: External downloads does not work with CDN [Not a jDownloads problem]
Post by: Arno on 21.12.2016 22:32:02
QuoteAlso I want to noticed, that this option have too many bugs with other JS scripts on site.
And what exactly should be buggy? Or did you mean the described Rocket Loader  above?
Title: Re: External downloads does not work with CDN [Not a jDownloads problem]
Post by: romagromov on 22.12.2016 09:24:51
Yes, I mean that Rocket Loader have confilcts with JS.
No problem with JDownloads.