Skip to content

Unexpected update of non-submitted Entry from another Section #62

Description

@stevenjwright

Description

When saving an entry from the front-end, an entry with the same title has its sectionId and typeId updated in the entries database table.

Steps to reproduce

  1. Create an Entry in a Section (sectionA), title 123-456-789.
  2. Configure Guest Entries set to only allow guest submissions on 1 section sectionB.
  3. The site uses Sprig to post the form via AJAX on page load.
  4. The form uses sectionB's UID as a hardcoded value.
  5. The form submits the following data (in addition to the section id and CSRF token):
  • A Url Parameter of l as the new entry's Title.
  • The Url Parameter of l as a plain text field activeLicenseKey.
  • The User's Session ID as a plain text field sessionId.
  1. Load the page where the auto-submitting form is with a URL Parameter l=123-456-789.
  2. Assuming this has now fired the POST request to the system, the unrelated entry in sectionA will now not be shown on the entry view in the CMS, and its row in the entries table of the database has had its original typeId and sectionId be updated to that of the entry for sectionB.

Additional info

I should say that when this occurs, there is still a new additional record in the database for the new entry that has been submitted. The new entry in sectionB is in full working order. If I manually change the typeId and sectionId back for the original entry, it sits back in the entries view in the CMS, but with a URI value that correlates to the new entry in sectionB.

  • Craft version: Craft Pro 3.4.29.1
  • PHP version: 7.3.13
  • Database driver & version: MySQL 5.5.5
  • Plugins & versions:
Conditional Fields | 0.0.6
Control Panel Nav | 3.0.12
Craft Commerce | 3.1.12
Digital Products | 2.4.0
Feed Me | 4.2.3
Guest Entries | 2.3.0
Redactor | 2.6.1
Sprig | 1.0.0-beta.9
Stripe for Craft Commerce | 2.3.1.1

Code and a Video of this happening are available if you require 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions