kirby-seo-preview-section icon indicating copy to clipboard operation
kirby-seo-preview-section copied to clipboard

Toolkit/Query class has been deprecated

Open Werbschaft opened this issue 2 years ago • 1 comments

With Kirby 3.9.1 a error message appears when trying to change the status of a page and the plugin is active in a section of this page.

Bildschirmfoto 2023-02-02 um 16 32 04

Werbschaft avatar Feb 02 '23 15:02 Werbschaft

Solution is quite simple.

Reference new class: https://github.com/REHvision/kirby-seo-preview-section/blob/91f63a3c2c20e0ff9c83398b3eec24c7d16c64e1/index.php#L4

use Kirby\Query\Query;

Update Query: https://github.com/REHvision/kirby-seo-preview-section/blob/91f63a3c2c20e0ff9c83398b3eec24c7d16c64e1/index.php#L66-L71

$qery = new Query($q);
$result = $qery->resolve([
  'site' => site(),
  'page' => $this->model(),
  'pages' => site()->pages()
]);

@REHvision Would you implement this, or shall I fork this repro and create a PR?

nelhop avatar May 05 '23 09:05 nelhop