I have a wordpress site that we recently made live. We built it with a temporary URL and then switched it to the live url. I'm getting a soft failure for the SSL because of the theme's default logo.png. I've done better search and replace to try and change it but it can't since it's hardcoded. How and where would I change that so that it shows the live url and is secured?
Website is hobnobevents.com
Error from whynopadlock.com: https://www.whynopadlock.com/results/828a837d-e8d4-4553-8492-5b1d7e784454
An image with an insecure url of "http://185.56.86.90/~onetoncr/hobnobevents.com/wp-content/themes/bodega/img/logo.png" was loaded on line: 1 of https://www.hobnobevents.com/.
Errors that are reported on line 1 are generally not part of the source code. This error may be caused by an external javascript file which is writing to the page, however we are unable to reliably detect these scripts in our automated test.
Please contact us using the "Need Help?" link below if you need assistance with resolving this error.
This File is Present in Your JavaScript.
URL of JavaScript
https://www.hobnobevents.com/wp-content/themes/bodega/js/default.min.js?ver=5.3.2
Code is
$j([theme_root+'img/logo.png']).preload()
Check this code or change the theme_root may help you.
Related
I recently made my website SSL certified, but now my calculator is broken.
Url: https://secondunitcentersmc.org/calculator/
Please help provide a solution, the only affected drop down is the first location one.enter image description here
Console Log Error:
angular.js:12011 Mixed Content: The page at 'https://secondunitcentersmc.org/calculator/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://secondunitcentersmc.org/wp-content/themes/secondunitcenter/calc/data/rents.json'. This request has been blocked; the content must be served over HTTPS.
Changing this URL to https does not work, (it causes the form to not appear) neither does changing $http to $https in both locations within the file
Image from scripts/app.js of my website. It is also a wordpress site.
So When I navigate to http://secondunitcentersmc.org/wp-content/themes/secondunitcenter/calc/data/rents.json it is automatically changing to https. In your js file where you make the call to this page, does the url there start with http or https?
Instead of using a json file for this data, you might want to consider creating a private custom post type for the locations, then you can just use the standard wordpress query to call them into the drop down. It will also be easier to add and edit them in the future. (and get rid of your https/http error :))
How did you add https to your site? with a plugin or manually? If manually- you need to update your site address and wordpress address in general>settings as well as add some code to your .htaccess file. more info here (method #2) https://www.wpbeginner.com/wp-tutorials/how-to-add-ssl-and-https-in-wordpress/
I have recently moved from localhost to my live website. I have a simple PHP login page. After the users details are checked with my mysql table and if the username exist and they provide a valid password for that username they are redirected to the home page. I was using the header function built in to PHP but this seems to be no longer working now that I am on my live website.
After further research it seems that I cannot use header tags after the page loads. So I am not echo'ing out script tags to window.location redirect to my homepage. The problem with this is that when the new location is being redirected to it appears to look like an additional web pages is loading in before my actual webpage that I'm wanting to go to loads in (This is probably due to the fact that I have extra error handling code that is running after the fact). Does anyone else experience this when using this method? Is there a better way to handle this?
This is what I'm using currently just in case there is any confusion
echo '<script>window.location.href = "home.php";</script>';
I was using the header function built in to PHP but this seems to be
no longer working now that I am on my live website.
Headers must be the very first thing that your script outputs or they won't work. PHP has a convenience feature called output buffering which temporarily holds back the output until the script is done. This allows you to put calls to header() anywhere in your code, and then PHP will automatically take care of moving headers to the front of the output for you. Thus, if you have output buffering enabled, you can put headers anywhere and it will still work. If you do not have output buffering enabled, you must put headers at the very start.
I will wager that you are generating output before the headers, and your local PHP install has output buffering enabled, while your remote host does not. You can fix this in one of two ways:
Update your code to ensure that nothing is output before calls to header().
Enable output buffering on your host by setting output_buffering = 1 in your php.ini.
I recently learnt you can do this with a meta tag:
<meta http-equiv="refresh" content="2;url=http://example.com/" />
I am new to Wordpress. I have just started the blog in which I can run my HTML / JS code properly. However, When I enter the affiliate code in my post, its not working.
Then I tried it on Local machine simply by just inserting that script but
It is also not working.
This is my code -
<div data-WRID="WRID-145208114021238062" data-widgetType="staticBanner" data-responsive="yes" data-class="affiliateAdsByFlipkart" height="250" width="300"></div>
<script async src="http://affiliate.flipkart.com/affiliate/widgets/FKAffiliateWidgets.js"></script>
I also tried by downloading this script to local machine and then simply giving the link to HTML but no luck.
I know this is something silly but I am not able to figure out. Please help.
It looks like #Jaromanda was on the right track.
I copy-pasted here in local file and in a local test Wordpress, and the script gets downloaded correctly. It shows an ad for flipkart, I suppose this is the expected behaviour.
To see what the script does, you can pass it through a beautifier to read it more easily.
The downloaded script creates an iframe element and sets the source of the iframe in order to display the ad. But to create the string representing this source, it uses, among other things, the window.location.protocol (see function createFKWidgetIframe). The location object represents the url of the document in which the script is run, not the location where the script comes from.
This window.location.protocol is usually http: or https:, but if you have it locally and not served through a local http server, then the adress bar in your browser will be something like file:///C:/path/to/the/file and the protocol window.location.protocol will be file:, and even if the iframe gets created, the source of the iframe will be set to something like file://affiliate.flipkart.com/widget/displayWidget?wrid=.... This location obviously does not exist. Please have a look at the source code of your page and see what the source of the iframe is set to, to confirm or not.
So if you do not serve the file through a local http server, there is no chance to load the iframe content.
If it also doesn't work on a Wordpress install which you access online, then I'm helpless. I could only advise you to check if you have ad blocker software/plugins or similar on your machine/browser, or if they get blocked by a firewall or a proxy you are behind.
I have the following problem:
HTML blank page on server 1.
WordPress site on server 2.
What I need is to call the content from www.wordpress.site/sample-page/ to HTML page on server 1, but not the entire page, only the part that I can edit from wp-admin; so without header and footer.
Also, I don't know if there is any other method, but I need it to be done via JavaScript/jQuery or Ajax.
I've used Google, but is hard to get a tutorial for this, I've tried a lot of tutorials, but none is what I need, and I don't know that much JavaScript to make it work.
SO, can someone help me please?
BIG Thanks!
Andrei
L.E.:
I've found this working: http://jsfiddle.net/mdawaffe/hLWdH/
It is working as it is written, if I try to change the domain with mine, will not work.
What script do I have to implement on the server from which the content is called (taken)?
For more information, as you asked:
I have a HTML + CSS + JS template that I will use with phonegap (if you don't know about it, try it, it's very useful) to create a mobile app for Android, iOS, and BlackBerry.
Now, I have this site: m.trafficvoice.ro (I hope I can post links here).
In the 'live stream' page (it's called services.html), I have a HTML5 audio tag/player.
What I need, is to get from www.trafficvoice.ro/whatever-the-name-page, the content, but only the part that I can edit in WordPress (so without header and footer).
Why? Because in the future there will be more stream to add, and maybe some of them will be down due to unknown reason, so I need to update that page, without making an update for the entire app, upload it to the store, wait for approval, the client to download it, etc.
Big thanks!
Andrei
Could you just use an iframe instead? You could modify a template in your theme to not display header/footer and then use that in the iframe.
When copying and pasting the following code for a Twitter button into a text file:
Tweet
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
I get a javascript error saying 'failed to load resource file://platform.twitter.com/widgets.js'
What could be causing this? Thought I should be able to just copy and paste the code from Twitter.
You're trying to load a protocol-less URL in a local file. Twitter is serving its script via //platform.twitter.com/widgets.js, which translates to the file: protocol locally. That's the best practice for serving content (it will not generate those annoying mixed content warnings in IE), but just plain won't work in local files.
Try updating that line of the script to https://platform.twitter.com/widgets.js. That should help you test locally; once you're done testing, flip it back to the protocol-less structure.
Are you sure you've entered the code correctly?
Try using a direct link target for your button like this:
just change the URL to wherever you want to point it, and the username to whatever username you use.
This code is the code from the site:
Tweet
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
Should the src be "https://......" rather than just "//....." ?