News:

Dear forum visitors, if the support forum is not available, please try again a few minutes later. Thanks!

Main Menu
Support-Forum

Download link is not a link

Started by barraclm, 01.10.2024 12:04:05

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

barraclm

I have lots of existing files which can be downloaded just fine. I have just uploaded a new file, and processed it with regard to license requirements, icon etc. I have then created a new document with a download link to that file (done via JCE insert button - the same way all the other documents with download links have been created). The link finds the file because it gives the correct name. However the link doesn't actually function as a link, ie the file doesn't download when the link is clicked (previously uploaded and processed files do still download).

What should I be looking for please?
  •  

ColinM

Hi
Are these Links in articles?
If so I suggest ou read article
https://www.jdownloads.net/documentation/modules-plugins-v3-9/using-the-content-plugin-in-articles-and-modules

You have to be very careful with the syntax
Colin
Colin M
  •  

barraclm

Thank you. I am relying on the editor button in JCE to provide the correct syntax. It is working for articles originally created under J3 and ported across to the new J4 site. It is only the new article created on the J4 site whose link is not working.

The link appears to be correct in the document:

<div class="MABDownloadDocument">{jd_file file==979}</div>

The correct pdf icon and the correct file title appear on the web page. You can see this at https://michaelbarraclough.uk/my-research/interpretations/my-interpretations/excuse-me#download

and this is the code that is generating it (no sign of a link)

<div class="MABDownloadDocument"><div class="jd_content jd_content_plugin "><div class="details">Please click on the dance name below to download the dance</div>
<div class="mabcenter"><img src="https://michaelbarraclough.uk/images/jdownloads/fileimages/flat_1/pdf.png" align="top" width="38" height="38" border="0" alt="pdf"/>Excuse Me</div>

whereas, this is the code (which shows the <a href=) from a previous document that works.

<div class="MABDownloadDocument"><div class="jd_content jd_content_plugin "><div class="details">Please click on the dance name below to download the dance</div>
<div class="mabcenter"><a href="/download-dance?task=download.send&amp;id=118:addington-tunnel-dance&amp;catid=3"><img src="https://michaelbarraclough.uk/images/jdownloads/fileimages/flat_1/pdf.png" align="top" width="38" height="38" border="0" alt="pdf"/></a><!-- START: Modals --><a data-modals class="jd_download_url" href="/download-dance?task=download.send&amp;id=118:addington-tunnel-dance&amp;catid=3&amp;ml=1" title="Download" data-modals-height="100%" data-modals-legacy="1" data-modals-title="Download" data-modals-width="100%"><!-- END: Modals -->Addington Tunnel Dance</a>  </div>

What am I doing wrong in that I am not getting a link now, please?

Michael Barraclough
  •  

ColinM

Colin M
  •  

barraclm

Thank you. I have read the article, again, and still cannot find what I am doing wrong. I have created a test document - https://michaelbarraclough.uk/test. The plugin links are hand coded (no editor button has been used) and link to 2 different downloads. One works - you can tell that it will because the CSS renders the link in a light blue colour. The other doesn't - you can tell that it won't because it has not been rendered as a link.

Here is the code in the document - the code is identical for both links (except for the file ID):
<h1>WORKS</h1>
<div>{jd_file file==976}</div>
<br /><br />
<h1>DOESN'T WORK</h1>
<div>{jd_file file==979}</div>

Here is the code on the page that Joomla returns. The 1st link has the download as a link <a>. The 2nd link has the download as an image <img>.
       
<div  class="com-content-article__body">
<h1>WORKS</h1>
<div>
<div class="jd_content jd_content_plugin ">
<div class="details">Please click on the dance name below to download the dance</div> <br>
<div class="mabcenter">
<a href="/download-dance?task=download.send&amp;id=976:kimbi-s-a-superstar&amp;catid=3"><img src="https://michaelbarraclough.uk/images/jdownloads/fileimages/flat_1/pdf.png" align="top" width="38" height="38" border="0" alt="pdf"/></a><b>
<!-- START: Modals -->
<a data-modals class="jd_download_url" href="/download-dance?task=download.send&amp;id=976:kimbi-s-a-superstar&amp;catid=3&amp;ml=1" title="Download" data-modals-height="100%" data-modals-legacy="1" data-modals-title="Download" data-modals-width="100%">
<!-- END: Modals -->
Kimbi's A Superstar</a>  </b></div>
</div></div>
<br /><br />
<h1>DOESN'T WORK</h1>
<div>
<div class="jd_content jd_content_plugin ">
<div class="details">Please click on the dance name below to download the dance</div> <br>
<div class="mabcenter">
<img src="https://michaelbarraclough.uk/images/jdownloads/fileimages/flat_1/pdf.png" align="top" width="38" height="38" border="0" alt="pdf"/><b>Excuse Me</b></div>
</div></div>    </div>
  •  

ColinM

Hi
It looks as if file 979 has something different about it

Can you list the files in a jD 'List all files' menu item to see that they behave as expected
Colin
Colin M
  •  

barraclm

Hi - I have done that and you can see the results at https://michaelbarraclough.uk/test. I had never used this functionality before and expected some sort of tabular listing with various details for each file. Instead I just got the file icon and filename as a link. Is that correct? According to the backend I have 664 downloadable files but, even after changing the Number of Downloads to List on a page setting to "All" I still only got some of them.

The list order that you will see is most recent first. The 2 most recent files link back to the home page. The other files link correctly. Here is the html page code from the
           
<div class="jd-item-page">
<div class="mabcenter"><a  href="/"><img src="https://michaelbarraclough.uk/images/jdownloads/fileimages/flat_1/pdf.png" style="text-align:top;border:0px;" width="38" height="38" alt="pdf0" /></a><b><a  href="/" title="Download" class="jd_download_url">Excuse Me</a></b></div>
<div class="mabcenter"><a  href="/"><img src="https://michaelbarraclough.uk/images/jdownloads/fileimages/flat_1/xlsx.png" style="text-align:top;border:0px;" width="38" height="38" alt="xlsx1" /></a><b><a  href="/" title="Download" class="jd_download_url">Leyland 2 March 2024 Tune Summary</a></b></div>
<div class="mabcenter"><!-- START: Modals --><a data-modals href="/component/jdownloads/?task=download.send&amp;id=977&amp;catid=3&amp;m=0&amp;Itemid=1467&amp;ml=1" data-modals-height="100%" data-modals-legacy="1" data-modals-width="100%"><!-- END: Modals --><img src="https://michaelbarraclough.uk/images/jdownloads/fileimages/flat_1/pdf.png" style="text-align:top;border:0px;" width="38" height="38" alt="pdf2" /></a><b><!-- START: Modals --><a data-modals class="jd_download_url" href="/component/jdownloads/?task=download.send&amp;id=977&amp;catid=3&amp;m=0&amp;Itemid=1467&amp;ml=1" title="Download" data-modals-height="100%" data-modals-legacy="1" data-modals-title="Download" data-modals-width="100%"><!-- END: Modals -->Leyland Cross</a></b></div>
<div class="mabcenter"><!-- START: Modals --><a data-modals href="/component/jdownloads/?task=download.send&amp;id=976&amp;catid=3&amp;m=0&amp;Itemid=1467&amp;ml=1" data-modals-height="100%" data-modals-legacy="1" data-modals-width="100%"><!-- END: Modals --><img src="https://michaelbarraclough.uk/images/jdownloads/fileimages/flat_1/pdf.png" style="text-align:top;border:0px;" width="38" height="38" alt="pdf3" /></a><b><!-- START: Modals --><a data-modals class="jd_download_url" href="/component/jdownloads/?task=download.send&amp;id=976&amp;catid=3&amp;m=0&amp;Itemid=1467&amp;ml=1" title="Download" data-modals-height="100%" data-modals-legacy="1" data-modals-title="Download" data-modals-width="100%"><!-- END: Modals -->Kimbi's A Superstar</a></b></div>
<div class="mabcenter"><!-- START: Modals --><a data-modals href="/component/jdownloads/?task=download.send&amp;id=975&amp;catid=3&amp;m=0&amp;Itemid=1467&amp;ml=1" data-modals-height="100%" data-modals-legacy="1" data-modals-width="100%"><!-- END: Modals --><img src="https://michaelbarraclough.uk/images/jdownloads/fileimages/flat_1/pdf.png" style="text-align:top;border:0px;" width="38" height="38" alt="pdf4" /></a><b><!-- START: Modals --><a data-modals class="jd_download_url" href="/component/jdownloads/?task=download.send&amp;id=975&amp;catid=3&amp;m=0&amp;Itemid=1467&amp;ml=1" title="Download" data-modals-height="100%" data-modals-legacy="1" data-modals-title="Download" data-modals-width="100%"><!-- END: Modals -->Baubles</a></b></div>
  •  

ColinM

Hi
Have you updated to newer version of JCE?  When one updates JCE many things have to be 'restored'.
Which version on Joomla are you usins? And which version of jDownloads?

The usual default number of downloads is five as you show.  But there are other links that shouldf also be there.
Do you have any 'overlays'?
Which Joomla Template are you using?
Colin
Colin M
  •  

barraclm

JCE:  2.9.81 PRO
jDownloads: Version 4.0.45 Stable
Joomla: 4.4.8 Stable
PHP: 8.2.23
Template: Cassiopeia (no overrides, with CSS in user.css)
Overlays: not that I am aware of

The jDownloads specific css is
/* jDownloads */

.jd_content_wrapper {
  border-bottom:0 ;
  box-sizing:border-box;
  display:inline-block;
  margin-bottom:0;
  padding:0;
  width:100%;}
.jd_files_oneline {float: left !important; float: right !important;}
span.jdbutton.jstatus {display: none;}

I have tested the List All Downloads menu item. It works for the various numbers offered in the configuration tab, but not for the "All" option, which lists just 5 (s/b 600+)

It is conceivable that JCE has some role to play. However, my test document did not use JCE and the links to the documents were created by copying and pasting from jDownloads documentation and then changing the file IDs.

Michael
  •  

ColinM

Hi
There is no option in jD to select 'All' in List All Downloads.
In the attached image I am using the 'Files Layout Single Line' with five layout/page
Colin
Colin M
  •