Update 8.6.13 to 8.7.2 - Taxonomy problem

Created on 27 May 2019, over 5 years ago
Updated 22 August 2024, 3 months ago

Hi,
I'm a first-time poster here, so apologies in advance if I've missed anything.

I've updated to 8.7.2 and ran into a database issue whilst running /update.php

Taxonomy module

Update make_taxonomy_term_revisionable
Failed: Drupal\Core\Entity\EntityStorageException: The entity update process failed while processing the entity type taxonomy_term, ID: 9. in Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema->copyData() (line 216 of /var/www/html/core/lib/Drupal/Core/Entity/Sql/SqlFieldableEntityTypeListenerTrait.php)

Status report:

Mismatched entity and/or field definitions
The following changes were detected in the entity type and field definitions.

Taxonomy term
The Taxonomy term entity type needs to be updated.
-  The Revision ID field needs to be installed.
-  The Revision create time field needs to be installed.
-  The Revision user field needs to be installed.
-  The Revision log message field needs to be installed.
-  The Default revision field needs to be installed.
-  The Revision translation affected field needs to be installed.

As it is an unused taxonomy, I deleted all the rows that had a reference to it in all taxonomy_term_* tables.

Running update.php still shows the same issue, as if taxonomy_term id=9 was still in the database.

When trying to list the taxonomy terms /admin/structure/taxonomy, I get the following error message:

The website encountered an unexpected error. Please try again later.</br></br><em class="placeholder">Drupal\Core\Database\DatabaseExceptionWrapper</em>: 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 &#039;) AS expression
FROM
 tfr
INNER JOIN  tr ON tfr. = tr. AND tr. = 0
INNER JOIN (S&#039; 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] =&gt; 1
)
 in <em class="placeholder">Drupal\taxonomy\TermStorage-&gt;getTermIdsWithPendingRevisions()</em> (line <em class="placeholder">404</em> of <em class="placeholder">core/modules/taxonomy/src/TermStorage.php</em>). <pre class="backtrace">Drupal\Core\Database\Statement-&gt;execute(Array, Array) (Line: 631)
Drupal\Core\Database\Connection-&gt;query(&#039;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&#039;, Array, Array) (Line: 358)
Drupal\Core\Database\Driver\mysql\Connection-&gt;query(&#039;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&#039;, Array, Array) (Line: 510)
Drupal\Core\Database\Query\Select-&gt;execute() (Line: 404)
Drupal\taxonomy\TermStorage-&gt;getTermIdsWithPendingRevisions() (Line: 291)
Drupal\taxonomy\Form\OverviewTerms-&gt;buildForm(Array, Object, Object)
call_user_func_array(Array, Array) (Line: 519)
Drupal\Core\Form\FormBuilder-&gt;retrieveForm(&#039;taxonomy_overview_terms&#039;, Object) (Line: 276)
Drupal\Core\Form\FormBuilder-&gt;buildForm(&#039;taxonomy_overview_terms&#039;, Object) (Line: 93)
Drupal\Core\Controller\FormController-&gt;getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber-&gt;Drupal\Core\EventSubscriber\{closure}() (Line: 582)
Drupal\Core\Render\Renderer-&gt;executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber-&gt;wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber-&gt;Drupal\Core\EventSubscriber\{closure}() (Line: 151)
Symfony\Component\HttpKernel\HttpKernel-&gt;handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel-&gt;handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session-&gt;handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle-&gt;handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache-&gt;pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache-&gt;handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware-&gt;handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware-&gt;handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel-&gt;handle(Object, 1, 1) (Line: 693)
Drupal\Core\DrupalKernel-&gt;handle(Object) (Line: 19)
</pre>

I cleared the Drupal cache, browser cache, tried on a different browser.

Webserver: Centos7, Database: 5.5.5-10.1.32-MariaDB, PHP 7.1.17

Have I missed any step?

Many thanks in advance

💬 Support request
Status

Fixed

Version

8.7 ⚰️

Component
Taxonomy 

Last updated 1 day ago

  • Maintained by
  • 🇺🇸United States @xjm
  • 🇬🇧United Kingdom @catch
Created by

🇬🇧United Kingdom SandraDudley

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024