Title: Shortcode delivers wrong file
Last modified: June 11, 2024

---

# Shortcode delivers wrong file

 *  Resolved [Silo](https://wordpress.org/support/users/silo/)
 * (@silo)
 * [1 year, 12 months ago](https://wordpress.org/support/topic/shortcode-delivers-wrong-file/)
 * We’re having the following issue: several of our WordPress pages use shortcodes
   to pull download links/buttons into the content. In some cases, this works as
   expected. In others, the shortcodes appear correct, the download IDs the shortcodes
   use appear correct, the associated file within the downloads admin list looks
   correct, and finally the download file’s SDM node/post itself works fine if you
   drive directly to it, but the page that uses the shortcode will deliver a different
   file altogether.
 * This is an example:
    1. **The Page** that uses shortcode: [https://screensanity.org/tool/starting-points/](https://screensanity.org/tool/starting-points/)
 * ![](https://i0.wp.com/toddvanarsdale.com/screen-sanity/Screenshot%202024-06-11%
   20at%209.19.27%E2%80%AFAM.png?ssl=1)
 * **2.** The **Editing View** of that same page…
 * ![](https://i0.wp.com/toddvanarsdale.com/screen-sanity/Screenshot%202024-06-11%
   20at%209.27.52%E2%80%AFAM.png?ssl=1)
 * **3.** The **Associated File** for that ID (‘7015’) — Note the ‘Starting-Points-
   Handout-1.pdf’ file name…
 * ![](https://i0.wp.com/toddvanarsdale.com/screen-sanity/Screenshot%202024-06-11%
   20at%209.19.00%E2%80%AFAM.png?ssl=1)
 * **4.** Lastly, the (incorrect) **Delivered File** that the page using the shortcode
   sends to the user…
 * ![](https://i0.wp.com/toddvanarsdale.com/screen-sanity/Screenshot%202024-06-11%
   20at%209.19.20%E2%80%AFAM.png?ssl=1)
 * Again, the file node/post that SDM creates works fine. Everything, end to end,
   appears to work correctly, with the exception of the shortcodes we’re trying 
   to use.
 * Things we’ve tried…
    1. cleared multisite top-level cache
    2. cleared subsite cache
    3. cleared site optimization cache (we use Hummingbird)
    4. deleting, then re-adding the file
 * Any help you can give us with this is appreciated.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fshortcode-delivers-wrong-file%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Contributor [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [1 year, 12 months ago](https://wordpress.org/support/topic/shortcode-delivers-wrong-file/#post-17818707)
 * Thank you for reaching out to us. Also, thank you for adding so much details 
   regarding your issue and what you have tried so far. Because this issue is an
   isolated problem “No one has reported this so far”, and looks to be a bit tricky,
   I suggest the following.
 * Enable debug mode following the instructions below.
 * [https://simple-download-monitor.com/using-the-debug-logging-feature-to-troubleshoot/](https://simple-download-monitor.com/using-the-debug-logging-feature-to-troubleshoot/)
 * Then create a test page and add the shortcode you mentioned above. Carry out 
   a test download from the test page, then check the log file and report back with
   any findings. Hopefully the log file can pin point what is going on.
 * Let me know how you go.
 * Kind regards.
 *  Thread Starter [Silo](https://wordpress.org/support/users/silo/)
 * (@silo)
 * [1 year, 12 months ago](https://wordpress.org/support/topic/shortcode-delivers-wrong-file/#post-17820730)
 * Thank you for the response. After:
    - enabling debug mode
    - creating test page w/shortcode (id: 7015)
    - testing download
 * …the log file returned a single line:
 * _2024-06-12 17:08:33: [SUCCESS] sdm\_hd\_process\_download\_action triggered.
   Download request is being processed by the hidden downloads addon._
 * …I did reset the file and try once more. The returned lines were consistent:
 * _2024-06-12 17:12:12: Log has been reset.——————————————————- 2024-06-12 17:12:
   26: [SUCCESS] sdm\_hd\_process\_download\_action triggered. Download request 
   is being processed by the hidden downloads addon._
 *  Plugin Contributor [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [1 year, 12 months ago](https://wordpress.org/support/topic/shortcode-delivers-wrong-file/#post-17821390)
 * I assume that even though you created a test page and added the same shortcode
   with (id: 7015) it did not work. If that is the case, can you add a different
   file to download instead of (id: 7015). But make sure the new file to download
   is a new one added (Uploaded into your media folder). Let me know what happens.
 * Regards.
 *  Thread Starter [Silo](https://wordpress.org/support/users/silo/)
 * (@silo)
 * [1 year, 12 months ago](https://wordpress.org/support/topic/shortcode-delivers-wrong-file/#post-17823184)
 * **RE: debug, test page attempt** — correct, yes; the initial debug test page 
   download failed, again attempting to deliver the incorrect file.
 * **RE: new download file attempt** — added a new test file, updated the shortcode
   on the test page to the new test file ID, and tested download. Download was successful,
   delivering the correct test file. Log returned the following:
 * _2024-06-13 14:22:07: Log has been reset. 2024-06-13 14:22:17: [SUCCESS] sdm\
   _hd\_process\_download\_action triggered. Download request is being processed
   by the hidden downloads addon._
 * …so removing/re-adding files works. FYI, we’ve successfully rebuilt, and re-added,
   downloads before, but would like to pinpoint the underlying issue if possible.
   As you know, intermittent problems—or at least what appear, at the moment, to
   be intermittent—are the worst! 🙂
 * **EDIT:** I should mention the obvious too, that re-adding downloads resets the
   download counts and in so doing throws off the statistics the clients likes to
   keep tabs on…
 * **EDIT #2:** **RE: download counts** — though, I’m seeing now that download counts
   can be adjusted with an offset…
    -  This reply was modified 1 year, 12 months ago by [Silo](https://wordpress.org/support/users/silo/).
    -  This reply was modified 1 year, 12 months ago by [Silo](https://wordpress.org/support/users/silo/).
 *  Plugin Contributor [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [1 year, 12 months ago](https://wordpress.org/support/topic/shortcode-delivers-wrong-file/#post-17824176)
 * > …so removing/re-adding files works. FYI, we’ve successfully rebuilt, and re-
   > added, downloads before, but would like to pinpoint the underlying issue if
   > possible. As you know, intermittent problems—or at least what appear, at the
   > moment, to be intermittent—are the worst! 🙂
 * Yes, intermittent issues are the worst. Unfortunately there is nothing much we
   can do about it. Over time files, folders can become corrupted or unstable. Even
   plugins might become buggy and a simple reinstallation of the plugin fixes the
   issue.
 * Is your issue now resolved?
 * Regards
 *  Thread Starter [Silo](https://wordpress.org/support/users/silo/)
 * (@silo)
 * [1 year, 12 months ago](https://wordpress.org/support/topic/shortcode-delivers-wrong-file/#post-17826330)
 * **RE:** _‘…folders can become corrupted or unstable’_ — I agree. However, the
   issue, while intermittent, has also been consistent in popping up. This is the
   second or third time we’ve experienced this, and with different files.
 * This morning, I tested removing the the ‘hidden’ functionality, using straight‘
   sdm_download’ in the shortcode (as opposed to the previous ‘sdm_hidden_download’),
   and using the old ‘7015’ id. This works correctly and as expected. Given that,
   it seems that the issue is stemming from somewhere within the workings of the‘
   Hidden Downloads’ add-on.
 * We use our downloads as lead generators, so we’d like to keep direct links obfuscated.
   Again, if there is a way to resolve the issue (without having to stumble upon
   quiet failures, or have our users point out bad links, by re-adding the files),
   we’d like to help you troubleshoot it…
 *  Plugin Contributor [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [1 year, 12 months ago](https://wordpress.org/support/topic/shortcode-delivers-wrong-file/#post-17826669)
 * > Given that, it seems that the issue is stemming from somewhere within the workings
   > of the ‘Hidden Downloads’ add-on.
 * Are you referring to the following addon?
 * [https://simple-download-monitor.com/hidden-downloads-for-simple-download-monitor/](https://simple-download-monitor.com/hidden-downloads-for-simple-download-monitor/)
 * If you are please create a premium addon support ticket using the following link.
 * [https://simple-download-monitor.com/contact-us/](https://simple-download-monitor.com/contact-us/)
 * It is not permitted to discuss premium products in this forum.
 * Kind regards.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Shortcode delivers wrong file’ is closed to new replies.

 * ![](https://ps.w.org/simple-download-monitor/assets/icon-128x128.png?rev=973803)
 * [Simple Download Monitor](https://wordpress.org/plugins/simple-download-monitor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-download-monitor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-download-monitor/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-download-monitor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-download-monitor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-download-monitor/reviews/)

## Tags

 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * 7 replies
 * 2 participants
 * Last reply from: [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * Last activity: [1 year, 12 months ago](https://wordpress.org/support/topic/shortcode-delivers-wrong-file/#post-17826669)
 * Status: resolved