Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid site handle when saving to a section where the site is disabled #83

Open
ThomasDeMarez opened this issue Sep 13, 2023 · 0 comments
Labels

Comments

@ThomasDeMarez
Copy link

Description

When we try to save a Guest Entry to a Section with the propagation method set to "Save entries to other sites in the same site group" and where one of the sites in that group is set to disabled. The CMS tries to generate a URI by resolving the "Entry URI Format" and the site. Which throws an exception because the site cannot be found in the db as it is disabled.

If we remove the "Entry URI Format" for the disabled site there is no exception.

Steps to reproduce

  1. Create 2 or more sites in the same site group
    1.1 Disable one of the sites
  2. Create a Section with an Entry Type
    2.1. Set the Section Propagation Method to "Save entries to other sites in the same site group"
    2.2. Ensure all sites have an Entry URI Format
  3. Enable the section in the Guest Entries Plugin settings
  4. Setup a front-end for to create a Guest Entry
  5. Submit the form
  6. An error should appear

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant