craftcms / cms

Build bespoke content experiences with Craft.
https://craftcms.com
Other
3.22k stars 627 forks source link

[4.x]: Conditional field (category relation) not displaying on non-primary site in multi-site install. #11892

Closed turnstylerj closed 2 years ago

turnstylerj commented 2 years ago

What happened?

Description

On a multi-site install with a conditional field set to a category ID relation, the field is not displayed when the category is selected if the entry is not on the primary site. It works as expected on the primary site.

Steps to reproduce

  1. Set up a multi-site Craft install.
  2. Create an entry type with a conditional field based on Related To, Category, and a category ID.
  3. Create a category selector field to associate entry with specified category.
  4. Create a new entry on the non-primary site and select the category.

Expected behavior

Conditional field shows when category is selected.

Actual behavior

Conditional field does not show when category is selected if not on primary site (works as-expected on primary site).

Craft CMS version

4.2.3

PHP version

8.1.3

Operating system and version

Linux 4.15.0-163-generic

Database type and version

MySQL 8.0.23

Image driver and version

Imagick 3.7.0 (ImageMagick 7.1.0-26)

Installed plugins and versions

"craftcms/aws-s3": "2.0.1", "craftcms/feed-me": "5.0.4", "craftcms/redactor": "3.0.2", "doublesecretagency/craft-cpcss": "2.5.0", "fortrabbit/craft-copy": "^2.1", "internetztube/craft-element-relations": "2.0.1", "mmikkel/retcon": "2.5.0", "nystudio107/craft-imageoptimize": "4.0.2", "nystudio107/craft-minify": "4.0.0-beta.2", "nystudio107/craft-retour": "4.0.2", "nystudio107/craft-seomatic": "4.0.7", "ostark/craft-async-queue": "^3.0", "percipioglobal/craft-colour-swatches": "4.2.0.1", "spicyweb/craft-neo": "3.3.5", "verbb/field-manager": "3.0.2", "vlucas/phpdotenv": "^5.4.0", "weareferal/matrix-field-preview": "4.0.3"

brianjhanson commented 2 years ago

I'm having trouble replicating this one. Can you send me your composer.json and composer.lock files, along with a database backup to support@craftcms.com? Any custom module files (and the corresponding config) would be great as well.

brandonkelly commented 2 years ago

Thanks for the help! This has been fixed for the next release, via #11927.

brandonkelly commented 2 years ago

Craft 4.2.4 is tagged with that fix.