-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Internal Server Error: GraphQL fails to get oembed fields #46
Comments
Argh ok that’s abit weird. Can I know the lin Lyon used to get the error? |
Hm, I now downgraded to 1.2.5 but have the same error. It seems it has to do with my staging server as my local server has access to the field without any problem. the error log doesn't show any additional information. but I found an additional error:
|
Perfect 🙌 ill look at this tomorrow. Do you also have the link your trying to use? |
@reganlawton thx for the quick reply. I've send you an email with the link: https://www.basics.ynm.studio/de/hair-make-up/artists/kerstin-hoffmann/projekt/sir-ben-kingsley-a-ordinary-men?category=10975 the absolute strange thing: another project that has a different youtube embed works like charm. and when I copy the embed (https://www.youtube.com/watch?v=K5RQAK3SDEI) to my local backend it works as well. only some combination of entry + embed fails to load. |
@denisyilmaz ARGH! I see the error here. THis works for me {
entries {
id,
... on page_page_Entry {
media {
code,
providerUrl,
aspectRatio
}
}
}
} BUT this doesnt.. {
entries {
id,
... on page_page_Entry {
media
}
}
} Seems the issue here is I missing the return scope for the edge case for no sub set. As said the quick solve is as above, but I'll look into a solve for this. |
@denisyilmaz Give v1.3.2 a shot |
Hi @reganlawton From CraftCMS CP: "name": "PHP Fatal Error",
"message": "Interface 'craft\\gql\\base\\SingleGeneratorInterface' not found",
"code": 1,
"type": "yii\\base\\ErrorException",
"file": "/var/www/html/vendor/wrav/oembed/src/gql/OembedFieldTypeGenerator.php",
"line": 19,
"stack-trace": [
"#0 [internal function]: yii\\base\\ErrorHandler->handleFatalError()",
"#1 {main}"
]
} |
ah, I guess you tested this in CraftCMS 3.5, right? I'm still on 3.4.23. So 1.3.2 is not compatible with 3.4.23 resulting in internal Server error when using your plugin via GraphQL |
Argh I might have 🤔 I’ll have to patch this today. |
@reganlawton Answering myself: Downgrading |
Ok so the issue here is that the queries in 1.3.1 don't work if you don't provide the sub selection. In 1.3.2 the issue isn't there due to CraftCMS having a new class. I didnt realise I was developing on CC 3.5 Beta still which has the fix so Im currently trying to build a 3.4 and 3.5 working version. 1.3.1 Still works BUT you need to add the sub selection fields see my previous reply. I'm currently just in a the middle of two major SaaS releases this week so its been a bit tricky to find till in my +12hr days. But I am working on this promise 😅
|
I’m seeing a few issues here after bumping this install to Craft 3.5. GQLembedUrl {
code
width
height
}
# ~ or ~
embedUrl {
...on embedUrl_OembedField {
code
width
height
}
} 1.3.1 - Errors
1.3.2 - Null values
P.s. 12+ hour days here too. 😭 Sending luck. 🍀 |
Anon class means that it’s the fallback object 🤔 I’ll try look into this today. Yes it’s pretty crazy but hoping everything smooths out next week after my major launches. |
@reganlawton Have you had a chance to look at this? 🙂 We’ve got a delivery this week and I’m wondering if we need to swap out the oEmbed fields. |
@joshuabaker Im on it in a moment |
@joshuabaker also what's your running versions? Are you on the CraftCMS discord? Versions of the CraftCMS your going live with? 3.4 or 3.5? |
Yep. Same username as here. |
I have a new release v1.3.4 it seems it was an issue with PHP ?? operator and the PHP magic method __get(). If anyone continues to have issues please feel free to post here I'm much more free'd up with my two latest projects launching today. Otherwise feel we to ping me on Discord This issue has raised issues with my current release format and being that CraftCMS uses my plugin in its starter blog project, I'll be looking at future workflow to move to an alpha, beta, release format to allow for more stable releases moving into the future. Thanks again to everyone for their help with error logs and most importantly the patiences on this one. |
Thank you, @reganlawton! |
Since version 1.3.0 the oEmbed field fails in GraphQL with an internal server error. For example:
results in:
Undefined property: class@anonymous::$code
Versions:
CraftCMS – 3.4.22.1
oEmbed – 1.3.1
The text was updated successfully, but these errors were encountered: