Problem/Motivation
I am trying to update from 8.6.13 to 8.7.
When running the database updates, I am getting the following error:
> [notice] Update started: node_update_8700
> [error] Exception thrown while performing a schema update. SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'NOT NULL' at line 1: ALTER TABLE {node_field_data} CHANGE `uid` `uid` NOT NULL; Array
> (
> )
>
> [error] Update failed: node_update_8700
All the other update hooks ran successfully.
Server version: 10.1.38-MariaDB
Steps to reproduce
Proposed resolution
The proposed resolution was to wait until 8.7.2 was release, see #12.
Remaining tasks
If you are experiencing this problem, add a comment including the database and version you are using.
Determine if this is limited to MariaDB, or perhaps database not supplied with Drupal core.
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#38 | test_dashboard.post_update.php_.txt | 14.84 KB | ash2303 |
#38 | test_dashboard.install.txt | 6.45 KB | ash2303 |
Comments
Comment #2
amateescu CreditAttribution: amateescu for Pfizer, Inc. commented@JohannFischmann, what version of MariaDB are you using?
Comment #3
cilefen CreditAttribution: cilefen as a volunteer commentedI thought the same when I saw this.
Comment #4
cilefen CreditAttribution: cilefen as a volunteer commentedComment #5
Jadelvalia CreditAttribution: Jadelvalia commentedServer version: 10.1.38-MariaDB - Source distribution
Comment #6
jbfelix CreditAttribution: jbfelix as a volunteer commentedSame error, but for taxonomy terms, it seems to be related to the entity field definition update process who's no more supported by Drupal 8.7.
I get this error when i try to list terms:
And this error in the status report:
How to fix this ?
Thanks
Comment #7
amateescu CreditAttribution: amateescu for Pfizer, Inc. commented@jbfelix, those errors in the status report mean that you need to run the database updates for 8.7.0, either with Drush or via
update.php
.Comment #8
jbfelix CreditAttribution: jbfelix as a volunteer commented@amateescu
That's what i did (with drush and update.php), but the entity fields definitions are not updated.
No additional error.
Comment #9
amateescu CreditAttribution: amateescu for Pfizer, Inc. commented@jbfelix, do you have a database backup that could be restored and then try to run the updates again? The problem seems to be that Drupal thinks it ran all the updates, when in fact it didn't.
Comment #10
amateescu CreditAttribution: amateescu for Pfizer, Inc. commented@JohannFischmann, I installed MariaDB 10.1.38 locally in a docker container and tried to reproduce your issue, but I couldn't. This is the SQL query generated by the
node_update_8700()
function:This query is generated by
\Drupal\Core\Database\Driver\mysql\Schema::changeField()
. Are you using a database driver that's not provided by Drupal core?Comment #11
jbfelix CreditAttribution: jbfelix as a volunteer commented@amateescu
I have a backup and i have already re-tested an update but the errors are still showing.
Comment #12
amateescu CreditAttribution: amateescu for Pfizer, Inc. commented@jbfelix, then my advice is to wait a few days until 8.7.2 is released, because it will contain quite a few upgrade path fixes..
Comment #13
jbfelix CreditAttribution: jbfelix as a volunteer commented@amateescu
OK Thanks
Comment #14
pameeela CreditAttribution: pameeela as a volunteer commented@JohannFischmann @jbfelix Thanks for taking part in this issue. If you'd like to help us make sure the 8.8.0 update is as smooth as possible, please consider signing up for the beta testing program at https://goo.gl/forms/bMBTMRSY3sKEscUJ3
Comment #15
sajiniantony CreditAttribution: sajiniantony commentedAccessing Taxonomy overview page throws error after upgrade to 8.7.1 Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AS expression FROM tfr INNER JOIN tr ON tfr. = tr. AND tr. = 0 INNER JOIN (S' at line 1: SELECT tfr.tid AS tid, MAX(tfr.) AS expression FROM {} tfr INNER JOIN {} tr ON tfr. = tr. AND tr. = 0 INNER JOIN (SELECT t.tid AS tid, t.langcode AS langcode, MAX(t.) AS expression FROM {} t WHERE t. = :db_condition_placeholder_0 GROUP BY t.tid, t.langcode) mr ON tfr. = mr. AND tfr.langcode = mr.langcode GROUP BY tfr.tid; Array ( [:db_condition_placeholder_0] => 1 ) in Drupal\taxonomy\TermStorage->getTermIdsWithPendingRevisions() (line 404 of /opt/web/core/modules/taxonomy/src/TermStorage.php).
Any help is apprceited.
Comment #16
suresh.senthatti CreditAttribution: suresh.senthatti commentedDo you have any update on this issue
Comment #17
MurzI got similar problem with taxonomy terms after some several updates from 8.6.0 to 8.7.x - now I can't open taxonomy vocabulary pages with error:
All updates are correctly installed but
drush entup
shows outdated entity schemas. When I try to update entity schema viadevel_entity_updates
module - I got the error:Comment #18
MurzManually repeating Taxonomy module update functions via:
don't help too - they executes normally without erros:
But the fatal error on taxonomy pages are still here.
Comment #19
effortDee CreditAttribution: effortDee commentedI may be having this same issue.
I can't access taxonomy overview pages at all.
Comment #20
mmjvb CreditAttribution: mmjvb as a volunteer commentedThose having issues with updating to 8.7.0 might try to update to the 8.6.x at the time of release of 8.7.0 first. The updates introduced in 8.6.x releases are meant to be executed with the code of 8.6.x. With 8.7.0 removing functionality, bad practice but it happened, the 8.6.x updates don't do what they were supposed to with 8.6 code when run with 8.7 code.
Comment #21
parashutiki CreditAttribution: parashutiki commented8.7.3 same problem. But! On localhost MariaDB 5.5.58 and working fine. But on prod server 5.5.5 - fails.
I tried to run generated query directly on MariaDB 5.5.58
`
ALTER TABLE {versions} CHANGE
`file_version__v1` `file_version__v1` NOT NULL;
`
But it is incorrect.
Comment #22
mmjvb CreditAttribution: mmjvb as a volunteer commented@parashutiki Looks like an unrelated issue, suggest to create your own.
The syntax error is because the datatype is missing: CHANGE [old_column] [new_column] [datatype] [ NOT NULL | NULL ]
Comment #23
parashutiki CreditAttribution: parashutiki commented@mmjvb sorry for disinformation. it not a problem. not working on both servers.
I have used combined field for ContentType and it is the place where error appears. I tried many approaches, but what i got = for some period of time message for inconsistence of fields is disappear and soon later appear again, so i decided do not fight, because i do not understood where could be a problem and what is the reason of i see this message on Status page.
Comment #24
kappaluppa CreditAttribution: kappaluppa commentedStill experiencing this problem on 8.7.1 and 8.8.0 and 8.8.1
also
For reference: Drupal 8.7.0 Release notes:
Have info on what happened, but not how to deal with it:
Support for automatic entity updates has been removed: https://www.drupal.org/node/3034742
Comment #27
Adsyy CreditAttribution: Adsyy commentedHi, does anyone have an update on this problem ?
Comment #28
effortDee CreditAttribution: effortDee commentedAdsymon no, I had to completely rebuild 3 of my sites which had this issue which took me a few weeks to copy all taxonomy terms, content, functionality over to new sites on lastest d8.9.
Comment #29
Adsyy CreditAttribution: Adsyy commented@effortDee Okok thanks for your answer. I "resolved" this problem by commenting hook_update() who cause this problem and run drush updb after. I dont think it's a good way but it works for me.
Comment #32
quietone CreditAttribution: quietone at PreviousNext commentedUpdate Issue Summary.
If you have this problem and fixed it, add a comment explaining what you as it might help others.
If you are experiencing this problem, add a comment including the database and version you are using.
Thanks
Comment #33
quietone CreditAttribution: quietone at PreviousNext commentedAdding tag
Comment #35
Wolf_22 CreditAttribution: Wolf_22 as a volunteer commentedI know I'm late to the game in this but I just thought that I'd throw in my experience when trying to use the 8.x-1.10 Address module. Installing it into my 9.4.3 / PHP 8.0.13 / MariaDB 10.6.5 environment was a breeze, but using the Drupal UI to add an address field into one of my content types resulted in the following error:
I've lodged a support request in their issues queue but thought I'd post about this on here as well given the context. For whatever it's worth, I tried this module against a MySQL backend and had no problems at all. I think it's a MariaDB issue with me or else something that might be misconfigured in my MariaDB settings. Just not sure what it might be...
Comment #36
cilefen CreditAttribution: cilefen as a volunteer commented@Wolf_22 The error you posted above, "1118 Row size too large", is different from the one reported in this issue.
Comment #37
cilefen CreditAttribution: cilefen as a volunteer commentedComment #38
ash2303 CreditAttribution: ash2303 as a volunteer and commentedAttaching files that I have done after upgrading to Drupal 9.4, not sure if this will work for everyone but worth a try.
As usual, take DB backup before running these.
Comment #39
sepa_cleversoft CreditAttribution: sepa_cleversoft commentedI also have the same problem, and I cannot see the taxonomy term overview page. I get this error:
Does anybody have some workaround or fix for this? Thank you.
Comment #40
piyushc9r36 CreditAttribution: piyushc9r36 commented"PHP message: Uncaught PHP Exception Drupal\Core\Database\DatabaseExceptionWrapper: "SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY LENGTH(redirect_source__query) DESC' at line 1: SELECT rid FROM "redirect" WHERE hash IN () ORDER BY LENGTH(redirect_source__query) DESC; Array
(
)
Anyone please help
Comment #41
jefw CreditAttribution: jefw commentedRelated problem: after loading a backup from two days ago (software and DB), emptying the caches, waiting a few minutes, the website worked for about 10 minutes. Then we got this message on several tables (cache..., watchdog). We can repeat this unlimited. We can assume it's not a syntax error.
Apache, drupal 9.5.5, PHP 8.1.17, MYSQL 5.7.40
We are a senior club.
Thanks in advance.
The website encountered an unexpected error. Please try again later.
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42000]: Syntax error or access violation: 1142 INSERT command denied to user '...............' for table 'watchdog': INSERT INTO "watchdog"
The website encountered an unexpected error. Please try again later.
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42000]: Syntax error or access violation: 1142 INSERT, UPDATE command denied to user '................' for table 'cache_config': INSERT INTO "cache_config"