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

Issue adding in fields to products #12459

Closed
davidcraigmyle opened this issue Nov 15, 2022 · 3 comments
Closed

Issue adding in fields to products #12459

davidcraigmyle opened this issue Nov 15, 2022 · 3 comments
Assignees
Labels

Comments

@davidcraigmyle
Copy link

Description

Hello,

I'm testing out the Shopify plugin and I've tried to add some fields to the products.
I had one tab with a title working fine but when I added a field using the Neo plugin, a tab with a field for the SEO plugin, and a tab with a couple of summary fields.
When I saved the page all of the tabs duplicated and then I got an error because of the duplicates.

'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '83-44' for key 'idx_wlcbhmxrqizbeglfuifneaurqdbsemupfwzj'
The SQL being executed was: INSERT INTO fieldlayoutfields (layoutId, tabId, fieldId, required, sortOrder, dateCreated, dateUpdated, uid) VALUES (83, 1780, 44, 0, 0, '2022-11-15 16:24:56', '2022-11-15 16:24:56', '809f2855-bba5-43a8-967c-3f2d8ddbdce5')'

After trying to remove all the fields, they duplicated again and now I can't save any fields or use the plugin at all

Steps to reproduce

  1. Add new tabs to products under Shopify -> Settings -> Products
  2. Add fields including a Neo fields nad SEO field

Additional info

  • Craft version: 4.3.1
  • PHP version: 8.0.8
  • Database driver & version: MySQL 5.7.34
  • Plugins & versions: Neo - 3.5.2, SEO - 4.0.3, Shopify - 3.0.0.1

Screenshot 2022-11-15 at 16 20 00
Screenshot 2022-11-15 at 16 29 42

@brandonkelly
Copy link
Member

This ended up benig mostly a Craft CMS bug, which is now fixed for the next release (2947da1).

It was exacerbated in Shopify because the product field layout wasn’t getting saved to the project config. That’s been fixed for the next Shopify release as well (craftcms/shopify#50).

To get the Craft CMS fix early, change your craftcms/cms requirement in composer.json to "dev-develop#2947da192efe8a78bd617565df0239baba46f931 as 4.3.5" and run composer update.

@brandonkelly
Copy link
Member

Shopify 3.1.0 has been released, which saves the product field layout to the project config, bypassing the issue. so you may just want to update that rather than put craftcms/cms on the develop branch.

@brandonkelly
Copy link
Member

Craft 4.3.6 is out with the initial fix for this as well now.

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

3 participants