guest-entries
guest-entries copied to clipboard
elements_sites table show entries as enabled when they should be disabled
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
- Setup Guest Entries
- Set default status to disabled for a section
- Create a frontend form
- Submit an Entry
- Verify the
elements_sites
table has the fieldenabled
set to1
instead of0
- The Entry has a disabled view in the CMS
-
Craft::$app->getElements()->getEnabledSiteIdsForElement
returns all sites enabled for the Entry, which is consistent with what is in theelements_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