Skip to content

$languages->find returns hidden languages. #1955

Open
@rharish101

Description

@rharish101

Short description of the issue

$languages->find includes hidden languages in the returned PageArray.

Expected behavior

It should not include hidden languages, just like $pages->find.

Actual behavior

It includes hidden languages.

Steps to reproduce the issue

  1. Enable multi-language support.
  2. Create multiple languages.
  3. Go to the Settings tab of one such language and click on "Hidden".
  4. Run $foo = $languages->find('name=XYZ'), where XYZ is the name of the hidden language from step 3.
  5. Observe that it returns a PageArray with the hidden language, by running echo $foo->first->name . ',' . intval($foo->first->isHidden()).

Setup/Environment

  • ProcessWire version: 3.0.227
  • (Optional) PHP version: 8.3.9
  • (Optional) MySQL version: 11.4.2-MariaDB

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions