Skip to content

Indexing using a resource-instance uses the current app language for all localized values #12538

@jkemper-pca

Description

@jkemper-pca

Env: Windows 11
Version: 7.6.20b (dev/7.6.x)

Steps to replicate:

  1. Run Arches with at least two languages enabled
  2. Create a Resource Model that has a node that is set to resource-instance and use that node in the Descriptor function for any field
  3. Create a second Resource Model that uses a localized string as the Display Name Descriptor (can be the same model if the resource-instance is used for the Display Description but not for Display Name as it makes the function cyclical)
  4. Create at least one record in the model from Step 3 with the field used for Display Name to have a different string in all languages
  5. Create at least one record of the first model that has a related resource set to the record made in the previous step
  6. In the search view, the record will show with the descriptor based on the related resource in the language that was used when it was last indexed (either from editing it or running a model index)

This is because Descriptor function calls the get_display_value() function of the ResourceInstanceDataType class and passes a parameter for language but that value is not used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions