-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Constraint violation #66
Comments
Maybe related: I've just updated a site as well and I got duplicated navigation items for the default/admin layout.
|
Fixed in 3.0.3 |
I just attempted to reset the default layout, got this error again (using 3.0.3):
|
@fthues Are there any rows in your |
@fthues Do you have |
@fthues Oh, and a snapshot of your |
Here's the And the Thanks! |
Spent some time tonight trying to reproduce this and I can’t. I can’t see how the data from a project config event would be null. I might ping @andris-sevcenko to see in what situations this can happen with project config.. |
Originally from @andris-sevcenko The first step would be to update Craft to the latest released version and then run a Otherwise, it's hard to exclude bugs that have been already fixed and some minor project config discrepancies that might have crept in because of those bugs. |
Running the latest version of both Craft and the plugin, did The plugin's The corresponding item has a different UID in the project config: I'm guessing that's why both |
@fthues Interesting. Maybe you can delete your |
@fthues I'd also try clearing any caches. Otherwise - maybe you could send through an export of your cpnav_* tables? Thanks for your patience! |
Craft Pro 3.4.9 and latest CP Nav plugin. It was working great except for one layout, tied to the "Manager" user group, which gets the error above on every CP screen. Things I've tried:
No luck. I just uninstalled the plugin for now, but if you think of something, please let me know! Here's the cp-nav:
layouts:
8a074b2e-54d6-470a-8638-1fb089fd14c9:
isDefault: '0'
name: Manager
permissions: '["a17f6951-e1ec-488b-a78a-944f944347c2"]'
dfafe559-47d8-416d-b24f-f261a7b6bbd3:
isDefault: '1'
name: Default
permissions: null
e98a5684-d3b0-4ca1-8604-d891a766c0fc:
isDefault: '0'
name: Student
permissions: '["acbec432-50bf-4f50-8e0a-4d51f979e162","6bd490f9-575c-41be-bb21-cdbf168c664a"]'
navigations:
081cef12-3add-4ed3-aaab-7067fd5fca18:
currLabel: Dashboard
customIcon: null
enabled: '1'
handle: dashboard
icon: gauge
layoutId: '3'
newWindow: '0'
order: 1
prevLabel: Dashboard
prevUrl: dashboard
type: '0'
url: dashboard
134218d1-39ac-4d5f-99af-c09248b657d6:
currLabel: 'Entries (Pages)'
customIcon: null
enabled: '1'
handle: entries
icon: section
layoutId: '2'
newWindow: false
order: '2'
prevLabel: Entries
prevUrl: entries
type: '0'
url: entries
149a9dad-2854-4a5d-8e7c-d826ef2494c3:
currLabel: Entries
customIcon: null
enabled: true
handle: entries
icon: section
layoutId: '1'
newWindow: false
order: 1
prevLabel: Entries
prevUrl: entries
type: ''
url: entries
17dcffa3-8f21-46bb-9f56-d433dac0646f:
currLabel: Dashboard
customIcon: null
enabled: true
handle: dashboard
icon: gauge
layoutId: '1'
newWindow: false
order: 0
prevLabel: Dashboard
prevUrl: dashboard
type: ''
url: dashboard
1cb0df1c-1217-4bd5-8096-b275a8fd9620:
currLabel: SEOmatic
customIcon: null
enabled: true
handle: seomatic
icon: /Users/fritzk/code/safs-effs/vendor/nystudio107/craft-seomatic/src/icon-mask.svg
layoutId: '1'
newWindow: false
order: 8
prevLabel: SEOmatic
prevUrl: seomatic
type: ''
url: seomatic
22640919-5fe0-42a5-8027-06fc66526047:
currLabel: Categories
customIcon: null
enabled: true
handle: categories
icon: categories
layoutId: '1'
newWindow: false
order: 3
prevLabel: Categories
prevUrl: categories
type: ''
url: categories
242a8ac3-c605-4a2d-bb86-e87828245b9c:
currLabel: 'Contact Info'
customIcon: null
enabled: '1'
handle: contactInfo
icon: mail
layoutId: '2'
newWindow: '0'
order: 5
prevLabel: 'Contact Info'
prevUrl: globals/contactInfo
type: manual
url: globals/contactInfo
2c75922c-c9ee-4176-9aaa-708c961e9bb7:
currLabel: 'Blog Categories'
customIcon: null
enabled: '1'
handle: blogCategories
icon: tags
layoutId: '2'
newWindow: '0'
order: 6
prevLabel: 'Blog Categories'
prevUrl: /admin/categories/blogCategories
type: manual
url: /admin/categories/blogCategories
2c9bf91e-4187-4435-b63c-535f28875eb6:
currLabel: Users
customIcon: '["386"]'
enabled: '1'
handle: users
icon: null
layoutId: '2'
newWindow: '0'
order: 8
prevLabel: Users
prevUrl: users
type: '0'
url: users
2caa497d-95e3-49f2-bd03-d128e53c18c3:
currLabel: SEO
customIcon: null
enabled: '1'
handle: seomatic
icon: /srv/users/serverpilot/apps/safs-effs-live/public_html/vendor/nystudio107/craft-seomatic/src/icon-mask.svg
layoutId: '2'
newWindow: '0'
order: 9
prevLabel: SEOmatic
prevUrl: seomatic
type: '0'
url: seomatic
2f53a7e2-cf31-4f69-b6ac-d35d35cee966:
currLabel: 'Edit Help Links'
customIcon: null
enabled: '1'
handle: help-links
icon: help
layoutId: '2'
newWindow: '0'
order: 11
prevLabel: 'Help Links'
prevUrl: help-links
type: '0'
url: help-links
44dbe402-2637-41bf-8dbb-3627fec9713f:
currLabel: 'Assets (Images)'
customIcon: null
enabled: '1'
handle: assets
icon: assets
layoutId: '3'
newWindow: '0'
order: 3
prevLabel: Assets
prevUrl: assets
type: '0'
url: assets
48dc3812-e28c-42aa-85a5-62878f4a8f9d:
currLabel: 'Entries (Pages)'
customIcon: null
enabled: '1'
handle: entries
icon: section
layoutId: '3'
newWindow: '0'
order: 2
prevLabel: Entries
prevUrl: entries
type: '0'
url: entries
54514163-a438-4176-8137-173647ca20cc:
currLabel: Utilities
customIcon: null
enabled: true
handle: utilities
icon: tool
layoutId: '1'
newWindow: false
order: 9
prevLabel: Utilities
prevUrl: utilities
type: ''
url: utilities
54751a19-29e0-44be-b0b6-f86f1bd207cb:
currLabel: Navigation
customIcon: '["387"]'
enabled: '1'
handle: navigation
icon: null
layoutId: '2'
newWindow: '0'
order: 4
prevLabel: Navigation
prevUrl: globals/navigation
type: manual
url: globals/navigation
5f28b1ca-8eee-4a72-8bc8-1ea477b7c871:
currLabel: Settings
customIcon: null
enabled: true
handle: settings
icon: settings
layoutId: '1'
newWindow: false
order: 10
prevLabel: Settings
prevUrl: settings
type: ''
url: settings
64cfc3b1-7721-4d5a-b235-08260ef4f7a8:
currLabel: 'Plugin Store'
customIcon: null
enabled: true
handle: plugin-store
icon: plugin
layoutId: '1'
newWindow: false
order: 11
prevLabel: 'Plugin Store'
prevUrl: plugin-store
type: ''
url: plugin-store
71382b5f-779a-4dad-beff-fb4033449bf5:
currLabel: Users
customIcon: null
enabled: true
handle: users
icon: users
layoutId: '1'
newWindow: false
order: 5
prevLabel: Users
prevUrl: users
type: ''
url: users
81ae0a5f-dfc2-438b-9580-d14cf0b98453:
currLabel: 'Course Categories'
customIcon: null
enabled: '1'
handle: courseCategories
icon: category
layoutId: '2'
newWindow: '0'
order: 7
prevLabel: 'Course Categories'
prevUrl: /admin/categories/courseCategories
type: manual
url: /admin/categories/courseCategories
890a9388-54a4-48e8-8477-ac4e28d1a284:
currLabel: 'Utilities (Just in Case)'
customIcon: null
enabled: '1'
handle: utilities
icon: tool
layoutId: '2'
newWindow: '0'
order: 10
prevLabel: Utilities
prevUrl: utilities
type: '0'
url: utilities
8e674a5e-b973-4216-a5a7-b9f1370e7102:
currLabel: 'Assets (Images)'
customIcon: null
enabled: '1'
handle: assets
icon: asset
layoutId: '2'
newWindow: false
order: '3'
prevLabel: Assets
prevUrl: assets
type: '0'
url: assets
95f67dbc-e06e-43b9-a457-4d4f5987a6f7:
currLabel: Categories
customIcon: '["385"]'
enabled: '0'
handle: categories
icon: null
layoutId: '2'
newWindow: '0'
order: 13
prevLabel: Categories
prevUrl: categories
type: '0'
url: categories
99557ed5-d975-47d9-b7be-fce79d9d8455:
currLabel: Globals
customIcon: null
enabled: true
handle: globals
icon: globe
layoutId: '1'
newWindow: false
order: 2
prevLabel: Globals
prevUrl: globals
type: ''
url: globals
9c418407-9c5d-423f-974e-7d408d75a4a6:
currLabel: Categories
customIcon: null
enabled: '0'
handle: categories
icon: categories
layoutId: '3'
newWindow: '0'
order: 5
prevLabel: Categories
prevUrl: categories
type: '0'
url: categories
a55f001b-6b7f-4358-9ebb-abf485e8f3c9:
currLabel: Assets
customIcon: null
enabled: true
handle: assets
icon: assets
layoutId: '1'
newWindow: false
order: 4
prevLabel: Assets
prevUrl: assets
type: ''
url: assets
ae3a449c-d1f7-4676-80f2-3ecdeff114ed:
currLabel: Dashboard
customIcon: null
enabled: '1'
handle: dashboard
icon: gauge
layoutId: '2'
newWindow: '0'
order: 1
prevLabel: Dashboard
prevUrl: dashboard
type: '0'
url: dashboard
b0c83f3f-3731-4985-bca9-c51a5c9ce67e:
currLabel: 'Blog Categories'
customIcon: null
enabled: '1'
handle: blogCategories
icon: tags
layoutId: '3'
newWindow: false
order: '4'
prevLabel: 'Blog Categories'
prevUrl: /admin/categories/blogCategories
type: manual
url: /admin/categories/blogCategories
f52f29f2-ef43-4420-aedc-1db5987aece1:
currLabel: Globals
customIcon: null
enabled: '0'
handle: globals
icon: null
layoutId: '2'
newWindow: '0'
order: 12
prevLabel: Globals
prevUrl: globals
type: '0'
url: globals
f62017d7-70e4-44fc-a7d0-1f2f7d333b27:
currLabel: 'Help Links'
customIcon: null
enabled: true
handle: help-links
icon: /Users/fritzk/code/safs-effs/vendor/adigital/help-links/src/icon-mask.svg
layoutId: '1'
newWindow: false
order: 7
prevLabel: 'Help Links'
prevUrl: help-links
type: ''
url: help-links |
Should be fixed in 3.0.8 |
Description
After updating to the lastest Craft version (3.4.4) cp-nav seems to only work locally. Whenever I deploy to my staging environment project.yaml throws a conflict.
Steps to reproduce
Additional info
ERROR OUTPUT:
Applying changes from project.yaml ... error: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (
REMOTE_DB
.craft_cpnav_navigation
, CONSTRAINTcraft_cpnav_navigation_layoutId_fk
FOREIGN KEY (layoutId
) REFERENCEScraft_cpnav_layout
(id
) ON DELETE CASCADE)remote: The SQL being executed was: INSERT INTO
craft_cpnav_navigation
(layoutId
,handle
,currLabel
,prevLabel
,enabled
,order
,url
,prevUrl
,icon
,customIcon
,type
,newWindow
,uid
,dateCreated
,dateUpdated
) VALUES (2, 'utilities', 'Utilities', 'Utilities', 0, NULL, 'utilities', 'utilities', 'tool', NULL, '', 0, 'e9adca43-4669-4c41-bba8-0c184c50739b', '2020-02-06 11:04:49', '2020-02-06 11:04:49')The text was updated successfully, but these errors were encountered: