Problem/Motivation

Even if you remove the 'filename' component, the file-size is added, restoring a phantom 'filename' component when using stable theme.

Proposed resolution

Check if 'filename' component is present.

Remaining tasks

test coverage.

User interface changes

API changes

Data model changes

Release notes snippet

Comments

oknate created an issue. See original summary.

oknate’s picture

StatusFileSize
new817 bytes

Here's a patch to fix this.

oknate’s picture

Status: Active » Needs review
oknate’s picture

oknate’s picture

Issue summary: View changes
oknate’s picture

StatusFileSize
new4.75 KB
new5.55 KB

Here's test coverage.

oknate’s picture

1. this is unused, should be removed. +use Drupal\FunctionalJavascriptTests\WebDriverTestBase;
2. This should be removed: "+ // Add a field to the vocabulary.", it's left over from a test I used as an example.
3. This should be moved into existing ImageFieldWidgetTest.

The last submitted patch, 6: 3090505-6--FAIL.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

oknate’s picture

StatusFileSize
new5.93 KB
new5.44 KB

Addressing #7.

oknate’s picture

Issue tags: -blocker

Removing blocker, as I've found if you use ['filename']['#access'] = FALSE; instead of removing the filename, you don't encounter this bug.

Perhaps this issue needs nothing further. If no one else encounters this issue, and there's a workaround, perhaps it isn't needed.

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.

lendude’s picture

Status: Needs review » Postponed (maintainer needs more info)

@oknate what do you think? Close this or do you feel there is still something that we can do here?

Using #access = FALSE sounds like the right thing to do, unsetting fields has often lead to strange behaviours in my experience.

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.

quietone’s picture

Component: Stable theme » Stable 9 theme

Moving remaining issues for 'Stable theme' to 'Stable 9 theme' based on #3332485-5: [Meta] Stable issue triage by markconroy.

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.

smustgrave’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)

Since there hasn't been a follow up to #15 over a year ago, going to close out for now. If still a bug please reopen addressing #15.

Thanks all