Hello,

I'm trying to access my projects that I have on my fonts.com account, whenever I go to

admin/config/user-interface/fontyourface/fonts_com/project?render=overlay

at top of the page it displays:
Notice: Undefined property: stdClass::$TotalRecords in fonts_com_get_projects() (line 367 of XXX/sites/all/modules/fontyourface/modules/fonts_com/api.inc).

below that it displays message that I have no projects, when I have like 5 of those on fonts.com

to get a "key" from fonts.com I have logged in with my account, but it generated the key, and hidden my account login details from the form.

And I dont see any dropdowns.

Thank you

Comments

sreynen’s picture

Priority: Major » Normal
Status: Active » Postponed (maintainer needs more info)

to get a "key" from fonts.com I have logged in with my account, but it generated the key, and hidden my account login details from the form.

I don't understand what you mean here. Can you explain?

sreynen’s picture

Issue summary: View changes

forgotten about adding what error says

narhir’s picture

StatusFileSize
new14.53 KB

Hello,

Yes, so here is my process in more details.

1. first I install the module
2. I enable modules: @font-your-face, @font-your-face UI, fonts.com
3. I click on "configure" next to the @font-your-face UI module
4. I go to "fonts.com" tab
5. I click on "Enter Fonts.com account information" and I enter my email + pass for fonts.com website.
6. The key under "Enter Fonts.com authentication key" is beign populated automatickly then. but the "login/pass" details disapear from: "Enter Fonts.com account information"
7. I move into "project" tab
8. at top on red abckground I see: Notice: Undefined property: stdClass::$TotalRecords in fonts_com_get_projects() (line 367 of /XXX/sites/all/modules/fontyourface/modules/fonts_com/api.inc).
9 below that:
Your Fonts.com account currently contains no projects. Start by creating a new project.

I'm attaching screenshot

narhir’s picture

Status: Postponed (maintainer needs more info) » Active

sory, I forgotten to change the status yesterday

sreynen’s picture

Status: Active » Postponed (maintainer needs more info)

Okay, so the email and password are intended to disappear once the key is loaded. Only the key is needed to load your account info and saving email and password would open up new security concerns.

So the only question then is why your key isn't loading any projects. If you can send me your key via my contact form, I can test it on my local install. Or, if you're comfortable debugging code, a dpm() of $response in fonts_com_get_projects() would be useful.

narhir’s picture

Status: Postponed (maintainer needs more info) » Active

Hi, and again I forgotten to change the status, you got email with my dpm output

narhir’s picture

Issue summary: View changes

small change

magicmyth’s picture

I'm also seeing the same issue with Fonts.com now:

Notice: Undefined property: stdClass::$TotalRecords in fonts_com_get_projects() (line 367 of sites/all/modules/contribs/fontyourface/modules/fonts_com/api.inc).

I have it working on a site but currently I'm moving the site to another server and when I came to setup the fonts on the new server I ran into this issue. I've found the Fonts.com side of the module to often be funny with showing projects. But now it just does not work. On my existing site the fonts continue to work but the Project does not show anymore. Fonts show in the browsing section but cannot be enabled due to no project being enabled. Maybe Fonts.com's API has changed?

magicmyth’s picture

Category: Support request » Bug report
Issue summary: View changes

Changing status to "Bug report" as this use to work fine.

magicmyth’s picture

I've just done a quick debug() statement on the server with the $response->data and got the following:

Debug: Decoded JSON Response:

stdClass Object
(
    [Projects] => stdClass Object
        (
            [Message] => Something went wrong please try again later.
        )

)
in fonts_com_get_projects() (line 366 of ~/sites/all/modules/contribs/fontyourface/modules/fonts_com/api.inc).

I am also seeing the same errors with my working servers so it seems the issue is specifically related to querying for the projects as the loading of the fonts themselves is working just fine.

Just in case its useful here is the debug of the entire $response object:

stdClass Object
(
    [request] => GET /rest/json/Projects/?wfspstart=0&wfsplimit=100 HTTP/1.0
Authorization: [[REMOVED]]
AppKey: [[REMOVED]]
User-Agent: Drupal (+http://drupal.org/)
Host: api.fonts.com


    [data] => { "Projects": {"Message": "Something went wrong please try again later." }}
    [protocol] => HTTP/1.1
    [status_message] => OK
    [headers] => Array
        (
            [cache-control] => private
            [content-length] => 75
            [content-type] => application/json; charset=UTF-8
            [server] => Microsoft-IIS/7.5
            [x-aspnet-version] => 4.0.30319
            [x-powered-by] => ASP.NET
            [date] => Sat, 23 Nov 2013 19:08:41 GMT
            [connection] => close
        )

    [code] => 200
)

Let me know if you want me to poke around anywhere else?

magicmyth’s picture

There is a chance I am running into Fonts.com having trouble with their system. Not sure on that yet but this exposed some incorrect handling of errors in the module. The attached patch fixes the error handling.

P.S. I hope I'm doing this right as the Drupal 7 upgrade of Drupal.org seems to have removed the upload field from the normal comment form :-/

magicmyth’s picture

Seems it was a Fonts.com problem as after a couple days the projects started showing. I think Fonts.com's systems are a bit shaky with making adjustments to project accepted domains. This may be what the op ran into as well.

I'm considering opening a new bug report on the handling of errors from Fonts.com and attaching my patch to that report. But if a dev wants to just take the patch as is, there won't be any point in doing that?

neslee canil pinto’s picture

Status: Active » Closed (outdated)