spicywebau / craft-neo

A Matrix-like field type for Craft CMS that uses existing fields
Other
403 stars 63 forks source link

General error: 1712 Index neoblocks is corrupted #865

Closed alexanderloewe closed 3 months ago

alexanderloewe commented 3 months ago

Bug Description

Since a few weeks we have problems with corrupted neoblocks indexes.

The problem is that we can't find a pattern for when the error occurs.

What we can say, however: User hosting provider has switched from MySQL to MariaDB. In the case of similar errors based on matrix blocks, this point was repeatedly discussed.

Can you tell us more about this?

error: SQLSTATE[HY000]: General error: 1712 Index neoblocks is corrupted
The SQL being executed was: SELECT `elements`.`id`, `elements`.`canonicalId`, `elements`.`fieldLayoutId`, `elements`.`uid`, `elements`.`enabled`, `elements`.`archived`, `elements`.`dateLastMerged`, `elements`.`dateCreated`, `elements`.`dateUpdated`, `elements_sites`.`id` AS `siteSettingsId`, `elements_sites`.`slug`, `elements_sites`.`siteId`, `elements_sites`.`uri`, `elements_sites`.`enabled` AS `enabledForSite`, `neoblocks`.`fieldId`, `neoblocks`.`primaryOwnerId`, `neoblocks`.`typeId`, `neoblocks_owners`.`ownerId`, `neoblocks_owners`.`sortOrder`, `content`.`id` AS `contentId`, `content`.`field_sequenceStyle`, `content`.`field_anchor`, `content`.`field_workload_vhgtmfrb`, `content`.`field_audioStyle_ntitmpsp`, `content`.`field_alignHorizontal`, `content`.`field_alignVertical`, `content`.`field_authors`, `content`.`field_authorBuilder_knzojcfl`, `content`.`field_description`, `content`.`field_descriptionShort`, `content`.`field_rankStars`, `content`.`field_overviewRelation_wrwmvrdf`, `content`.`field_imageStyle`, `content`.`field_imageGridStyle`, `content`.`field_newsletterCardType_enwxzrqd`, `content`.`field_code_gqhmlnqx`, `content`.`field_copyright_gjzhqlar`, `content`.`field_copyrightRelease_luguxepz`, `content`.`field_ctaStyle_vygwlczs`, `content`.`field_fileTitle`, `content`.`field_date_zpxevtsm`, `content`.`field_disclaimer_zwdvpfcm`, `content`.`field_eMail`, `content`.`field_eMailType_axbyaghe`, `content`.`field_color`, `content`.`field_jobFunction`, `content`.`field_graphSameAs`, `content`.`field_graphDescription`, `content`.`field_graphTags`, `content`.`field_graphTitle`, `content`.`field_graphTwcard`, `content`.`field_graphType`, `content`.`field_addressNr`, `content`.`field_headerImagesStyle`, `content`.`field_headerHeightStyle`, `content`.`field_headerSliderStyle`, `content`.`field_headerTheme`, `content`.`field_heroStyle_rkbmwpev`, `content`.`field_bgColor`, `content`.`field_socialMediaIcon`, `content`.`field_callContent`, `content`.`field_innerCallContent_sqyocxab`, `content`.`field_siteKeywordAlternatives_xfxwvkjq`, `content`.`field_siteKeywords`, `content`.`field_addressCountry`, `content`.`field_lead_kxaoujjl`, `content`.`field_sitePlagiarismLast_zvvwxrec`, `content`.`field_linkRel_ouuhdsrb`, `content`.`field_linkClass`, `content`.`field_linkQuery`, `content`.`field_linkStyle`, `content`.`field_linkTitle`, `content`.`field_linkUrl`, `content`.`field_linkTarget_vamowsun`, `content`.`field_brandName_ngamuxgl`, `content`.`field_minimizedContentStyle`, `content`.`field_withRichData_vnrkcebh`, `content`.`field_mobileNummer`, `content`.`field_multiTitle_xertxtyj`, `content`.`field_imageMultiStyle`, `content`.`field_lastname`, `content`.`field_names`, `content`.`field_newsletterNav`, `content`.`field_newsletterListCode_ivnlchrv`, `content`.`field_note`, `content`.`field_siteNote`, `content`.`field_organization`, `content`.`field_organizationUid_msazjljn`, `content`.`field_addressCity`, `content`.`field_password`, `content`.`field_addressZip`, `content`.`field_newsletterPreheader`, `content`.`field_price`, `content`.`field_source`, `content`.`field_sourceBuilder_yhibwwjp`, `content`.`field_quoteStyle_ilsyldnu`, `content`.`field_fontAlign`, `content`.`field_fontColor`, `content`.`field_pageClass`, `content`.`field_seoCanonical`, `content`.`field_seoDescription_juucbbtu`, `content`.`field_seoKeywords`, `content`.`field_seoRobots`, `content`.`field_seoSiteName`, `content`.`field_seoTitle`, `content`.`field_spacerType`, `content`.`field_addressStreet`, `content`.`field_teaserDescription`, `content`.`field_teaserDescriptionShort_mjgxcrrq`, `content`.`field_teaserLead_ankqxzbw`, `content`.`field_teaserTitle`, `content`.`field_teaserOverTitle_aiybivjg`, `content`.`field_phone`, `content`.`field_text`, `content`.`field_textRtf`, `content`.`field_textStyle`, `content`.`field_textBoxesStyle`, `content`.`field_textblockStyle_xgqnqpkj`, `content`.`field_mainTitle`, `content`.`field_titleStyle`, `content`.`field_titleTag`, `content`.`field_overviewStyle_widqsxzt`, `content`.`field_newsletterOverviewType`, `content`.`field_overviewType`, `content`.`field_overviewTypeSlim_yjfxtkeo`, `content`.`field_overTitle`, `content`.`field_videoEmbed`, `content`.`field_videoEmbedOption`, `content`.`field_videoStyle_juoweqkq`, `content`.`field_firstname`, `content`.`field_benefitList`, `content`.`field_website`, `content`.`field_siteWordCount_udjtdwbk`, `content`.`field_quote`, `content`.`field_addressAdditive`, `structureelements`.`root`, `structureelements`.`lft`, `structureelements`.`rgt`, `structureelements`.`level`
FROM (SELECT `elements`.`id` AS `elementsId`, `elements_sites`.`id` AS `elementsSitesId`, `content`.`id` AS `contentId`
FROM `elements` `elements`
INNER JOIN `neoblocks` `neoblocks` ON `neoblocks`.`id` = `elements`.`id`
INNER JOIN `neoblocks_owners` `neoblocks_owners` ON (`neoblocks_owners`.`blockId` = `elements`.`id`) AND (`neoblocks_owners`.`ownerId`=1160661)
INNER JOIN `elements_sites` `elements_sites` ON `elements_sites`.`elementId` = `elements`.`id`
INNER JOIN `content` `content` ON (`content`.`elementId` = `elements`.`id`) AND (`content`.`siteId` = `elements_sites`.`siteId`)
LEFT JOIN `structureelements` `structureelements` ON (`structureelements`.`elementId` = `elements`.`id`) AND (`structureelements`.`structureId`=167609)
WHERE (`neoblocks`.`fieldId`=282) AND (`elements_sites`.`siteId`=1) AND (`elements`.`archived`=FALSE) AND (`elements`.`dateDeleted` IS NULL) AND (`elements`.`draftId` IS NULL) AND (`elements`.`revisionId` IS NULL)
ORDER BY `structureelements`.`lft`, `neoblocks_owners`.`sortOrder`) `subquery`
INNER JOIN `elements` `elements` ON `elements`.`id` = `subquery`.`elementsId`
INNER JOIN `elements_sites` `elements_sites` ON `elements_sites`.`id` = `subquery`.`elementsSitesId`
INNER JOIN `neoblocks` `neoblocks` ON `neoblocks`.`id` = `subquery`.`elementsId`
INNER JOIN `neoblocks_owners` `neoblocks_owners` ON (`neoblocks_owners`.`blockId` = `elements`.`id`) AND (`neoblocks_owners`.`ownerId`=1160661)
INNER JOIN `content` `content` ON `content`.`id` = `subquery`.`contentId`
LEFT JOIN `structureelements` `structureelements` ON (`structureelements`.`elementId` = `subquery`.`elementsId`) AND (`structureelements`.`structureId`=167609)
ORDER BY `structureelements`.`lft`, `neoblocks_owners`.`sortOrder`

Steps to reproduce

we have already tried several things:

  1. removing versioning
  2. re-save
  3. removing revisions
  4. duplicating the entry

Expected behaviour

No response

Neo version

4.0.8

Craft CMS version

4.8

What is the affected Neo field's propagation method?

No response

Does this issue involve templating, and if so, is eager-loading used?

This is not a templating issue

ttempleton commented 3 months ago

See #832 for my comments on this.