Problem/Motivation

Currently is not possible to specify which file field values get synced over translations meaning that the user has to replace all values (file, description, display) if the field is translable.

Proposed resolution

Add column_groups to \Drupal\file\Plugin\Field\FieldType\FileItem so it behaves in a the same way as \Drupal\image\Plugin\Field\FieldType\ImageItem

Remaining tasks

Review

User interface changes

Before

before

After

after

API changes

N/A

Data model changes

N/A

Release notes snippet

N/A

Issue fork drupal-3101552

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

Primsi created an issue. See original summary.

primsi’s picture

Status: Active » Needs review
StatusFileSize
new4.54 KB

Initial patch.

Status: Needs review » Needs work
primsi’s picture

Status: Needs work » Needs review
StatusFileSize
new513 bytes
new4.57 KB

Default stays as it is.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new181 bytes

The Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

nikhil_110’s picture

StatusFileSize
new4.56 KB

Attached patch against Drupal 10.1.x

nikhil_110’s picture

StatusFileSize
new4.56 KB

Fixed Cc Issue..

nikhil_110’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs Review Queue Initiative, +Needs change record

This will need a change record.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

mathilde_dumond’s picture

Status: Needs work » Needs review

Here is a link to the change record https://www.drupal.org/node/3376175

smustgrave’s picture

Status: Needs review » Needs work

No longer applies to 11.x

Also a test-only patch would be useful please.

_utsavsharma’s picture

StatusFileSize
new4.57 KB
new4.57 KB

Patch for 11.x.
Please review.

sleitner’s picture

Component: transliteration system » content_translation.module

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

berdir’s picture

Status: Needs work » Needs review

Created a merge request.

smustgrave’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs change record
StatusFileSize
new9.71 KB
new26.25 KB

Hid patches as fix is in MR now.

Updated issue summary with before/after to show the changes. Also added the same to the change record.

Added 1 small nitpicky change to the MR.

Testing the MR and I was able to parts of the file field.

catch’s picture

Version: 11.x-dev » 10.3.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x and cherry-picked to 10.3.x, thanks!

  • catch committed 92b53c70 on 10.3.x
    Issue #3101552 by Berdir, Primsi, Nikhil_110, smustgrave: Make FileItem...

  • catch committed f7ee9b81 on 11.x
    Issue #3101552 by Berdir, Primsi, Nikhil_110, smustgrave: Make FileItem...

  • catch committed f7ee9b81 on 11.0.x
    Issue #3101552 by Berdir, Primsi, Nikhil_110, smustgrave: Make FileItem...

Status: Fixed » Closed (fixed)

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