PaulB
Well-known member
- Affected version
- 2.2.4
Steps to reproduce:
Some preliminary debugging indicates this likely happens due to select2's "tags" feature. The first copy of the tag corresponds to the
- Create a new thread with a unique tag. That tag must not be used anywhere else.
- Click the tag edit link in the thread to edit its tags.
- Click the "x" next to the tag to remove it.
- Submit the form by clicking "Save", but do not refresh or navigate away from the page.
- The tag should now be deleted from the database, since its last xf_tag_content entry has been removed.
- Click the tag edit link in the thread to edit its tags again.
- Type the name of the tag.
- Press Enter.
- The tag will appear twice:
Some preliminary debugging indicates this likely happens due to select2's "tags" feature. The first copy of the tag corresponds to the
<option>
that was created from the dataset. As the tag has been deleted, it's no longer in the dataset, but the <option>
(or some other reference to it) still exists in the select2 instance. The second copy of the tag corresponds to a new <option>
that's created by select2 as a placeholder for values that aren't in the dataset when the config contains tags: true
.