I'm reusing the same field for all my content types and save lineage is enabled. I've added data and I understand that once data is there, the option to toggle save lineage on/off cannot be changed. However, I didn't expect save lineage to be disabled for new content types. I thought it would be disabled in the "on" setting because the existing field had it turned on. Am I missing something? Does this mean I have to always create a new fields if I want to save lineage for new content types?

cshs save lineage disabled

Comments

chrisck created an issue. See original summary.

br0ken’s picture

StatusFileSize
new217.23 KB

You understood it correctly, @chrisck however I see that the message is lacking this information so it's good to have it added.

The `Save lineage` option works only with the `Cardinality` set to `Unlimited`. The `Cardinality` cannot be changed if the field storage has at least one entry, imposing the same restriction to `Save lineage`. The field storage layout (typically a database table) is designed to store values for the entire entity type, making the field storage reusable across its bundles.

@chrisck, in your case you have to use two fields - one with `Save lineage` enabled and another - disabled and reuse them accordingly across multiple content types.

br0ken’s picture

Version: 8.x-2.x-dev » 8.x-3.x-dev
Category: Support request » Bug report

Oh, jeez, I misunderstood the problem, sorry. You are right @chrisck, there is the problem with not persisting the "on" state of the `Save lineage` option if the field is reused.

chrisck’s picture

Thanks for confirming this is a bug. Yes cardinality didn’t change, it is set to unlimited. “Save lineage” was previously enabled when the table was empty.

I wanted to reuse the same field with “save lineage” on for a new bundle but was unable to due to existing data. Cardinality for the field is still set to unlimited.

Interestingly I’ve tried clearing all data in the tables but cannot enable “save lineage” for new bundles. It’s as if Drupal locks this setting as soon as there is data, regardless if the data is deleted. The only way at the moment is to delete the field and recreate it on all bundles before entering data.

  • BR0kEN committed 0137397 on 8.x-3.x
    Issue #3218364 by chrisck, BR0kEN: Preserve state of `save_lineage` if...

  • BR0kEN committed ad6e5bc on 8.x-2.x
    Issue #3218364 by chrisck, BR0kEN: Preserve state of `save_lineage` if...
br0ken’s picture

Status: Active » Fixed

Please try the latest 3.x-dev or 2.x-dev and let me know if the problem still persist.

chrisck’s picture

Tested 2.x-dev and can confirm the issue is fixed. The "save lineage" is now showing "on" but the checkbox is disabled as expected when reusing an existing field with a new bundle. Thank you so much for the quick fix :)

Status: Fixed » Closed (fixed)

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