jDownloads Support Forum

Older Versions => jDownloads 3.2 (Support ended) => General => Topic started by: TomTau on 10.07.2018 12:25:32

Title: Dropboxlink funktioniert nicht mehr [Not a Bug}
Post by: TomTau on 10.07.2018 12:25:32
Hallo,

da mein Englisch so schlecht ist und einiges erklärt werden muss, diesen Eintrag in Deutsch.
Ich hoffe, das ist okay...

Ich nutze jDownloads seit vielen Jahren und lasse darüber per "Externem Dateilink" Dropbox-PDF-Dateien anzeigen bzw. herunterladen.
Lief bis vor ca. 2 Wochen einwandfrei.
Eingebunden wird das mit der Endung "Raw=1", weil damit ein direkter Download möglich ist.
Hier ein funktionierender Link:
https://www.dropbox.com/s/pswgc0r9opzc4vt/beispiel-komponist.pdf?raw=1

Ich kann nicht sagen, ob es an der letzten Joomla-Aktualisierung liegt (3.8.10) oder an der Aktualisierung von jDownloads (3.2.61), die zeitgleich durchgeführt wurde.

Hier ein Beispiel:
Auf meiner Seite
https://tauber-leipzig.de/gewandhausorchester/category/7-cd-dvd-kataloge.html
gibt es 4 PDF-Dateien zum Herunterladen, unter anderem die "Beispiel-Komponist"-PDF (letzter Eintrag).
Hinterlegt (Externer Dateilink) ist obiger Link.
Mit Chrome + Windows 10 funktioniert das Ganze!
Nehme ich Edge oder Safari per iOS (iPhone + iPad getestet), wird die Seite nicht geladen.

Was noch verwunderlicher ist:
In meiner Testumgebung habe ich gerade jDownloads 3.2.62 installiert.
Jetzt geht es auch mit Chrome nicht mehr.
Es erscheint: "Fehler beim Laden des PDF-Dokuments" und der Button "Neu laden", der aber nicht weiterhilft...

Ich denke, hier liegt ein Bug vor, oder habt Ihr eine andere Idee?

Viele Grüße!
TomTau
Title: Re: Dropboxlink funktioniert nicht mehr [Not a Bug}
Post by: ColinM on 10.07.2018 18:06:20
Hi
Used link
https://tauber-leipzig.de/gewandhausorchester/category/7-cd-dvd-kataloge.html

Tried three browsers
Firefox,  Edge and Chrome - all are latest versions

With Firefox there were message about the files see pics
Edge just got stuck after a short while
Chrome was able to show and download

I am a bit suspicious about "Beispielseite CD/DVD-Katalog (alphabetisch)" as it only has one sheet ( Alpha index B with sheet 2 only) so I suspect that file is really corrupt

I opted to Download with Firefox rather than open directly it created a file Diskografie-Komponist.pdf_raw=1 but left it empty

Chrome was able to download and created same type of file

It would seem that the file extension is being treated as pdf_raw=1
Your direct download link is
https://www.dropbox.com/s/pswgc0r9opzc4vt/beispiel-komponist.pdf?raw=1

So it might be that the ? is being replaced by the _ character.

Could you please just try as one of the allowed extensions
Colin
PS I used Google translate
Title: Re: Dropboxlink funktioniert nicht mehr [Not a Bug}
Post by: TomTau on 10.07.2018 18:42:08
Hello,

no, the file isn't corrupt.
This is an example-pdf with only one sheet.

You are right: ? will _
This is the reason.

But this should not be...

Greetings!
Tom
Title: Re: Dropboxlink funktioniert nicht mehr [Not a Bug}
Post by: ColinM on 11.07.2018 11:08:27
Tom

Could you please let me know all  the setting in jD Config - Files and Folders tab.  Sustituting characters might be happening due to settings in that location. 
Also do you know the collation used in your database tables as things are moving towards utf8mb4_general_ci
Colin
Title: Re: Dropboxlink funktioniert nicht mehr [Not a Bug}
Post by: TomTau on 11.07.2018 14:12:50
Hello,

the Files and Folders tab - settings and the database-tables . settings are in the picture-attachment.

But I haven't changed anything since 3.2.59...

Greetings!
Tom

[gelöscht durch Administrator]
Title: Re: Dropboxlink funktioniert nicht mehr [Not a Bug}
Post by: ColinM on 11.07.2018 17:57:39
Hi

I am looking at potential ares that may cause the 'challenge' as there are sometimes unexpected side effects.
You have set the "Use above Settings also for Auto Monitoring" to No ( it is the last parameter onthe Files and Folders tab. If you have used Automonitoring to create Downloads then the what happens is as the text in italics below.  Thus the '?' might be changed to a '_'.  There have been recent changes/corrections in the automonitoring.So could you set the field to Yes and try another creating another Download please.
Colin
extractWhen Yes, the settings above are also used in the auto monitoring function whether is is activated automatically, manually or periodically. When No, the auto monitoring function always uses the Option: 'Remove/Change special characters in name', no matter whether it is activated or not. The Folder - or Filename then contains only the following characters after checking: a-zA-Z0-9 ._-
Recommended Setting: Yes
Title: Re: Dropboxlink funktioniert nicht mehr [Not a Bug}
Post by: TomTau on 11.07.2018 18:33:55
Hello,

the Auto-Monitoring is off, see the attachment...

Regards!
Tom

[gelöscht durch Administrator]
Title: Re: Dropboxlink funktioniert nicht mehr [Not a Bug}
Post by: TomTau on 12.07.2018 17:59:49
For a test:
Can I get the old version 3.2.59?

Greetings!
Tom
Title: Re: Dropboxlink funktioniert nicht mehr [Not a Bug}
Post by: Arno on 13.07.2018 11:04:30
Here is it.
Habe dir auch eine PM geschickt.


[gelöscht durch Administrator]
Title: Re: Dropboxlink funktioniert nicht mehr [Not a Bug}
Post by: TomTau on 13.07.2018 14:14:49
Thank you, but I can't downgrade...

Greetings!
Tom
Title: Re: Dropboxlink funktioniert nicht mehr [Not a Bug}
Post by: ColinM on 14.07.2018 10:17:27
Hi
First another thought.  Have you tried creating a new Download with the latest jD and Joomla! versions to see if that works?
When jD is uninstalled one has the option to retain the jD data, images etc and the data base.

To go back  a version or so is best done on a test site first to check it works ok.  There can be no guarentees all will be well especially if there have been database structural changes!
Of course in any event you should do a full backup - I use Akeeba.
If you cannot get a test site then I suggest you contact Arno by PM.
If you do have a test site then Uninstall all of the jD plugins, modules and the Component itself selecting to retain all the jD information on the site.  Then you can install the older version.  It will probably ask for the install to be repeated using the same install procedure.
I would not do this untested on a working site.Colin

Title: Re: Dropboxlink funktioniert nicht mehr [Not a Bug}
Post by: TomTau on 14.07.2018 11:25:31
I have a test side and uninstalled jD and new installed the 3.2.59.

the same problem:

? will be _

Greetings!
Tom
Title: Re: Dropboxlink funktioniert nicht mehr [Not a Bug}
Post by: ColinM on 14.07.2018 15:46:07
Hmm!

I am trying to create a Dropbox that anyone can share files to reproduce the problem.
No success yet!
Colin
Title: Re: Dropboxlink funktioniert nicht mehr [Not a Bug}
Post by: TomTau on 14.07.2018 15:51:51
Thank you!

The normal Link for example:
https://www.dropbox.com/s/pswgc0r9opzc4vt/beispiel-komponist.pdf?dl=0
must be changed to;
https://www.dropbox.com/s/pswgc0r9opzc4vt/beispiel-komponist.pdf?raw=1
for a regular download.

But both don't work anymore...

Greetings!
Tom



Title: Re: Dropboxlink funktioniert nicht mehr [Not a Bug}
Post by: ColinM on 15.07.2018 15:10:14
TomJust an update on progress.
I have set up a Dropbox and allowed anybody who can view to download.Checked out downloading from Dropbox with direct link and with a trailing sequence of either ?dl=1 or ?raw=1 the the download occured.Using  ?dl=1 posed question of 'do  you wish to view or download'. Using ?raw=1 showed the file directly.S I have concluded my Dropbox was set up OK.
So I used these in jD on my test site
Initially when using my Dropbox files with the trailing sequence ?dl=1 or ?raw=1 in jD
I got the message:  "Notice  You do not have permission to download the requested file.  Contact the website operator if you are sure that this is incorrect."
I then modified some code to prevent the message and the downloading occured!  The file when downloaded still has an extension of "pdf_raw=1" or "pdf_dl=1" rather than just ".pdf"
I am looking into this furtherColin
Title: Re: Dropboxlink funktioniert nicht mehr [Not a Bug}
Post by: TomTau on 16.07.2018 08:40:45
Thank you for your work and time.

That sounds like a quick fix ;-)

Greetings!
Tom
Title: Re: Dropboxlink funktioniert nicht mehr [Not a Bug}
Post by: ColinM on 16.07.2018 17:56:20
Tom
Having set up my own Dropbox and found a solution to avoid the error message I have now found out how to get rid of the strange extension.

So instead of using the regular Dropbox link such as [note I have corrupted the actual link so that they do not get to my DropBox}
https://www.dropbox.com/s/irxxxxx6w/Helen0%201.pdf?dl=1
or as
https://www.dropbox.com/s/irxxxxxx6w/Helen0%201.pdf?raw=1

One replaces www.dropbox.com with dl.dropboxusercontent.com and omits the ?dl=1 or ?raw=1Thus in the example I was using the external link field was set to
https://dl.dropboxusercontent.com/s/irxxxxx6w/Helen0%201.pdf
This then, if saved, creates a file 'Helen0 1.pdf' as woild be hoped.

If the field "Is the main file on an external web page?" is set to yes then  I am asked to view or save on a new Tab. If you set it to No then it displays the pdf directly on the same Tab.

Have tried with Firefox, Edge and Chrome.  All ok but some usual differences between browsers.

I will be contacting Arno to get him to check out my code as he has a very much better overview.

I expect to shortly send you a beta test version by PM for your test site only.

Colin
EDITED to hide actual links to drop box
Title: Re: Dropboxlink funktioniert nicht mehr [Not a Bug}
Post by: TomTau on 16.07.2018 18:34:54
Hello Colin,

a very pleasant response!!!

It works fine!
I replace www.dropbox.com with dl.dropboxusercontent.com and delete "?raw=1".

Also "save under" is correct.
Wonderfully!

I have tested with Safari (iOS), Edge and Chrome (Windows 10).

I will also test the beta version from PM...

Greetings!
Tom
Title: Re: Dropboxlink funktioniert nicht mehr [Not a Bug}
Post by: ColinM on 17.07.2018 10:49:09
Tom
Just for clarity could you confirm that when you replaced www.dropbox.com with dl.dropboxusercontent.com and deleted "?raw=1" then the existing code worked?For me I got an error message because the Download did not conform to category etc structure.  The revised code is to avoid the error message when it is an external file.  But it seems that you do not get that message with the original code.
This suggests that I have a different setup to yours. I can then compare your cofiguration setup with mine.  Alternatively if you are able to access your database could you export jD table <prefix>_jdownloads_config as a csv file, put it in a zip and send to me by PM please.
If you do not have that access then use jD Tools - Backup to create a jD Database backup and send the file, also as a zip, to me by PM.
Colin
Title: Re: Dropboxlink funktioniert nicht mehr [Not a Bug}
Post by: TomTau on 18.07.2018 11:32:37
Hello Colin,

yes, the existing code (3.2.62) works fine.

I will send you the database by PM.

Greetings!
Tom
Title: Re: Dropboxlink funktioniert nicht mehr [Not a Bug}
Post by: Arno on 20.07.2018 21:37:52
Hi Guys,please note that the normal link with ?raw=1 or ?dl=0 does work when you activate the additional options under the external link. See pic.
The only difference is that it is open a new browser window or the link goes to the dropbox with the file. Sad to say but it is not possible for me to add for every sharehoster special download procedures. But Colins solution is also very fine.  8) :)

[gelöscht durch Administrator]
Title: Re: Dropboxlink funktioniert nicht mehr [Not a Bug}
Post by: ColinM on 23.07.2018 11:57:02
Hi
I have constructed a table of the use of various Dropbox links and interaction please see attached pic.  Will be part of a new doc on external files
Colin

[gelöscht durch Administrator]
Title: Re: Dropboxlink funktioniert nicht mehr [Not a Bug}
Post by: TomTau on 26.07.2018 21:06:17
Thank you Colin for the table!!!

This is a great help for dropbox-users!

Greetings!
Tom
Title: Re: Dropboxlink funktioniert nicht mehr [Not a Bug}
Post by: justhuan on 09.08.2018 04:43:10
Please make a Donation for jDownloads, thanks.
Title: Re: Dropboxlink funktioniert nicht mehr [Not a Bug}
Post by: justhuan on 09.08.2018 04:45:31
please give me a way to solve problem.
Title: Re: Dropboxlink funktioniert nicht mehr [Not a Bug}
Post by: ColinM on 09.08.2018 19:57:39
Hi
I have added an article in the documentation about this problem.  It is not a bug. Please seehttp://www.jdownloads.net/documentations/item/downloads-with-an-external-file
ColinPS I will move this topic to General
Title: Re: Dropboxlink funktioniert nicht mehr [Not a Bug}
Post by: Sheily on 24.08.2018 10:00:34
Substituting characters might be happening due to settings in that location.   :)