Problem/Motivation

I noticed it when upgraded from 8.x-1.26 to 2.0.2. After executing post-updates not all fields were changed to json format. There is a small issue in _metatag_list_entity_field_tables() that empties $tables variable on each field storage iteration. As a result tables for the last one are returned

Steps to reproduce

  • On 8.x-1.x add metatag fields to several entity types e.g. node and taxonomy term
  • Upgrade to 2.x
  • Look in the database. The node field still has serialized value and the taxonomy term has updated json values
CommentFileSizeAuthor
#6 3483107-6.patch980 bytesfernly
#5 3483107-5.patch29.78 KBfernly
#4 2413781-65.patch29.78 KBfernly

Issue fork metatag-3483107

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

kadantsew created an issue. See original summary.

kadantsew’s picture

Assigned: kadantsew » Unassigned
Status: Active » Needs review

Please review if this fix makes sense.

fernly’s picture

StatusFileSize
new29.78 KB

Stable patch based on the MR.

fernly’s picture

StatusFileSize
new29.78 KB

And now the same patch with a logical filename.

fernly’s picture

StatusFileSize
new980 bytes

And here's a working patch. Hiding the previous ones.

damienmckenna’s picture

Version: 2.0.x-dev » 2.2.x-dev
damienmckenna’s picture

Status: Needs review » Reviewed & tested by the community
Parent issue: » #3548158: Plan for Metatag 2.2.1

Yeah, well spotted - the outer if() statement sets $tables to an empty array if it's NULL, so no reason to set it to an empty array a second time.

  • damienmckenna committed 8761a37d on 2.2.x
    Issue #3483107 by kadantsew, damienmckenna: V2 post updates not working...
damienmckenna’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thank you.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • damienmckenna committed 8761a37d on 2.3.x
    Issue #3483107 by kadantsew, damienmckenna: V2 post updates not working...

Status: Fixed » Closed (fixed)

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