pRieStaKos Posted December 1, 2015 Share Posted December 1, 2015 (edited) I'm having an issue on showing product infos in my main site, but in previous versions it was working. I got this console error in Chrome in every input i got in my website pages. Refused to execute script from 'https://whmcs.example.com/feeds/site.productsinfo.php?pid=2&get=name' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled. Anyone got the same error ? Edited December 1, 2015 by priestakos 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted December 1, 2015 Share Posted December 1, 2015 do you need the "site." before productsinfo.php ? 0 Quote Link to comment Share on other sites More sharing options...
pRieStaKos Posted December 1, 2015 Author Share Posted December 1, 2015 Yes, because i dont want the productsinfo.php (and other feeds) to be overwritten after the update. I have custom code and edits 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted December 1, 2015 Share Posted December 1, 2015 Yes, because i dont want the productsinfo.php (and other feeds) to be overwritten after the update.I have custom code and edits can't you call it productsinfo2.php or something similar - that will tell you whether the filename is causing the issue. 0 Quote Link to comment Share on other sites More sharing options...
pRieStaKos Posted December 1, 2015 Author Share Posted December 1, 2015 (edited) Ok.....And why now ? It was working before EDIT: Done it. No effect. Same thing Edited December 1, 2015 by priestakos 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted December 1, 2015 Share Posted December 1, 2015 Ok.....And why now ? It was working before WHMCS! hmm, if I add your productinfo2.php feed to a site, I can output the plan name and price without issue in Chrome. perhaps try another browser to see if it's only a Chrome issue for you. 0 Quote Link to comment Share on other sites More sharing options...
pRieStaKos Posted December 2, 2015 Author Share Posted December 2, 2015 In Chrome, Edge and Internet Explorer. Still the same 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted December 2, 2015 Share Posted December 2, 2015 In Chrome, Edge and Internet Explorer. Still the same yet in Firefox, it works... and if you call the feed directly in Chrome, it outputs correctly... I suppose its possible your custom code and edits are the cause - perhaps firefox is more forgiving than the others... difficult to advise on this! 0 Quote Link to comment Share on other sites More sharing options...
pRieStaKos Posted December 5, 2015 Author Share Posted December 5, 2015 <h2><strong>Πακέτα</strong> & Τιμοκατάλογος</h2> <div class="row"> <div class="col-md-12"><img class="img-thumbnail img-responsive" src="/sites/all/themes/Porto/img/vps_rack.jpg" /></div> </div> <hr class="tall" /> <p class="lead">Σας προσφέρουμε εύχρηστα και οικονομικά πακέτα φιλοξενίας, για να ανεβάσετε το site σας online. Επιλέξτε αυτό που σας ταιριάζει και δημιουργήστε το δικό σας προσωπικό site, blog ή ακόμα και ένα ολοκληρωμένο, επαγγελματικό site για την επιχείρησή σας.</p> <div class="row"> <div class="pricing-table"> <div class="col-md-3"> <div class="plan"> <h3><script language="text/javascript" src="//clients.cubric.gr/feeds/site.productsinfo.php?pid=2&get=name"></script><span><script language="text/javascript" src="//clients.cubric.gr/feeds/site.productsinfo.php?pid=2&get=price&billingcycle=monthly¤cy=1"></script></span></h3> <a class="btn btn-lg btn-primary" href="//clients.cubric.gr/cart.php?a=add&pid=2">Παραγγελία</a> <ul><script language="text/javascript" src="//clients.cubric.gr/feeds/site.productsinfo.php?pid=2&get=description"></script> </ul> </div> </div> <div class="col-md-3 center"> <div class="plan most-popular"> <div class="plan-ribbon-wrapper"> <div class="plan-ribbon">Δημοφιλές</div> </div> <h3><script language="text/javascript" src="//clients.cubric.gr/feeds/site.productsinfo.php?pid=3&get=name"></script><span><script language="text/javascript" src="//clients.cubric.gr/feeds/site.productsinfo.php?pid=3&get=price&billingcycle=monthly¤cy=1"></script></span></h3> <a class="btn btn-lg btn-primary" href="//clients.cubric.gr/cart.php?a=add&pid=3">Παραγγελία</a> <ul><script language="text/javascript" src="//clients.cubric.gr/feeds/site.productsinfo.php?pid=3&get=description"></script> </ul> </div> </div> <div class="col-md-3"> <div class="plan"> <h3><script language="text/javascript" src="//clients.cubric.gr/feeds/site.productsinfo.php?pid=4&get=name"></script><span><script language="text/javascript" src="//clients.cubric.gr/feeds/site.productsinfo.php?pid=4&get=price&billingcycle=monthly¤cy=1"></script></span></h3> <a class="btn btn-lg btn-primary" href="//clients.cubric.gr/cart.php?a=add&pid=4">Παραγγελία</a> <ul><script language="text/javascript" src="//clients.cubric.gr/feeds/site.productsinfo.php?pid=4&get=description"></script> </ul> </div> </div> <div class="col-md-3"> <div class="plan"> <h3><script language="text/javascript" src="//clients.cubric.gr/feeds/site.productsinfo.php?pid=5&get=name"></script><span><script language="text/javascript" src="//clients.cubric.gr/feeds/site.productsinfo.php?pid=5&get=price&billingcycle=monthly¤cy=1"></script></span></h3> <a class="btn btn-lg btn-primary" href="//clients.cubric.gr/cart.php?a=add&pid=5">Παραγγελία</a> <ul><script language="text/javascript" src="//clients.cubric.gr/feeds/site.productsinfo.php?pid=5&get=description"></script> </ul> </div> </div> </div> </div> I've changed the <script language="javascript"> to <script language="text/javascript"> and the console.logs are gone, but outputs are still not working. Source: clients.cubric.gr/feeds/site.productsinfo.php.txt 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted December 5, 2015 Share Posted December 5, 2015 i'm not entirely convinced that there is an issue with your feed - if I run it locally, using my WHMCS, it runs fine on all browsers (well Firefox, IE11 and Chrome - haven't checked the others!). only if I try to use the feed on your site is there a problem - still works in Firefox (but only in English, not Greek); also, not in Chrome or IE11 at all... same applies to the default productinfo.php feed on your site too.. but if I you use your html code and call the WHMCS demo data feed, that works in all browsers. <script src="http://demo.whmcs.com/feeds/productsinfo.php?pid=2&get=price&billingcycle=monthly¤cy=1"></script> I think this must be an issue with your server - that's the only thing I can think of why it would work with my v6 dev, the WHMCS demo, but not yours... I don't think it's a subdomain issue as even when I use your full URL for the feed, it still won't work in other browsers... and I doubt it's because the http(s) is missing from the links... Can you try making two changes for me... firstly in the page that calls the feeds, can you try removing the language="text/javascript" line (just edit one of the plans for now)... it either has to be language="javascript", or don't use it at all... locally it works for me removed. <h3><script src="//clients.cubric.gr/feeds/site.productsinfo.php?pid=2&get=name"></script><span><script src="//clients.cubric.gr/feeds/site.productsinfo.php?pid=2&get=price&billingcycle=monthly¤cy=1"></script></span></h3> <a class="btn btn-lg btn-primary" href="//clients.cubric.gr/cart.php?a=add&pid=2">Παραγγελία</a> <ul><script src="//clients.cubric.gr/feeds/site.productsinfo.php?pid=2&get=description"></script> also, try adding the feed to a WHMCS page, e.g homepage.tpl, and see if it works on there and open the clients.cubric.gr page directly - that might help to see if it's a server issue, or a Wordpress template issue/clash. 0 Quote Link to comment Share on other sites More sharing options...
pRieStaKos Posted December 5, 2015 Author Share Posted December 5, 2015 (edited) I removed language="text/javascript" but still its not working. I search a bit on Google. Lot of people got this issue, running .js files, and the thing is about default_mimetype in php.ini (or something). I tried to override this value with a custom php.ini in folder, but is stopped Drupal from running. So I have to search it more deeply, or change the fee code of WHMCS... The strange is that it stopped running few week ago. I'll look into it. Thank you anyway FIX: I found it. Drupal got the below lines in .htaccess that causing the problem # Add headers to all responses. <IfModule mod_headers.c> # Disable content sniffing, since it's an attack vector. Header always set X-Content-Type-Options nosniff </IfModule> I comment it and all worked out again... Edited December 5, 2015 by priestakos 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted December 6, 2015 Share Posted December 6, 2015 i'm glad you got it working again. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.