craftcms / craftcms/cms

[3.x]: Only one selected category remaining on article save

Open
#13,205 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug craft3
Dominant language
PHP
Stars
3.6k
Forks
705
Avg merge
1d 5h
Merged PRs (30d)
134

Description

What happened?
Description

On selecting multiple categories for an entry and pressing 'save', only one is subsequently remaining.

Then if going back to select more, the multiple selections appear again, although not on save - and the entries do not appear in queries regarding that 'invisible' category. Have taken a series of screengrabs as attached.

Screenshot 2023-05-16 at 14 23 59
Screenshot 2023-05-16 at 14 24 11
Screenshot 2023-05-16 at 14 24 23
Screenshot 2023-05-16 at 14 24 35
Screenshot 2023-05-16 at 14 26 26

Steps to reproduce
  1. Select multiple categories.
  2. Save entry.
Expected behavior

Entry should be in multiple categories.

Actual behavior

Entry is only in one category.

Craft CMS version

3.8.10

PHP version

3.8.11

Operating system and version

Linux 5.4.0-147-generic

Database type and version

MySQL 8.0.32

Image driver and version

Imagick 3.4.4 (ImageMagick 6.9.10-23)

Installed plugins and versions

Amazon S3 1.3.2
Asset Usage 2.3.1
AsyncQueue 2.3.0
Blitz 3.12.9
Bulk Edit 2.0.6
Cloudflare 1.1.0
Control Panel Nav 3.1.0
Docs 2.1.2
Feed Me 4.6.3.1
ImageOptimize 1.6.50
Json Client 1.0.3
Logs 3.0.5
Minify 1.2.11
Redactor 2.10.12
Redactor Custom Styles 3.0.4
Redirect Manager 1.1.1
Relabel 2.0.2
Retcon 2.6.1
Retour 3.2.10
Schedule 0.3.2
shopify 2.2.0
Tags 1.0.9
Typogrify 1.1.20
Views Work 1.3.0.7

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.

Research direction

Reproduce the issue in Craft CMS 3.8.10 using the listed category-selection and entry-save steps, then trace the category assignment and entry query paths. Done means an entry retains every selected category after saving and appears in queries for each category; verify against the reported MySQL environment and plugin context.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, php
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.