100's of Download Links on Site Suddenly Stopped Working... HELP!

I am in need of some serious help. I have 100’s of of download link buttons on my site that have suddenly stopped working. I have angry customers because they cannot download the files that they are paying for.
Here is the code I have been using for years that is now not working…

<p style="text-align: center;"><a class="btn btn-primary btn-lg" role="button" href="[s2File download='access-s2member-level1/SandBox_0248.zip' download_key='true' /]" aria-pressed="true"> Download Sandbox File 0248</a></p>

Can someone please, please help me and quick as I do not know what to do.
Thanks!

Hi Joe.

You’re actually the first one I see reporting that. I don’t think that the s2File shortcode or download protection broke.

Could you verify that your s2Member is still active?

Is the /wp-content/plugins/s2member-files/ folder there?

Does the other linking method (without s2If shortcode) work? WP Admin > s2Member > Download Options > Advanced Download Restriction

I’d recommend that you folllow the steps recommended here: https://s2member.com/kb-article/common-troubleshooting-tips/ (you can ignore the MySQL warning in the Server Scanner)

For plugin conflicts, while logged in as the admin (won’t work to test behavior while logged out), you could try this: https://wordpress.org/plugins/health-check/

Let me know how it goes.

I will start troubleshooting and let you know what I come up with. Thanks!

1 Like

Also, I forgot to ask earlier, what is the behavior you get with those links now? Do you get the shortcode shown instead of the URL? Do you get the link but you get an error when trying to open the file? Or do you get sent to the Membership Options Page? Obviously you’re not getting the expected behavior, but what are you getting then. I’d like to understand better what you mean by “stopped working”. Thanks! :slight_smile:

It has a link but goes to a 404 page. I am having problem with the shortcode, it seems to not want to work at all. It’s like it doesn’t even see it.

Here is the link that is produced from the code at the beginning of this thread (the link is from my staging site but the same results are generated from my main domain which are on two totally different severs)…

https://dxfs.wpstagecoach.com/sandbox-dxf-file/swimming-shark-sandbox-file-0248/%5Bs2File%20download='access-s2member-level1/SandBox_0248.zip'%20download_key='true'%20/%5D

I then went and disabled all the plugins on the site except for s2Member and went to the default wordpress theme and here is the link that was generated from the same code but on a test page…

https://dxfs.wpstagecoach.com/testing-today/

Again here is the code that has been working until now…
<p style="text-align: center;"><a class="btn btn-primary btn-lg" role="button" href="[s2File download='access-s2member-level1/SandBox_0248.zip' download_key='true' /]" aria-pressed="true"> Download Sandbox File 0248</a></p>

I have a MU plugin running in the background that I have not been able to disable yet, but will as soon as I get to my computer to see if it is causing this problem, everything else is disabled. What are you thougts on this? Thanks!

https://dxfs.wpstagecoach.com/sandbox-dxf-file/swimming-shark-sandbox-file-0248/[s2File%20download=‘access-s2member-level1/SandBox_0248.zip’%20download_key=‘true’%20/]

The first part of that looks like a URL that isn’t for a protected file: https://dxfs.wpstagecoach.com/sandbox-dxf-file/swimming-shark-sandbox-file-0248/

And the last part is a corrupt s2File shortcode where the symbols got URL encoded: %5Bs2File%20download=‘access-s2member-level1/SandBox_0248.zip’%20download_key=‘true’%20/%5D (try it here: https://www.urldecoder.io/)

Did you get that same behavior in your conflicts test page? I couldn’t open it because it’s password protected.

Did you try the s2 URL for protected files without the shortcode? (assuming that dxfs.wpstagecoach.com is your WP installation) https://dxfs.wpstagecoach.com/?s2member_file_download=access-s2member-level1/SandBox_0248.zip

Yes the URL is not protected and it is not working correctly. None of the shortcode is. I can create a link and it is seems to work when it isn’t in the shortcode, however I have custom code and all my hundreds of links are shortcode and setup with a download_key=true which I need for certain scenarios on my site. I am confused on why it is not working. It does the same thing on two different servers so I think that would eliminate it being a server issue. On my staging site I have deleted all plugins including my MU plugin with custom code and have only s2Member with a default wordpress theme and the shortcode is still not working. I have also reinstalled Wordpress 5.2 and re-upoloade s2Member Pro. I just upgraded to php 7.3 and thought that may be the problem so I went down to 7.1 but there were no changes,

Help! What do I do now?

I could really use some help on what to do on this one. I existing and new customers whom are getting very restless. I have no idea on how to fix this… :confused:

I’m just chiming in here with what is probably an uninformed guess, but could it have something to do with the opening and closing brackets of the shortcode being URL encoded? Is there a way to try not encoding them? It seems like everything else you’ve tried has proven not to be the issue.

I’ve tried it without the shortcode not being URL encoded and it doesn’t even see the shortcode by itself. It’s like the shortcode isn’t even there. I appreciate the feedback on anything because I am at a loss.

Cristian (and others) is/are trying to help you, but you haven’t provided a URL to a page that anyone can look at, so you’re really asking for help while keeping us all blindfolded.

Are you using any other s2Member shortcodes that are still working? I don’t mean other s2File codes, but maybe an s2If code somewhere that does still work?

Here are 3 links to some pages with the code in it that is no longer working. The big read buttons that say CLICK ME is where the s2Member code is.

https://www.dxfs.net/dxf-spotlight/free-dxf-family-sign-dxf/
https://www.dxfs.net/dxf-spotlight/free-dxf-couple-in-love-on-beach/
https://www.dxfs.net/dxf-spotlight/dxf-spotlight-jungle-tiger/

I wasn’t trying to blindfold anyone, I am just a little freaked out because my entire site is not working and I have no idea on how to fix it or why it is broken.

Thanks for the links. Yeah, the shortcodes are showing up in the URL… Something is messing with your shortcode parsing apparently…

Can I have a closer look at your site? I may go offline in a bit, but if you message me soon, I could take a look at your configuration and those buttons. You can message me privately here with the login details, click on my name and then the blue message button. (if for some reason you can’t message here, write to support at wpsharks com).

I checked a few times before leaving last night and had not gotten the message, but now I saw it.

I logged in and saw that you are using Elementor. I went to one of those page’s editor for the section where the download button is and see that it has a box for the shortcode. And there’s a selector for the s2Member download link shortcode, but couldn’t find how to see the actual shortcode.

I think the way you are adding them to the page is definitely corrupting the shortcode instead of parsing it normally.

Could you try adding the shortcode to a normal page without Elementor? You say you had this same behavior in a clean installation of WP with just s2, can I see that? Thanks! :slight_smile:

I just sent you another message…

If you go to one of the custom content types like a “Sandbox File” the code will reside in the actual text editor. Let me know what questions you have.
Thanks!

Got it. I replied privately.

Got it. Thanks for the extra access.

I created a new page to do my tests.

I tried other s2Member shortcodes and they worked (s2Member-Profile, s2Get, etc), but not s2File. I verified that you have the Download Options configured to enable the feature, too.

I saw your test post, and see that the links didn’t work. I went to the test site’s /wp-content/plugins/s2member-files/ dir and it was empty. That’s why I was getting the 404s with the s2 download links.

So I uploaded an image, updated my test page’s s2File with this image’s name, and now the shortcode was parsed correctly and gave a link that works too. Then I tried the normal s2 download URL and it works as well. https://dxfs.wpstagecoach.com/wp-admin/post.php?post=5992&action=edit

So the shortcode and s2 are working. Check your s2member-files directory in the live site to verify that your files are actually there, please. If they are and you still can’t get it to work, then troubleshoot your dxfs_hacks.php hack, or how the shortcode is being handled by Elementor, or check for plugin/theme conflicts.

I hope that helps. :slight_smile:

If you haven’t found the problem yet the following is a suggestion…

Question: What changed?

Tech that works typically does not just stop working. Someone changed something. Either your host upgraded PHP on you, you or the host upgraded WordPress, or you added / updated a plug-in or theme.

Knowing what changed will tell you / us what the likely problem is.

So, for example, if you upgraded from WordPress V4.9x to WordPress V5.x and did not pre-install the classic editor plugin then WordPress will convert all your pages to Gutenberg pages. With Elementor installed that adds an extra level of mystery to the shortcode parsing but brute standard WordPress V5 upgrade from V4.9 may convert your shortcode page to a block type other than Classic block or Shortcode block. Shortcodes on WordPress V5 only work in Classic block and Shortcode block. Not saying that’s your problem…it’s just an example of how something that previously worked stops working. And it was related to a change…in this case a WordPress version upgrade.

3 Likes