craft3-fields icon indicating copy to clipboard operation
craft3-fields copied to clipboard

[Bug] - Draft field value reset on Craft 3.6 and PHP 7.4

Open sidedwards opened this issue 3 years ago • 4 comments

⚙️ System settings

Craft CMS: 3.6.10 PHP: 7.4.16

🐛 Bug description

With Craft 3.6 and PHP 7.4, when a new draft is created for an Entry with the NSM Embed field, blocks with field values after the embed field get reset.

👣 Reproduction steps

Steps to reproduce the behavior:

  1. Create an Entry with the NSM Embed field.
  2. Click on 'Create a draft'.
  3. While viewing the draft, click on another site and then go back to the original site.
  4. See error. Draft field values after the embed field are reset.

Resources

https://user-images.githubusercontent.com/11489608/110871980-a9c19300-828c-11eb-9551-2ccb3ba69087.mp4

sidedwards avatar Mar 12 '21 00:03 sidedwards

Hmm that's super weird… I'll check it out over the weekend.

leevigraham avatar Mar 12 '21 04:03 leevigraham

Hi @leevigraham, any update on this? We're still experiencing this issue. I'm pretty sure https://github.com/newism/craft3-fields/issues/45 is related.

Similarly, when an NSM field is within a nested field (i.e., Matrix, Neo, etc.) it does not correctly apply draft values to the entry. This occurs for most NSM fields with the exception of Email. Additionally, it doesn't seem to matter what the nested parent's localization pattern is; it occurs for both localized and non-localized parent blocks.

Steps to reproduce the behavior:

  1. Add NSM field within a nested block.
  2. "Create a draft" and add values to NSM fields.
  3. Publish draft.
  4. See error. NSM field values from draft are not present in Entry.

sidedwards avatar Jul 14 '21 17:07 sidedwards

Haven't looked into it yet. I'm running a 3.7 update today so I'll check at the same time.

leevigraham avatar Jul 14 '21 23:07 leevigraham

@sidedwards I think I've finally figured this out. Can you try v1.0.4 if you're still using the plugin: https://github.com/newism/craft3-fields/releases/tag/1.0.4

leevigraham avatar Apr 27 '22 00:04 leevigraham