You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 6, 2022. It is now read-only.
The following code doesn't seem to work anymore on kirby 3.5.
I use the latest autoid-plugin. $categories= site()->categories()->toStructure()->filterBy('autoid','58lfd99u');
echo count($categories) gives 0;
But following code works on the 'cat_title' $categories= site()->categories()->toStructure()->filterBy('cat_title','new');
echo count($categories) gives 1;
The text was updated successfully, but these errors were encountered:
Have you made sure the IDs have actually been assigned? You can simply check in the panel by removing type: hidden. If not, you might want to re-index.
since i am on parental leave right now i sadly do not have the time to debug this on my own. please try asking this in the forum.
my suspicion would be that the filterBy function tries calling whatever string is in the first parameter and it works for only if that results in a structure object. but i am not sure why it should fail for autoid.
the plugin registers a global helper and page method with that name but it does not extend the structure class.
I can confirm that filterBy() does not seem to be working any longer with autoid. As a temporary workaround, you can use filter(). Just tested and it seems to work as expected:
blueprint
site.txt
The following code doesn't seem to work anymore on kirby 3.5.
I use the latest autoid-plugin.
$categories= site()->categories()->toStructure()->filterBy('autoid','58lfd99u');
echo count($categories) gives 0;
But following code works on the 'cat_title'
$categories= site()->categories()->toStructure()->filterBy('cat_title','new');
echo count($categories) gives 1;
The text was updated successfully, but these errors were encountered: