This repository has been archived by the owner on Oct 6, 2022. It is now read-only.
Cannot get AUDOID() on a page translation that falls back to the default language #62
Labels
bug
Something isn't working
In a page controller (
$overview
) I get a collection of$article
pages with$site->find('articles')->children()
, then loop over these and get their autoid with the$article->AUTOID()
method.But when an article only has a default language version (because no translations were saved yet) and I access the overview page in the second language, the controller throws the error
Call to a member function autoid() on null
, I guess because the method can't find the default (fallback) page object.I fixed it by getting the autoid with
$article->autoid()->value()
, but I assume this is a bug.—
kirby3-autoid version: 2.7.6
getkirby/cms version 3.5.3.1
The text was updated successfully, but these errors were encountered: