Comments (4)
Thanks for sending that in @akiraWalk!
The root issue is that you’ve got a Matrix block row, and several Super Table block rows, which belong to elements that don’t exist anymore.
We should be clearing those out via garbage collection down the road, but I don’t think it should be a blocker for upgrading to Craft 5. So I’ve just relaxed the database’s foreign key checks for the Matrix block migration (0f7efe5) for the next release Craft 5.1.7, as well as PR’d the same change to Super Table (verbb/super-table#558).
If you want to test the fix, make sure you’re running Craft 5.1.7 or later, and change your verbb/super-table
requirement in composer.json
to dev-craft-5
and run composer update
.
from cms.
the text from the screenshot for clarity
execute SQL: INSERT INTO {{%entries}} ([[id]], [[primaryOwnerId]], [[fieldId]], [[typeId]], [[postDate]], [[dateCreated]], [[dateUpdated]]) SELECT [[id]], [[primaryOwnerId]], [[fieldId]], CASE WHEN [[typeId]] = 24 THEN 30 WHEN [[typeId]] = 18 THEN 31 WHEN [[typeId]] = 21 THEN 32 WHEN [[typeId]] = 22 THEN 33 WHEN [[typeId]] = 11 THEN 34 WHEN [[typeId]] = 19 THEN 35 WHEN [[typeId]] = 20 THEN 36 WHEN [[typeId]] = 15 THEN 37 WHEN [[typeId]] = 23 THEN 38 WHEN [[typeId]] = 13 THEN 39 WHEN [[typeId]] = 16 THEN 40 WHEN [[typeId]] = 14 THEN 41 WHEN [[typeId]] = 12 THEN 42 WHEN [[typeId]] = 17 THEN 43 WHEN [[typeId]] = 8 THEN 44 WHEN [[typeId]] = 5 THEN 45 WHEN [[typeId]] = 36 THEN 46 WHEN [[typeId]] = 37 THEN 47 WHEN [[typeId]] = 32 THEN 48 WHEN [[typeId]] = 34 THEN 49 WHEN [[typeId]] = 40 THEN 50 WHEN [[typeId]] = 33 THEN 51 WHEN [[typeId]] = 38 THEN 52 WHEN [[typeId]] = 25 THEN 53 WHEN [[typeId]] = 28 THEN 54 WHEN [[typeId]] = 31 THEN 55 WHEN [[typeId]] = 39 THEN 56 WHEN [[typeId]] = 41 THEN 57 WHEN [[typeId]] = 30 THEN 58 WHEN [[typeId]] = 26 THEN 59 WHEN [[typeId]] = 27 THEN 60 WHEN [[typeId]] = 29 THEN 61 WHEN [[typeId]] = 35 THEN 62 END, [[dateCreated]], [[dateCreated]], [[dateUpdated]] FROM {{%matrixblocks}} matrixblocks WHERE [[matrixblocks.typeId]] IN (24,18,21,22,11,19,20,15,23,13,16,14,12,17,8,5,36,37,32,34,40,33,38,25,28,31,39,41,30,26,27,29,35) ...Exception: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (
amcsearch_craft5.
craft_entries, CONSTRAINT
craft_fk_zczocrptptqdwwpqqyuzdfeerwhaxffybnnx FOREIGN KEY (
primaryOwnerId) REFERENCES
craft_elements (
id) ON DELETE CASCADE) The SQL being executed was: INSERT INTO
craft_entries (
id,
primaryOwnerId,
fieldId,
typeId,
postDate,
dateCreated,
dateUpdated) SELECT
id,
primaryOwnerId,
fieldId, CASE WHEN
typeId= 24 THEN 30 WHEN
typeId= 18 THEN 31 WHEN
typeId= 21 THEN 32 WHEN
typeId= 22 THEN 33 WHEN
typeId= 11 THEN 34 WHEN
typeId= 19 THEN 35 WHEN
typeId= 20 THEN 36 WHEN
typeId= 15 THEN 37 WHEN
typeId= 23 THEN 38 WHEN
typeId= 13 THEN 39 WHEN
typeId= 16 THEN 40 WHEN
typeId= 14 THEN 41 WHEN
typeId= 12 THEN 42 WHEN
typeId= 17 THEN 43 WHEN
typeId= 8 THEN 44 WHEN
typeId= 5 THEN 45 WHEN
typeId= 36 THEN 46 WHEN
typeId= 37 THEN 47 WHEN
typeId= 32 THEN 48 WHEN
typeId= 34 THEN 49 WHEN
typeId= 40 THEN 50 WHEN
typeId= 33 THEN 51 WHEN
typeId= 38 THEN 52 WHEN
typeId= 25 THEN 53 WHEN
typeId= 28 THEN 54 WHEN
typeId= 31 THEN 55 WHEN
typeId= 39 THEN 56 WHEN
typeId= 41 THEN 57 WHEN
typeId= 30 THEN 58 WHEN
typeId= 26 THEN 59 WHEN
typeId= 27 THEN 60 WHEN
typeId= 29 THEN 61 WHEN
typeId= 35 THEN 62 END,
dateCreated,
dateCreated,
dateUpdatedFROM
craft_matrixblocksmatrixblocks WHERE
matrixblocks.
typeIdIN (24,18,21,22,11,19,20,15,23,13,16,14,12,17,8,5,36,37,32,34,40,33,38,25,28,31,39,41,30,26,27,29,35) (/home/webdev/www/vhosts/amcsearch-c3/craft/vendor/yiisoft/yii2/db/Schema.php:676)
from cms.
Hi, thanks for getting in touch! Could you please send your composer.json
, composer.lock
and database export from before you started updating to [email protected] so that we can dig deeper?
from cms.
Thank you, an email with the files have been sent
from cms.
Related Issues (20)
- [5.x]: Extending a non-existent template in an element partial doesn't show a helpful error message HOT 2
- [5.x]: `Element::getIsFresh()` not working in 5.2.0 beta HOT 1
- [4.x] & [5.x]: General config: `backupCommand` setting to `Closure` ineffective HOT 3
- [5.2]: Small styling bugs in collapsed navbar HOT 2
- [5.x]: Cannot query authors via Graphql on Craft Team license HOT 3
- [3.x]: Using SORT filter errors with "Nesting level too deep - recursive dependency" HOT 5
- [5.x]: Field values are lost in an inline-editable nested entry, if the owner entry is saved multiple times without allowing the auto-save to trigger HOT 2
- [5.x]: Field Groups missing HOT 1
- [5.x]: Accessibility Issue - Control Panel Status Color Issue for Live/Disabled HOT 6
- [3.x]: add ownerId Filter to the query with 'not ID'. .ownderId("not 1") for example HOT 3
- [5.x]: Color Selection Improvement for disabled/enabled elements HOT 3
- [5.x]: Email fields aren't showing HOT 3
- craft root files are publicly visible and accessible [4.x]: HOT 4
- [5.x]: UX issue with Password Reset dialog. No way to close dialog box. HOT 2
- [4.x]: cookieValidationKey must be configured with a secret key. HOT 5
- [5.x]: Element chips and cards show other users' provisional drafts HOT 1
- [5.x]: Slideout shortcuts broken when the slideout is opened via disclosure menu HOT 3
- [4.9.7]: Calling unknown method: craft\web\Response::getIsDraft() HOT 2
- [5.x]: a11y issue with status indicators HOT 3
- [5.x]: Level indentation broken for entries with status label in structured sections HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cms.