Move Pages Plugin

Ahh, I see now. Let me check the issue.

I’ve found the issue. I’ll fix the issue in next release. Thanks for help.

1 Like

Version 2.3.0

:bug: Fixes

  • Hook argument issue fixed with cloning fix

:warning: Breaking Changes

  • Dropped PHP 7.4 support

Thanks @ahmetbora for the plugin’s new version but… It doesn’t work yet.

[...]
    'page.move:after' => function (Kirby\Cms\Page $newPage, Kirby\Cms\Page $oldPage, ?Kirby\Cms\Page $parent = null) 
    { 
      Db::update('Pages', ['pagePath' => $newPage->uri()], ['pageAutoID' => $newPage->pageAutoID()]);
      file_put_contents('page.move.after.log', $newPage->uri().'|'.$oldPage->pageAutoID() . PHP_EOL . PHP_EOL, FILE_APPEND);
    },

$oldPage->pageAutoID() (but $newPage->pageAutoID() as well) are null (see the screenshot after the pipe)

…Let me add one (strange) thing: I found moved pages are quite slower to load than other pages. I don’t have data to prove what I’m saying, and I don’t know how to track the page loading time in a simple way. I wonder if the old URI is cached somewhere (even if I deleted the cache folder), or… Don’t know.

Where the pageAutoID comes from? From content file, model or custom page method?

content file

I think I’ve fixed the issue in last release as 2.3.1. Could you test it, please?

Ok, now it seems to work! Thank you!

Thank you so much for reporting and testing :yellow_heart:

…Let me add one (strange) thing: I found moved pages are quite slower to load than other pages. I don’t have data to prove what I’m saying, and I don’t know how to track the page loading time in a simple way. I wonder if the old URI is cached somewhere (even if I deleted the cache folder), or… Don’t know.

This may be because if there are images on the page, images are processing (thumbs in media directory) for the new path for the first time.