in my rich body text fields, when an internal page is used for a link, the url that gets attached to the a tag is "https//example.com/example", ie it's missing the colon and the link doesnt work. I get the error "https's server ip address could not be found".
any idea why it is doing this? thanks
Check the site record under Sites -> Settings. The hostname field should NOT contain https - i.e. it should be example.com, not https://example.com.
in case anyone else has this issue, it seems having more than one site in wagtail caused this. I had the default localhost site still on there, even after switching to a new production site configuration. deleting the localhost site fixed this.
Related
I am saving images in my db field like data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDAAg......
When I display the images using
<cfimage action="writeToBrowser" source="#myField#"> on a normal page it works fine. When using in a cfdocument it doesn't work. I have seen some similar issues but haven't seen any of them work for me. I tried <img src="#myField#" /> but without any luck. Anyone get this working?
Thanks
When I've seen this before it was the CF 'browser' on that server not being able to connect to the /CFFileServlet/_cf_image/_cfimg-...PNG URL over loopback on that box. The exact cause and solution will depend upon how your web server, site config, SSL, firewall, routing, DNS are all set up.
Have you looked at error logs in CF Admin for the requests with the image errors? If you get no clues there then one way to help diagnose where it's failing is to wrap your <cfimage action="writeToBrowser" code in a <cfsavecontent> or <cfxml> tag to extract the src URL of the temp image written, and then see what result you get if you try and hit that same URL with a cfhttp call from the server - you should hit the same problem that cfdocument is getting, but you'll be able to dump out any errors to troubleshoot.
Depending upon the cause in your case, one of the following methods should work:
if the CF browser is unable to resolve its own hostname then add the site's domain to your server's local HOSTS file;
if a different vhost / IIS Site is being used when navigated to from the box itself than from the outside world, then make sure that the /CFFileServlet/ mappings are still visible on that site;
if cfdocument/cfhttp get SSL errors, ie if your site is using (or rewriting http to) https for these image requests, then make sure that your site's certs are trusted by your CF keystore;
Check your firewall config isn't blocking these internal requests.
Other lesser workarounds if you don't have access to solve above environment type issues:
a) rewrite the src URL from a relative URL to an absolute file:/// URL when used with cfdocument only.
b) if there is a localhost mapping to your site (on port 80 or otherwise) that is visible on your server, then you can try rewriting the src URL to use that instead of the FQDN.
c) instead of using writeToBrowser, write the cfimage output to a path of your choice that you can prove works with cfdocument/cfhttp and output your own img tag to serve the image from that path.
In my experience you'll see a lot of posts around about cfdocument and image paths and using localUrl=true - but where cfimage writeToBrowser is involved I have always found I needed
to use localUrl=false and rely on absolute URLs.
Just use isBase64="yes" attribute in your cfimage tag.Like this,
<cfimage isBase64= "yes" action = "writeToBrowser" source="#myField#" >
I've a django app hosted on pythonanywhere servers.
Some days ago, while editing this website, I've added in the settings.py file some variables about the https and ssl connection.
Obviously I didn't want the https while I don't have the certificate, but I forgot those variable in the settings file.
After the upload of files, going on the site, I saw that I've forgot those variables.
I've immediatly deleted the variables from the settings file and re uploaded, but the problem persists.
I mean, if I go to the site there is a redirect to https that I don't want.
The outcome is "Connection is not private" whit a red barred https.
Could you please tell me how to fix this problem? how to remove the automatic redirect to https and aboid the message "connection is not private" ?
Thank you in advance!!!
edit:
I know that if I go to http://siteaddress everything is ok. but if in the address bar you put just www.siteaddres.com it's automatically redirect to https://www.siteaddress.com
It was a caching problem.
I'm using google chrome and when you go to Clear browsing data you have to set all and not just the last hour or what it's set
I host this website. And I order a domain for it. SO the site is hosten on somedomain.be/boring
I added a domain www.company.com
Now In the webmastertools of google if I want to add the property they wil not verify it despite the DNS record, TXT, TAG, and file.
How Can I fix this?
I changed the config to HTTP redirect. That way it can be crawled but then I changed it back to cloaking again.
I have two sites that share the same problem, they are both hosted on Amazon EC2.
The machines are Debian 6.0, with an nginx server in front serving media, and proxying to apache+mod_wsgi to serve django.
Normal navigation on the site works fine, but whenever I click on a link without a trailing slash, or I submit a form, instead of redirecting me to www.domain.com/path/to/page/ I will be shown ip-11-111-11-111/path/to/page/, with ip-11-111-11-111 being my AWS internal IP address. The forms/links are working as the python code is executed, but when the templates are called, the url is 'built' wrong. Setting APPEND_SLASH = True doesn't fix it, and the same behaviour happens with the admin site, so I suspect it is some general issue rather than a bug in my code.
Has anybody encountered this problem? Any suggestions on how to solve it?
I've been googling this for weeks now and still can't figure it out, any ideas on where I should be looking would be appreciated as well.
In case anybody else has the same problem, the issue was apache redirecting non-www sites to the address it was listening on, which was the internal ip. I fixed it by forcing www. in nginx so that apache will never need to redirect.
I have the following set up.
On my dns:
an A name record that points my domain to an IP addres
On my server:
nginx -> gunicorn -> django
But when I submit a form (e.g. log in form) the address in the URL bar changes from my domain name to my IP address. This causes a Cross Domain Error.
This happens on forms and when I access mydomain/admin
when I access pages my domain name in the URL bar remains intact. When I go to mydomain/admin it automatically switches to the IP w/o submitting any other forms. Any other time I have to submit a form for it to change to the IP address.
All my media and everything use mydomain in the path. It is the strangest thing. I only first noticed it when I went to my admin page, but didnt think much of it. But I just added a few forms and now I can't submit the forms because the forms try to submit to the IP address causing the cross domain error.
I should add teh forms are auto generated by django-registration.
Look for your IP in your settings.py file. It could be a setting like MEDIA_URL set to use your IP and not your domain.
This has to mean that your forms are configured to submit to the IP address. Look at the source of your form and look for the form tag:
<form action="http://(ip here?)/form/" method="GET">
Make sure that IP address isn't inserted there. You could use a relative URL. I normally leave it blank since most of my forms are processed by the same view that generated the form to begin with.
I'm assuming that you were developing locally at some point and this did not occur so I'd suggest it's something in your Nginx config. Can you use Firebug/Web Inspector to see if there's any redirects happening from your domain to your IP?
I'd also check to make sure that your Site's URL is correctly set up in the admin. Sometimes this can cause incorrect urls although I don't think the cases you've mentioned apply.