Problem/Motivation

When convert entity type and try to changes some field values which aren't that another content type and are empty option Create field values for new fields in target content type not working

Steps to reproduce

Content Type A has title and body field

Convert content type A

1) To content type B which has title, body and term fields

2) Body to body

3) Select Create field values for new fields in target content type

4) Put something on term value

5) are you sure, yes

Node is now content type B which has title and body values but term value is empty

CommentFileSizeAuthor
#2 3214960-1.patch523 bytesel1_1el

Comments

tvalimaa created an issue. See original summary.

el1_1el’s picture

Priority: Major » Normal
Status: Active » Needs review
StatusFileSize
new523 bytes

I can't imagine this feature ever worked but I might be missing something. Give this patch a try. If you don't encounter any issues and report its working, I'll commit to dev branch

tvalimaa’s picture

It is working.

tvalimaa’s picture

Still not sure if this module & patch is the reason warning or is it something else so still investigating where that warning comes:

Warning: array_flip(): Can only flip STRING and INTEGER values! in Drupal\Core\Entity\EntityStorageBase->loadMultiple() (line 261 of core/lib/Drupal/Core/Entity/EntityStorageBase.php).

I got this when I use Select Create field values for new fields in target content type and convert is done and it redirects node page

tvalimaa’s picture

Yeah those was mine typos for custom module "fix" so the #2 patch work just fine

tvalimaa’s picture

Status: Needs review » Reviewed & tested by the community

  • el1_1el authored e45141c on 8.x-1.x
    Issue #3214960 by el1_1el, tvalimaa: Create field values for new fields...
el1_1el’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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

el1_1el’s picture

sorry but I had to revert this commit after having a number of failed conversions and with only 11 sites using the dev branch i think it may have been correct to begin with. please reopen if you find the same issue.