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

After upgrade to 3.2, some entries refuse to save. #4538

Closed
marcushouse opened this issue Jul 12, 2019 · 2 comments
Closed

After upgrade to 3.2, some entries refuse to save. #4538

marcushouse opened this issue Jul 12, 2019 · 2 comments

Comments

@marcushouse
Copy link

marcushouse commented Jul 12, 2019

Description

We've just upgraded a tiny site to Craft 3.2 and we now cannot save SOME entries (others save fine). I can't see anything in field setup that differs between one entry VS another that does save.

When saving, this is the error we are seeing in dev mode. The site was fine prior to update to 3.2.

REQUEST URL
https://host.name/index.php?p=craftadmin%2Factions%2F/entry-revisions/save-draft

RESPONSE

{"error":"SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`pivot_craft`.`craft_drafts`, CONSTRAINT `craft_drafts_revisionId_fk` FOREIGN KEY (`revisionId`) REFERENCES `craft_revisions` (`id`) ON DELETE SET NULL)\nThe SQL being executed was: INSERT INTO `craft_drafts` (`sourceId`, `revisionId`, `creatorId`, `name`, `notes`) VALUES (70, 187, 1, 'Draft 1', NULL)"}

Steps to reproduce

  1. Try to update an entry. The Update Entry button stays disabled. We also can't make the Preview mode work on that same entry.

Additional info

  • Craft version: 3.2.1
  • PHP version: 7.1.30
  • Database driver & version: MySQL 5.7.26
  • Plugins & versions:

Imager | v2.1.10
Redactor | 2.3.3.2
Wheel Form | 2.1.1

@gregorterrill
Copy link

I'm getting this too. I also think it's probably the same error @khalwat was mentioning here: #4515 (comment)

To add a few notes - in 3.2 when making changes to an affected entry, it was showing the "An unknown error has occurred" alert repeatedly in the CP. In 3.2.1 the entry still refuses to save but that alert no longer appears - the spinner next to the revision dropdown just appears and disappears but the "Update Entry" button just remains greyed out. Also on affected entries I'm seeing a JS error in the console: Uncaught TypeError: Cannot read property 'errors' of null at s.constructor.<anonymous> (Craft.js:13144) This error pops up on initial load of the entry edit screen and every time it tries to autosave. It doesn't show up on other entries that are saving properly.

Live Preview mode does work for me on these entries (maybe because they were saved previously?) but obviously changes aren't reflected as you make them since it can't save.

@brandonkelly
Copy link
Member

Yes, this is a duplicate of #4515, which is fixed for the next release. See #4515 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants