Jump to content

Feeds Issue


pRieStaKos

Recommended Posts

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 by priestakos
Link to comment
Share on other sites

In Chrome, Edge and Internet Explorer. Still the same

yet in Firefox, it works... :?:

 

0Nc3aEL.png

 

and if you call the feed directly in Chrome, it outputs correctly... :roll:

 

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!

Link to comment
Share on other sites

<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&currency=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&currency=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&currency=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&currency=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

Link to comment
Share on other sites

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&currency=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&currency=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.

Link to comment
Share on other sites

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...:idea:

Edited by priestakos
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated