Hi, after install @fontyourface and @fontyourface - Google Fonts, I'm trying to import the fonts but it remains on "Imported 0 of 4905"

And I get this error when I quit the import:
An error has occurred.
Please continue to the error page

An AJAX HTTP request terminated abnormally.
Debugging information follows.
Path: /fxj/en/batch?id=39&op=do_nojs&op=do
StatusText: error
ResponseText:
ReadyState: 0

Comments

ximx created an issue. See original summary.

BTMash’s picture

What happens when you do not quit the import?

BTMash’s picture

Also, is there anything in the watchdog logs? Something should be recorded there regarding being able to connect to google fonts.

ximx’s picture

If I don't quit the import the progress bar doesn't move and keeps on "Imported 0 of 4905"

I have searched on Recent log messages but there is any log related. Where there is an error is on Status report:

Entity/field definitions
Mismatched entity and/or field definitions
The following changes were detected in the entity type and field definitions.
Font
The font.field_classification field needs to be updated.
The font.field_supported_languages field needs to be updated.
The font.field_tags field needs to be updated.

What I did after was to import adobe edge fonts and uninstall google fonts. It worked but the error keeps on status report.

BTMash’s picture

Hmm, it sounds like the entity was not updated. Have you tried running the entity updates? Otherwise, I'd suggest reinstalling the module.

ximx’s picture

The error has gone reinstalling the module but I have tried again to import google font without success. However, adobe font works perfect.

Thank you!

ret5’s picture

Getting something similar from google fonts api. Can't import. Message below:

An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /batch?id=17&op=do_nojs&op=do
StatusText: Internal Server Error
ResponseText: {}

ret5’s picture

It doesn't appear that the D7 branch of @fontyourface has been updated since 2013. Understandable considering the focus on D8. Therefore, here's an alternate, lightweight method that I discovered that works well for using Google Fonts in Drupal 7 projects.

https://www.riverharbor.com/articles/how-add-google-fonts-drupal-7

BTMash’s picture

Status: Active » Closed (cannot reproduce)

I'm going to close this issue since the seems like this has moved over to being about D7 and this may have been related to the entity updates that needed to be done for this to work correctly. I believe there is an open issue on D7 for this.

lhugg’s picture

This error still occurs with D8:

An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /batch?id=30&op=do_nojs&op=do
StatusText: 500 Service unavailable (with message)
ResponseText: The website encountered an unexpected error. Please try again later.

ryanfc78’s picture

When I go to settings for @FONT-YOUR-FACE it says it has 6,482 fonts for Google. However when I do a search for Droid it will not show up. Not sure what is going on?

ryanfc78’s picture

Nevermind. For whatever reason Droid is no longer on Google Fonts.

benjen’s picture

I just received a similar message when trying to import google fonts, difference is in the path: /batch?id=6&op=do_nojs&op=do

barnoffice’s picture

Version: 8.x-3.0 » 8.x-3.2

I'm seeing the same problem that other people have reported. Font-you-face hangs we it tries to load the google fonts. It loads a few the stops with the same kind of error.

auxiliaryjoel’s picture

Yes I'm having same issue, it keeps saying "imported 12 of 6850", but then it will change to "7 of..." and back again to 12, 11 , back down to 7, etc. but the status bar never moves and the import never finishes

rwam’s picture

Same problem here, but with the latest dev-version which includes the patch from #2913984 the import works now.

alternativo’s picture

Using d8-7-10 same problem in importing google font remains with version fontyourface 8.x-3.2
Ok with .dev version
thanks

mikee’s picture

I also had this issue on Drupal when trying to import Google fonts. The fontyourface admin (admin/appearance/font/settings) got upto 12 and then went back to 0 and then went up and back again and so on. The problem was with MySQL and the resolution was to adjust the mysql configuration. I increased the max_allowed_packet from 4M to 64M.

After installing MySQL 5.7.30 for macos10.14 the default for max_allowed_packet was 4M.

I was running Drupal 8.8.5 and fontyourface version 8.x-3.2.

hondaman900’s picture

I am having the same issue with Drupal 8.9.13 and Font-your-face module 8.x-3.5. Any time I go to import any or all fonts, I get the following error:

An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /batch?id=26&op=do_nojs&op=do
StatusText: error
ResponseText: The website encountered an unexpected error. Please try again later.

Any suggestions? I checked permissions and they are set to any authenticated - still no joy. I'm on a shared hosting account with PHP 7.3.

This has left me dead in the water, so any suggestions on how to remedy this are very welcome.

mikee’s picture

Do you get anything in the Recent log messages?

If it refers to: "API key not valid. Please pass a valid API key" then the following might help:

https://www.drupal.org/project/fontyourface/issues/3183601