Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lister: title label on one template affects all filter rows #1985

Open
Toutouwai opened this issue Oct 31, 2024 · 0 comments
Open

Lister: title label on one template affects all filter rows #1985

Toutouwai opened this issue Oct 31, 2024 · 0 comments

Comments

@Toutouwai
Copy link

Toutouwai commented Oct 31, 2024

Short description of the issue

I have two templates, one where the title field has been relabelled and one where it has the default field label:

2024-10-31_132044
2024-10-31_132124

The page structure is that the child page has "my_template" and the parent page has "my_parent_template".

2024-10-31_132159

I have Lister configured as below (typically this would be done via a Lister Pro config but this is to demonstrate that the issue is with ProcessPageLister).

$wire->addHookBefore('ProcessPageLister::execute', function(HookEvent $event) {
    /** @var ProcessPageLister $lister */
    $lister = $event->object;
    $lister->useColumnLabels = true;
    $lister->initSelector = 'template=my_template';
    $lister->defaultSelector = 'title%=, parent.title%=';
});

Note how the title field label for my_template seems to be affecting all title fields that are used in the Lister filters. The problem doesn't occur in the column labels.

2024-10-31_132638

For a parent.title filter I don't expect that Lister could detect a relabelled title field (if that had been done) because the parent template could be anything, but it should just show the default label of "Title" because the custom title label for one template won't make sense for other templates.

Setup/Environment

  • ProcessWire version: 3.0.241
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant