Number of nodes is false when we have a multilingual website.

Created on 22 June 2022, over 2 years ago
Updated 27 March 2023, over 1 year ago

Encountered problem :

In a custom block i need to use the static function taxonomyTermCountNodes() to know exactly how many nodes contains the taxonomy term. The problem with this function is that it return all nodes counting all the languages so for each content translated the count is equal to +1.

Proposed solution

To resolve this, we need in database request the current language to return only the count of the current language.

πŸ› Bug report
Status

RTBC

Version

1.0

Component

Code

Created by

πŸ‡«πŸ‡·France bakop Lille

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024