Problem/Motivation

When using the "Convert the existing terms in this vocabulary immediately" feature, the termcase_update_term() function does not properly save updated terms. It should be using the Drupal entity API, instead if does a direct database UPDATE statement which doesn't update the revision table.

Steps to reproduce

Use the "Convert the existing terms in this vocabulary immediately" feature and notes that the revision table doesn't get updated, so term names don't actually get updated properly.

Issue fork termcase-3228215

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

ultimike created an issue. See original summary.

ultimike’s picture

Patch attached.

-mike

ultimike’s picture

StatusFileSize
new1.55 KB

Whoops! Forgot the "use" statement in the previous patch. New patch attached.

-mike

dabley’s picture

Is more work needed here, or should the status be "Needs Review"?

ultimike’s picture

Status: Active » Needs review

Yep, "needs review" - I forgot to change the status!

thanks,
-mike

dabley’s picture

Patch #3 works ok for me (with D9.3.2). Without the patch, values in table taxonomy_term_field_data get updated, but not values in table taxonomy_term_field_revision. In the admin interface, it looks as though the terms have not been updated at all (even after doing a cache rebuild). After applying the patch, terms are updated in both tables, and the admin interface shows the revised term names (without even needing a cache rebuild).

AstonVictor made their first commit to this issue’s fork.

astonvictor’s picture

Status: Needs review » Fixed

Created and merged a new MR.

Fixed the batch.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.