# KQL plugin fatal error with Kirby 4

**URL:** <https://forum.getkirby.com/t/kql-plugin-fatal-error-with-kirby-4/31675>\
**Category:** Questions\
**Tags:** v4\
**Created:** [May 22, 2024, 4:38pm UTC](https://forum.getkirby.com/t/kql-plugin-fatal-error-with-kirby-4/31675 "2024-05-22T16:38:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adrieng](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/adrieng/32/14454_2.png) [@Adrieng](https://forum.getkirby.com/u/Adrieng)\
**Post date:** [May 22, 2024, 4:38pm UTC](https://forum.getkirby.com/t/kql-plugin-fatal-error-with-kirby-4/31675/1 "2024-05-22T16:38:08Z")

</div>

Hi there,

I already used the KQL plugin with Kirby 3 but I can’t get it to work with a project based on Kirby 4.

The code bellow throws a fatal error : `Access level to Kirby\\Kql\\Query::resolve() must be public (as in class Kirby\\Query\\Query)`.

I know that it’s not recommended to change the source code but just to try, I changed the `resolve()` method from protected to public, then it throws another error : `Declaration of Kirby\\Kql\\Query::resolve(string $query) must be compatible with Kirby\\Query\\Query::resolve(object|array $data = []): mixed`.

Both Kirby and the KQL plugin are up to date.

```javascript
const user = "xxxxxx.xxxxxx@xxxx.xxx";
const password = "XXXXXX";
const token = btoa(`${user}:${password}`);
const headers = {
  Authorization: `Basic ${token}`,
};

const request = {
  method: "post",
  body: JSON.stringify({
    query: "page('numeros')",
  }),
  headers: {
    Authorization: `Basic ${token}`,
  },
};

fetch("/api/query", request)
  .then((res) => {
    return res.text();
  })
  .then((json) => {
    console.log(json)
  });

```

Any idea ?

---

<div class="post-metadata">

**Author:** ![Adrieng](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/adrieng/32/14454_2.png) [@Adrieng](https://forum.getkirby.com/u/Adrieng)\
**Post date:** [July 10, 2024, 1:23pm UTC](https://forum.getkirby.com/t/kql-plugin-fatal-error-with-kirby-4/31675/2 "2024-07-10T13:23:46Z")

</div>

Installing manually the KQL plugin instead of using composer solved the problem.
