wintercms / wintercms/winter

Taglist in relation mode fetches the data twice

Open
#1,331 12 comments 0 reactions 1 assignee View on GitHub

@mjauvin is already working on this.

Since Mar 24, 2025.

needs review
Dominant language
PHP
Stars
1.5k
Forks
246
Avg merge
19h 2m
Merged PRs (30d)
7

Description

Winter CMS Build

1.2

PHP Version

8.2

Database engine

MySQL/MariaDB

Plugins installed

No response

Issue description

Hi,

I have the following form field:

assignees:
  label: 'taglist'
  mode: relation
  customTags: false
  nameFrom: id
  options: true
  span: full
  separator: space
  type: taglist

I set options: true to have the getAssigneesOptions method called as the documentation states. However, for some reason the taglist control, executes the query by itself and then discards the result in favor of the data returned by the getAssigneesOptions method. In fact, I'm forced to set the nameFrom property to a valid model attribute in order to make the taglist work.

When setting options: true, the taglist control should not execute any query by itself.

Steps to replicate
  1. Create a taglist in relation mode.
  2. Set options: true
  3. Test it.
Workaround

Set nameFrom to a valid model attribute and it works as "expected".

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.