So I have my ckeditor working nicely together with the uploader of the fckeditor.
But only on localhost.
When uploaded to my server, the file manager uploads the Photo to the designated folder, but doesn't seem to get the url back for implementing it in the editor. I then always get the error of "image source url is missing".
Can anyone tell me what I am missing here ?
How come it works on localhost and doesn't on the server ?
I do think I changed all the appropriate paths.
Cheers
Chris
I found the solution of this error in CKEditor when you upload image file. This problem is due CKEDITOR open dialog in a frame so ; for solving this error check the "X-FRAME-OPTION" in you htaccess and set the value to SAMEORIGIN instead of DENY. If it's not in your htaccess it's when you send http header in your app.
For PHP before send content just set header like this :
header('X-FRAME-OPTION : SAMEORIGIN');
For more information about X-FRAME-OPTION check this link https://developer.mozilla.org/en-US/docs/Web/HTTP/X-Frame-Options.
Best regards
in my case (in .htaccess) it was obligatory to unset the header value first which was added by (I suppose) server:
<ifModule mod_headers.c>
Header unset X-Frame-Options
Header set X-Frame-Options SAMEORIGIN
</ifModule>
clicking on a element in a page, my application change the src attribute of an img element.
I don't understand why firefox gets the images with this http headers:
pragma no-cache Cache-Control: no-cache
avoiding firefox to use his own cache.
Chrome, for example, doesn't.
Thank you
Luca
Before answer I should add some detail:
1. My application is behind Tomcat
2. I saw that that headers was added only for file bigger than 512KB
Solution was to modify server.xml in order to have bigger cache object
<Context cacheMaxSize="40960" cacheObjectMaxSize="2148" docBase="\\mypath\docbase" path="/graphics" />
see:
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html#Standard_Implementation
I just set up Apache 2.4 32-bit on my Windows 7 desktop and I am testing a simple AJAX website. I have an .htaccess file that directs all non-resource-file requests to index.php, and within this .php script I check $_SERVER["HTTP_X_REQUESTED_WITH"] to determine if a given request is ajax or not (I set this header myself when I send the ajax request).
Though the header is getting set, Apache seems to be dropping it before my .php script runs. I can see the request header in Chrome, but it's not there in the .php script. I even tried logging \"%{X_REQUESTED_WITH}i\" in Apache's access.log, but I don't see it there either.
This functionality works when the site is running on Bluehost. Do I need to configure Apache to get it to work on my local machine?
Apache 2.4 now drops all headers with underscores, for 'security' reasons.
According to their docs, you can add them by adding this to your htaccess:
SetEnvIfNoCase ^Accept.Encoding$ ^(.*)$ fix_accept_encoding=$1
RequestHeader set Accept-Encoding %{fix_accept_encoding}e env=fix_accept_encoding
Where Accept.Encoding and Accept-Encoding is the header name. Underscores are replaced with dots and hyphens respectively.
Related question here.
Boris' answer to the above question seems to make sense, but I installed the Font Awesome files on my server and the problem remains:
I looked into the library and found that the font files are included in the install, so the argument about cross-server access to fonts doesn't seem valid. I don't mind using the BootstrapCDN, but then Boris' suggestion seems to apply, and I don't know how to send the right CORS headers. (I tried it, but it doesn't work either.) Any idea how I can fix this, either using the "Bootstrap CDN" or the "default CSS"? (see also these instructions.)
PS: IE10 shows the glyph correctly.
Did you try Bootstrap CDN?
Just include <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet"> in your <head> section. Font files will be loaded automatically from CDN, too.
Checked this on Firefox and it works perfectly.
#Boris says:
Firefox only allows cross-domain linking of fonts if the server the font is on sends the right CORS headers.
So it's clear that it's CDNs duty to set the right headers, not yours. And them seem to do that correctly, because Firefox doesn't complain.
If you host fonts on your own server, keep in mind that cross-domain rule may still apply, e.g. font files places under example.com may be unaccessible from www.example.com, if www.example.com doesn't send the right headers.
Read this answer for tips about bypassing cross-sub-domain restrictions - this might help in your case.
Put in a custom CSS the following (for me it solved the problem):
#font-face
{
font-family:'FontAwesome';
src:url('./fontawesome-webfont.eot');
src:url('./fontawesome-webfont.eot?#iefix') format('embedded-opentype'),
url('./fontawesome-webfont.woff') format('woff'),
url('./fontawesome-webfont.ttf') format('truetype'),
url('./fontawesome-webfont.svg#FontAwesome') format('svg');
font-weight:normal;
font-style:normal
}
[class^="icon-"]:before,
[class*=" icon-"]:before
{
font-family:FontAwesome;
font-weight:normal;
font-style:normal;
display:inline-block;
text-decoration:inherit
}
I am having same issue, we use the fonts on router board using micro httpd.
i added Access-Control-Allow-Origin: * header but not working for me.
i found in firebug that the woff file is not returing anything in response text. the same thing if i use CDN url, everything works fine. so on local micro-httpd server need some mandatory header to configure. please tell me also the exact mime types for all fonts needed.
.ttf", "application/x-font-ttf"
.eot", "application/vnd.ms-fontobject"
.woff", "application/font-woff"
.svg", "image/svg+xml"
solution to make the fontawesome css work locally is to include the files under Fonts folder into the same directory of .html files(pages).
eg:File structure as of now where fontawesome is not working
prototype\pages\.html files
prototype\styles\font-awesome\css\font-awesome.min.css
prototype\styles\font-awesome\css\fonts\fontawesome-webfont.eot,fontawesome-webfont.woff
The issue here is that for a page loaded from a file:// URI, only files in (or below) the same directory of the filesystem are considered to be "same origin", and so putting the font in a different subtree (../font/) means it will be blocked by security policy restrictions.As Firefox disables cross-domain fonts "by default.
Instead change the file structure as below:
prototype\pages\.html files
prototype\styles\font-awesome\css\font-awesome.min.css
prototype\pages\fonts\fontawesome-webfont.eot,fontawesome-webfont.woff
place the fonts folder under pages directory which fixes the issue.Hope it helps.
some-class-name:before
{
content: attr(\f021);
}
worked for me
If you are the owner of your own server, you can add a HTTP header to deal with that problem. Problem based on cross domain policies.
example.com/font-awesome.woff
boo.example/index.htm
in that case you should add that header to example.com
Access-Control-Allow-Origin = "http://boo.example"
or
Access-Control-Allow-Origin = "*"
that will make your font file reachable from other sites or specific site.
Be sure your paths are correct. Use the fa class and the icon class like:
fa fa-envelope
and will work great..
Greetings.
We just started using Amazon Cloudfront's CDN to load our files and we are having trouble getting the #font-face fonts to load in Firefox. Per some recommendations, we added the following code to our htaccess file, but it doesn't seem to solve the problem.
<FilesMatch "\.(ttf|ttc|otf|eot|woff)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
The fonts do show up sometimes, but we still see errors in the console for each font. You can check it out at http://wiredimpact.com.
Also, the main WordPress post I used to learn about this is http://wordpress.org/support/topic/plugin-w3-total-cache-font-face-not-working-in-firefox?replies=21.
Any suggestions on how to get the fonts to load in Firefox correctly?
Thanks.
Edit:
I adjusted the code used in htaccess to:
<FilesMatch "\.(ttf|ttc|otf|eot|woff|font.css)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*.wiredimpact.com"
</IfModule>
</FilesMatch>
This not only adds the font.css file, which seems to help in Firefox, but it also only loads from our subdomains, which is better for security purposes. The fonts seem to be loading now in Firefox, but the errors are still showing up in the console.
As stated in icoMoon fonts doesn't show-up on Firefox by #meaganoff:
I was having issues with icomoon and Firefox as well. Have you tried
Paul Irish's 'bulletproof' #font-face syntax? It's a little
different than what icomoon outputs and I've had better luck with it -
no FF issues since.
#font-face {
font-family: 'Graublau Web';
src: url('GraublauWeb.eot?') format('eot'), url('GraublauWeb.woff') format('woff'), url('GraublauWeb.ttf')
format('truetype');
}
And worked like a charm!