I recently updated a site to Kirby 3 and found something strange: $pages->find() is not working as it did before. I used to get a result for $site->grandChildren()->find('page-title'), which is not working anymore. However, if I use $site->grandChildren()->findBy('uid', 'page-title'), using the identical page title, I get the page I want. To my understanding, those two lines should return the same page, right? At least that’s what they used to do.
Is this expected, or user error, or a bug?
I am giving a uid as parameter to find(), I use the same parameter that I use for findBy('uid'), which works fine.
Another thing I just noticed: the code that uses find() works fine in the two secondary languages on my site (German and French), but not in the first language (English). The UID of the page that is to be found is identical in all three languages. findBy('uid') works across all languages, find() only returns a result in German and French.
So am I correct in my understanding: the correct behavior would be that $pages->find() should not work with uids and only works with the full ids? Basically I was using it wrong before, which used to work and now stopped working in the default language but somehow still works in non-default languages?
If this is correct, then it was a bug before and now is still (but somehow less of) a bug. Or maybe it was a feature before (being able to use $pages->find() with a uid/slug) which now is not working correctly anymore?
Anyhow, I updated my code to use $site->grandChildren->findBy('uid', page-slug), so there’s a solution