News:

Wondering if this will always be free?  See why free is better.

Main Menu

Can't access SMF news and version file

Started by TheEnemy42, December 30, 2018, 07:28:43 AM

Previous topic - Next topic

TheEnemy42

SMF 2.0.15

This is apparently an ages old issue but for some reason it persists and I don't know how to fix it. This issue is that going to the Admin page, the page tries to connect to the news site and fetch a version history using this URL:

index.php?action=viewsmfile;filename=latest-news.js

The request expects a MIME type of application/javascript, however the server returns a Content-Type: text/html, making every browser block the script because they don't match. Chrome gives this console error message:

QuoteRefused to execute script from 'https://www.example.com/forum/index.php?action=viewsmfile;filename=current-version.js' [nofollow]; because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

I've tried getting every browser to ignore the MIME check but haven't been able to. However this is obviously a workaround and the real fix is for the server to return the correct MIME type. How do I fix this?

It's driving me nuts and I'm unable to upgrade automatically and my last upgrade took me hours because the manuel script messed up.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe producing bigger and better idiots.
So far, the universe is winning.

Arantor

First thing to check, go to the smf_admin_info_files table and check the filetype for current-version.js is listed as text/javascript.

Second thing, does the data column contain data for that entry?

Third thing, do you have the 'Fetch Simple Machines files' scheduled task running? If you manually run it, does it run successfully?

TheEnemy42

Thank you for helping.

I should note that the "index.php?action=viewsmfile;filename=latest-news.js" is blocked as well but I assume the reason is the same. Also the same happens regardless of themes.


1) Yes (text/javascript)

2) Yes (window.smfVersion = "SMF 2.0.15";)

The "latest-news.js" seem to contain this subject at the top: subject: 'SMF 2.0.15 has been released',

3) Yes. I can run it and it completes (time taken 5 seconds) but I can't find anything in the forum logs whether it completed successfully or not. The above subject could hint that it does in fact work.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe producing bigger and better idiots.
So far, the universe is winning.

TheEnemy42

Also, if I enter the URL manually into the browser it returns data well enough so apparently it's just the MIME type it doesn't like.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe producing bigger and better idiots.
So far, the universe is winning.

TheEnemy42

Programming today is a race between software engineers striving to build bigger and better idiot-proof programs and the universe producing bigger and better idiots.
So far, the universe is winning.

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Advertisement: