Skip to content
This repository was archived by the owner on Oct 6, 2022. It is now read-only.
This repository was 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

@philipmarnef

Description

@philipmarnef

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions