Skip to content
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

Uncaught TypeError on refreshOembed data #6

Closed
solonmedia opened this issue Jun 17, 2023 · 2 comments
Closed

Uncaught TypeError on refreshOembed data #6

solonmedia opened this issue Jun 17, 2023 · 2 comments

Comments

@solonmedia
Copy link

When the module updates oembed data via the cron job, I get an error message that appears in the admin:

Uncaught TypeError: FieldtypeOembed::getMatchQuery(): Return value must be of type PageFinderDatabaseQuerySelect, DatabaseQuerySelect returned in site-base/modules/FieldtypeOembed/FieldtypeOembed.module:322

I'm not sure if this is related to changes made on the PW side recently, but I thought I'd let you know about the issue.

Currently running v 1.1.5 of the module on v 3.0.220 of processwire.

@solonmedia
Copy link
Author

Looking into it further, the modules extends FieldtypeURL which inherits its getMatchQuery from FieldtypeText which returns DatabaseQuerySelect as a type.

Setting the function restriction in line 280:

public function getMatchQuery($query, $table, $subfield, $operator, $value): DatabaseQuerySelect {

seems to resolve the issue.

julianwinkel added a commit that referenced this issue Jun 19, 2023
@julianwinkel
Copy link
Member

@solonmedia Thanks for your contribution, I have removed the return type declaration from getMatchQuery.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants