Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Since last week I get the following errors when trying to update the typekit fonts:
Notice: Undefined property: stdClass::$foundry in typekit_api_fontyourface_import() (line 69 of /home/patrickd/www/drupal7/sites/default/modules/fontyourface/modules/typekit_api/typekit_api.module).
Notice: Trying to get property of non-object in typekit_api_fontyourface_import() (line 69 of /home/patrickd/www/drupal7/sites/default/modules/fontyourface/modules/typekit_api/typekit_api.module).
This seems to me like typekit changed their api and told nobody..
Quick fix:
Changing in the fontyourface_font table:
Column: css_selector, Value: NULL, Change to <none>
Comment | File | Size | Author |
---|---|---|---|
#2 | typekit_api_change-1741004-2.patch | 1.79 KB | patrickd |
#1 | typekit_api_change-1741004-1.patch | 2.19 KB | patrickd |
Comments
Comment #1
patrickd CreditAttribution: patrickd commentedfollowing patch resolves this issue for me
- checks whether there's a foundry property in the returned data
- makes sure that
<none>
is set as css selector by defaultComment #2
patrickd CreditAttribution: patrickd commentedOops, removed some documentation.
rerolled against current 7.x-2.x
Comment #3
Drave Robber CreditAttribution: Drave Robber commentedTypekit has indeed made some changes: http://blog.typekit.com/2012/08/16/performance-improvements-to-font-serv...
They're saying "You don’t need to do anything"
but I'm not so sureand well, they may be right after all.For me, Typekit silently fails to import anything at the moment.(this was due to recent changes in my local setup, so totally unrelated)I successfully updated my two fonts in a trial library; could it be that this is related to some specific font that's missing foundry name?
Comment #4
sreynen CreditAttribution: sreynen commentedThis patch appears to have two changes: 1) adding a conditional check around setting the foundry info, and 2) Changing NULL to <none>. #1 seems good to me. I don't understand why #2 is there. Changing the selector from NULL to <none> means the fonts get loaded, but they're still not applied by the module. Are you applying Typekit fonts some other way? In any case, #2 seems like it should be a separate issue, unless I'm just completely missing the connection to #1.
Comment #5
patrickd CreditAttribution: patrickd commentedAs far I could see the service returned
<none>
at first, but now returns NULL instead. #2 just fixes this changeI have pretty much no idea why the api changed this way, I also could not find any documentation about the change itself.
I just encountered the issue and this patch seemed to be the only way to get it working again.
As far I can see #1, as well as #2 are necessary to make the module work with typekit correctly again, therefore I'd keep them in this issue.
Comment #6
sagannotcarl CreditAttribution: sagannotcarl commentedThe patch in #2 works for me.
Comment #7
Neslee Canil Pinto