[s2File /] not showing up - Really Weird or I am really tired!

Something weird has happened this evening, I am not for sure what’s going on. I may be over tired I don’t know. I went and created a [s2File /] shortcode for a download on a page. Nothing is showing up. I am 100% sure I have the correct syntax. For all the other download links on my site I have created some short code that handles them, kind of like a template, and it is working fine. I just don’t know where to look to figure out what is going on. Can anyone help me.

Also note, I just tried with a regular S2member download link not using shortcode and it worked. Other shortcodes on my site are working, just not S2Member shortcode. I don’t even know how to analyze the problem.

Thanks

This is far too vague to enable anyone to help. For example, I have no idea what this means:

You need to provide some examples. You also need to paste here the shortcode that isn’t working as well as an example of the “regular s2Member download” links that are.

Hi KTS915,
I understand it is somewhat vague and I apologize for that. An example of a shortcode that isn’t working would be [s2File download="example.zip" download_key="true" /]. When I put that shortcode on a page it doesn’t show anything where the code is, it is just blank.
For the downloads on my site I created a hack and put it into MU folder. Krum, whom I’m sure you know helped me develop the code. Basically all it does is act like a template for pages on my site so if I need to change something I don’t have to do it on every page I can do it one area and it will update 100’s of pages. I could send you the code if you think that would help. It’s some basic functions with nothing too fancy. It’s working fine. It’s been on the site for over a year. I just noticed the shortcode issue happening last night. Other shortcodes from other plugins are working fine on my site too. Don’t know if I missing something that is obvious or not, but it sure is weird. Please let me know what other info I can give you for help.
Thanks

Have you tried using the browser inspector on the page where the link isn’t showing up? (Right-click and select Inspect Element or hit F12.) The problem might be something as simple as being hidden by CSS.

If you can’t find the cause that way, then I think the most helpful thing would be to compare the problematic shortcode with the hack you have that is working, to see if the difference between them indicates where the problem lies. Since Krum already knows that code, then he’s probably the best person to ask.

Ok, here are a few things I tried, but no luck.

  1. I tried the browser inspector and couldn’t find anything. It just wasn’t there to even inspect.
  2. I put different shortcodes from different plugins on the same page, and the other shortcodes worked, no love from S2Member
  3. I disabled any new plugins that I have installed to see if there was any conflicts, no luck
  4. I deleted the hack to see if there was any conflict, but there wasn’t. It still didn’t work.
  5. I checked to see if it happens on my staging site, just to eliminate some weird server thing. S2Member shortcode still didn’t work on the staging site.

Any ideas on what I should try next?
Thanks

This is the significant point. The rest simply follows from that. The most common reason for that is a typo. Another possibility is that s2Member’s code has somehow got lost from the site’s .htaccess file.

A typo? You lost me here…:confused: Where should I look for a typo at?

I am not very familiar with the .htaccess file, but if there was a problem with the .htaccess file, wouldn’t it have problems with the my hack that is working also?

A typo is a mistake (such as a misspelled word) in typed or printed text. So I’d be checking that I spelled the file name correctly. But I’m guessing you already did that, which is why I also mentioned the .htaccess file.

I don’t know, since I don’t know what your hack says!

I’m not for sure why, but it is now showing something on the page…
https://www.example.com/?s2member_file_download_key=05f92e2371f8335d9f856825434f98d0&s2member_file_download=/testfile.zip
Now I am even more confused…:confused:

Can you create a public test page with a shortcode so I can take a look?

I just sent you a message with the link

What seems to be happening is (a) it isn’t being recognized as a link and (b) it is adding a slash before the file name.

That suggests to me that either there’s a problem with your .htaccess file or else there is some sort of security in place that is interfering. If it’s the latter, it could be a security plugin, something installed by your host, or security headers in your theme’s header.php file.

I didn’t even notice the slash before you said that. When you said … [quote=“KTS915, post:12, topic:2893”]
security headers in your theme’s header.php file.
[/quote]

I remember I recently installed a plugin called “Insert Headers and Footers”, however when I disabled the plugin and refreshed the page the problem still existed. Would it be possible that the plugin is causing the conflict somehow? I wouldn’t even know what to look for in the .htaccess file. Are you referring to the one in the S2Member files directory?

I doubt your headers and footer plugin caused this problem. Security headers are a very different thing, albeit that they still go in the header file.

The relevant .htaccess file is the one in the root folder of your site. You should be able to download it using FTP. You should see some lines referring to s2Member. If they are not present, then that’s probably the cause of your problem. If they are present, then I think it’s time to talk to your host.

@MoeJoe: Go to “Dashboard -> Settings -> Permalinks”, change nothing, but save it. This re-creates your .htaccess file with need configurations, which can be different for any site. Do this only if you have no manual changes in the .htaccess file. Actually, can do this is that case too, but will need to add changes again.

Hi Krum,
Good to hear from you. I will try that as soon as I can and let you know. On a side note, I have some work I need help on, I will put it on your site soon. Thanks!

Ok guys so I went and re-saved the permalink structure but nothing changed. I looked at the htaccess file and it does reference S2Member. I don’t think it host related and here is why. I have my live site on one host and I have my staging site on a totally different host. Both the staging and the live site are doing the exact same thing. I would think that if it was host related it would not do it on the staging site… What should I try next?

I am out of ideas. But Krum knows your working code so might be able to work out why that works while a regular link doesn’t.

I know it’s crazy. We’ve eliminated plug-ins, htaccess file, hosts, CSS problem and deleted the hack. I don’t know. :sob:

Any changes and updates recently? May be plugin or theme conflict…

At a side note, if you are an apple harvester, would you remember that apple, that you grab from the tree 3 weeks ago? :slight_smile: Sorry, can’t remember the code I suggested. I work on lot of sites daily…