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

Migration from Boost v1 -> v2 and kirby v3.7 -> kirby v3.8 #15

Open
psntr opened this issue Oct 17, 2022 · 3 comments
Open

Migration from Boost v1 -> v2 and kirby v3.7 -> kirby v3.8 #15

psntr opened this issue Oct 17, 2022 · 3 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@psntr
Copy link

psntr commented Oct 17, 2022

Hello,

I was wondering if there is a specific steps to take in order to update the plugin in accordance with the latest Kirby release (+3.8.0), specifically related to the use of UUID, from my understanding, we don't need to provide the field:

boostid:
    type: boostid

on the page we want to use boostID with? There seems to have few changes I wonder if the changes might break current website if I blindly update Boost and Kirby?

Changes I meant are for the page models:
use \Bnomei\PageHasBoost; to use \Bnomei\ModelHasBoost;
or the ->fromBoostIDs() to ->toPagesBoosted()

Any recommendations would be appreciated.
Thank you!

@bnomei bnomei self-assigned this Oct 17, 2022
@bnomei bnomei added the documentation Improvements or additions to documentation label Oct 17, 2022
@bnomei bnomei changed the title Recommendations on updating Migration from Boost v1 -> v2 and kirby v3.7 -> kirby v3.8 Oct 17, 2022
@bnomei
Copy link
Owner

bnomei commented Oct 17, 2022

Thanks for asking. You pointed out most steps needed. This is what i would do but i have not tested it myself.

  • before upgrading kirby 3.8 run a plain php or terminal script to rename Boostid: to Uuid: in all content files. kirby should be fine with the boostids not matching their uuid string length.
  • in page models use\Bnomei\PageHasBoost; to use \Bnomei\ModelHasBoost;
  • ->fromBoostID() to ->toPageBoosted() and ->fromBoostIDs() to ->toPagesBoosted()
  • remove the boostid field from blueprints
  • remove existing cache files for boost plugin
  • debug => true in options to clear most caches and run BoostIndex::singleton()->flush() once (later does not auto clear on debug)
  • upgrade to kirby 3.8 and boost v2. maybe you need to remove boost first via composer remove and then add it again after upgrading kirby.
  • run website once
  • debug => false in options
  • run website again

@psntr
Copy link
Author

psntr commented Oct 19, 2022

Thank you for the clarifications. I will try that locally and let you know if that works. In the meantime, I'm trying to interact with the new collections files you added, but by using the example here, I have this error:

array_values(): Argument #1 ($array) must be of type array, Kirby\Cms\Pages given in line 30. Does that happen on your side too?

@psntr
Copy link
Author

psntr commented Nov 28, 2022

Finally had time to try to update one website. I can tell that it works as expected also the related fields worked. But I ran into few troubles when I had to rename the fields. So make sure to have backups.

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

No branches or pull requests

2 participants