craftcms / cms

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

[4.x]:Cannot create Entries that have a tag field #10808

Closed mauricioarangoosorio closed 2 years ago

mauricioarangoosorio commented 2 years ago

What happened?

Description

When trying to create a new entry containing a Tag field. Instead of getting the editing screen, an error page shows up, preventing any editing whatsoever.

Steps to reproduce

  1. Create a tag group
  2. Create a field tag associated with the group in step 1
  3. Add the field tag to an entry
  4. try to create a new entry

Expected behavior

Expecting to see the editing of screen to create a new entry

Actual behavior

The following error message shows up:

TypeError: Cannot assign string to property craft\fields\Tags::$_tagGroupId of type int|false|null in /app/vendor/craftcms/cms/src/fields/Tags.php:190

Craft CMS version

4.0.0-beta.3

PHP version

8.1.3

Operating system and version

Macos 11.5.2

Database type and version

mysql-8.0

Image driver and version

No response

Installed plugins and versions

brandonkelly commented 2 years ago

Thanks for reporting! This is now fixed for the next release.

brandonkelly commented 2 years ago

Craft 4.0.0-beta.4 is out now with that fix.