Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search

Question

Site URL: https://horse-potato-6mep.squarespace.com

Hi, I purchased 2 webfont licenses from MyFonts and am
in the process of referencing the kit to my trial page. I have installed the fonts sucessfully, but the line

@import url("//hello.myfonts.net/count/3af108");

keeps giving error message "f.location is undefine"
the @import line is responsible for the pageview count and I need to use it because my license is limited to a certain amount of views.
The MyFonts support team says "Unfortunately, that sounds like an error specific to Squarespace (it is not a standard CSS error) so for assistance with that I'd contact Squarespace directly.

Could anyone help me out here? I really need to
install this correctly to comply with the license.

Thank you in advance,
Martha Schmidt

css error.PNG

Share this post


Link to post

12 answers to this question

Recommended Posts

  • 1
16 hours ago, vincentvers said:

Can someone please help...
I have the same problem, but if I add my 


@import url("//hello.myfonts.net/count/3c1555");

in the code injection header it just appears as a line at the top of my website, but it doesn't work.

I have uploaded the font's and used this code in my custom CSS
 


@font-face {
  font-family: 'MonoSpec-Regular';
  src: url('webFonts/MonoSpec-Regular/font.woff2https://static1.squarespace.com/static/5f27084b74011038bfe3bfb8/t/5f3d403a2dd86858ae580f20/1597849659484/font.woff2') format('woff2'), url('webFonts/MonoSpec-Regular/font.woffhttps://static1.squarespace.com/static/5f27084b74011038bfe3bfb8/t/5f3d403a2dd86858ae580f20/1597849659484/font.woff2') format('woff');
}

h1, h2, { 
	font-family: MonoSpec-Regular!important; 
}
p {font-family: MonoSpec-Regular!important;
}

 

But nothings seems to work... i'm going mad.
Can anyone help me. 

 

 your code is invalid, edit this line

@font-face {
  font-family: 'MonoSpec-Regular';
  src: url('webFonts/MonoSpec-Regular/font.woff2https://static1.squarespace.com/static/5f27084b74011038bfe3bfb8/t/5f3d403a2dd86858ae580f20/1597849659484/font.woff2') format('woff2'), url('webFonts/MonoSpec-Regular/font.woffhttps://static1.squarespace.com/static/5f27084b74011038bfe3bfb8/t/5f3d403a2dd86858ae580f20/1597849659484/font.woff2') format('woff');
}

to this

@font-face {
  font-family: 'MonoSpec-Regular';
  src: url('https://static1.squarespace.com/static/5f27084b74011038bfe3bfb8/t/5f3d403a2dd86858ae580f20/1597849659484/font.woff2') format('woff2'), url('https://static1.squarespace.com/static/5f27084b74011038bfe3bfb8/t/5f3d403a2dd86858ae580f20/1597849659484/font.woff2') format('woff');
}

 


You can send your question to my email to get faster answer. / How to Setup Password & Share URL 

-- I'm Tuan. I work for a non-profit project (promote the establishment of free libraries). I check the forum once or twice a day to help out the community. If you don't see me answering your question, you can send it to the email above. There are so many questions every day so I can't answer them all at once, I will try to answer them in the next few days.

Share this post


Link to post
  • 0

Hi , Site seems Private Please make it public or password protected so I can have a look 🙂

To make it Public ot Password protected : 

Home > Settings > Site Availability 

Share this post


Link to post
  • 0
3 hours ago, humxahafeex said:

Hi , Site seems Private Please make it public or password protected so I can have a look 🙂

To make it Public ot Password protected : 

Home > Settings > Site Availability 

Hi, it's still a test site but I've set 2020 as the password so you should be able to view it now 🙂

Share this post


Link to post
  • 0
20 minutes ago, CopperCauldronArt said:

Hi, it's still a test site but I've set 2020 as the password so you should be able to view it now 🙂

Oh Thank you , Will you please try to change url in 1st line to https://hello.myfonts ... instead of //hello....  & let me know if it works or not 🙂

Share this post


Link to post
  • 0
2 minutes ago, CopperCauldronArt said:

I tried it - sadly there's still the error after adding the https

Got it , Actually you have to  use some file path in@ import like below instead of just link.

@import url("https://somelink.com/example.css")

If you just simply use the link it will return one of 2 errors :  f.location undefined or href is undefined.

Please try to use the link to file and let me know if it helps It should fix this issue 🙂

 

Share this post


Link to post
  • 0

thank you for this advice! 🙂 just one question - how do I get the file path? The css editor has "add images or fonts" and I can add all kinds of font files but no css file or something 🤔 I mean, to use my fonts, I uploaded them, and when I clicked the uploaded font file a custom url appeared in my css window which I used sucessfully. But what file do I add to get the code in question to work? Sorry if I'm being stupid, I have zero css knowledge and am totally winging it here 😞

Share this post


Link to post
  • 0

SOLVED!

I had posted this question on other locations too a while ago, and now in a facebook group a lady helped me put the thing in my header via code injection, instead of using the css window 🙂

Share this post


Link to post
  • 0

HI @CopperCauldronArt!

What exactly did you do to solve this? I am having the exact same issue installing a web font licensed from myfonts.com.  

Did you just paste the @import url line in to the code injection Header field? Did you have to include anything else before or after it in the code injection field? Or just the text provided by myfonts? This is mine --  @import url("//hello.myfonts.net/count/3b882c");  

Did you then delete that line from the CSS editor completely, or leave it there?  I've just tried doing this after reading your post, but it's still not working for me :(

Thank you in advance!

Share this post


Link to post
  • 0

So after you include the @import in the header go back to your custom css and add "!important" to where you want the font to be. Example: h1 { font-family: 'fontname' !important; }

It overrides any other styling that prevents your custom style from working. Not the best fix best fix but the only thing I could get to work so far.

Share this post


Link to post
  • 0

Can someone please help...
I have the same problem, but if I add my 

@import url("//hello.myfonts.net/count/3c1555");

in the code injection header it just appears as a line at the top of my website, but it doesn't work.

I have uploaded the font's and used this code in my custom CSS
 

@font-face {
  font-family: 'MonoSpec-Regular';
  src: url('webFonts/MonoSpec-Regular/font.woff2https://static1.squarespace.com/static/5f27084b74011038bfe3bfb8/t/5f3d403a2dd86858ae580f20/1597849659484/font.woff2') format('woff2'), url('webFonts/MonoSpec-Regular/font.woffhttps://static1.squarespace.com/static/5f27084b74011038bfe3bfb8/t/5f3d403a2dd86858ae580f20/1597849659484/font.woff2') format('woff');
}

h1, h2, { 
	font-family: MonoSpec-Regular!important; 
}
p {font-family: MonoSpec-Regular!important;
}

 

But nothings seems to work... i'm going mad.
Can anyone help me. 

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...