Problem with downloading versions
-
running download monitor 4.0.4
We have, for a very long time, used versions so that we can have a title for a specific issue i.e. “Grantville Gazette Volume 75” and then versions for each file format such as RTF, HTML zip, epub, and mobi. So, we would have version slugs like “4-RTF” and “2-Epub”.
This has worked, essentially forever, until a recent update.
Now, using the plug-in’s own built in template for the download list, we get links for all the versions, but they all download the LAST version. The various versions are not downloadable. The /v=### or /version=2-epug doesn’t get added to the download link, and if I try to create the appropriate url manually i get them message “No file paths defined.”
This is “bad”
the call in the Gazette-downloads page is:
Downloads:
[downloads orderby=title order=DESC]which looks fine to me, and as I said, I’m using the provided template for the version list.
it outputs
- Grantville Gazette Volume 76
- Version – 4: RTF
- Version – 3: HTML
- Version – 2: EPUB
- Version – 1: MOBI
- Version – 4: RTF
- Version – 3: HTML
- Version – 2: EPUB
- Version – 1: MOBI
Grantville Gazette Volume 75
in the case of Vol 76, all the links point to https://grantvillegazette.com/wp/download/grantville-gazette-volume-76/
and in the case of 75, they all point to
https://grantvillegazette.com/wp/download/grantville-gazette-volume-76/Here’s the code for the template from the plug-in’s content-download-version-list.php
<?php /** * List of versions */ if ( ! defined( 'ABSPATH' ) ) { exit; } // Exit if accessed directly /** * Shows title. */ /** @var DLM_Download $dlm_download */ if ( $dlm_download->get_version()->has_version_number() ) { $something = $dlm_download->get_version()->get_version_number() ; echo $dlm_download->the_title(); } $versions = $dlm_download->get_versions(); if ( $versions ) : ?> <ul class="download-versions"> <?php /** @var DLM_Download_Version $version */ foreach ( $versions as $version ) { ?> <li><a>get_download_count(), 'download-monitor' ), $dlm_download->get_download_count() ) ?>" href="<?php $dlm_download->the_download_link(); ?>" rel="nofollow" > <?php if ( $version->has_version_number() ) { $thisVersion = strtoupper(str_replace(".",": ",$version->get_version_number())); echo 'Version - ' . $thisVersion; } ?> </a></li> <?php } ?> </ul> <?php endif; ?>'- This topic was modified 8 years, 3 months ago by .
- This topic was modified 8 years, 3 months ago by .
- This topic was modified 8 years, 3 months ago by .
The page I need help with: [log in to see the link]
The topic ‘Problem with downloading versions’ is closed to new replies.