Skip to content
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

Open
philipmarnef opened this issue Apr 15, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@philipmarnef
Copy link

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

@bnomei bnomei self-assigned this Jun 3, 2021
@bnomei bnomei added the bug Something isn't working label Jun 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants