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

Update searches.php: Fixing panel search when uuids are disabled #6395

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

toebu
Copy link
Contributor

@toebu toebu commented Apr 12, 2024

This PR fixes a bug that would break the panel search when uuids are disabled

I couldn't find an open issue about this (which surprised me quite a bit). If UUIDs are disabled, the panel search is completely broken since 4.0. This is a quick fix that I think fixes this, but this is my first time contributing to Kirby, so I'm not too sure...

Explanation of the fix: $page->uuid() returns null when uuids are disabled. Calling toString() on null throws an exception. With the fix, toString() is not called and null is used instead.

Fixes

  • Panel search fixed when UUIDs are disabled

Ready?

  • In-code documentation (wherever needed)
  • Unit tests for fixed bug/feature
  • Tests and checks all pass

For review team

  • Add lab and/or sandbox examples (wherever helpful)
  • Add changes & docs to release notes draft in Notion

@afbora afbora added the type: bug 🐛 Is a bug; fixes a bug label Apr 20, 2024
@afbora afbora added this to the 4.2.1 milestone Apr 20, 2024
@bastianallgeier bastianallgeier merged commit 0077473 into getkirby:develop-patch Apr 23, 2024
7 checks passed
@bastianallgeier
Copy link
Member

Thanks for this fix!

@toebu
Copy link
Contributor Author

toebu commented Apr 24, 2024

Awesome, thanks for merging so quickly!

@distantnative distantnative modified the milestones: 4.2.1, 4.3.0 Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Is a bug; fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants