guest-entries icon indicating copy to clipboard operation
guest-entries copied to clipboard

elements_sites table show entries as enabled when they should be disabled

Open ThomasDeMarez opened this issue 1 year ago • 0 comments

Description

After creating a Guest Entry the elements_sites table show enabled as true while the Entry in the CMS is disabled. Even when the Plugin settings have the default status set to disabled.

Steps to reproduce

  1. Setup Guest Entries
  2. Set default status to disabled for a section
  3. Create a frontend form
  4. Submit an Entry
  5. Verify the elements_sites table has the field enabled set to 1 instead of 0
  6. The Entry has a disabled view in the CMS
  7. Craft::$app->getElements()->getEnabledSiteIdsForElement returns all sites enabled for the Entry, which is consistent with what is in the elements_sites table. But should return an empty array if the Plugin setting is to be respected.

Additional info

  • Craft version: 4.5.3
  • PHP version: 8.1.23
  • Database driver & version: MySQL 8.0.27
  • Plugins & versions: craftcms/guest-entries:3.0.1

ThomasDeMarez avatar Sep 14 '23 11:09 ThomasDeMarez