The file_usage table specifies the length of entity ids (id column) as 64 chars.
However, we're building a semantic web application where our entity storage backend uses a triple store database (Virtuoso) to store our entities as RDF. This implies that our entity ids are in fact URIs.
Although this probably is quite an exotic edge case, most probably there are other use cases (https://www.drupal.org/project/external_entities) where 64 chars is too limited.

CommentFileSizeAuthor
#30 interdiff.txt585 bytespfrenssen
#30 2675600-30.patch6.32 KBpfrenssen
#27 interdiff.txt482 bytespfrenssen
#27 2675600-27-8.4.x.patch6.29 KBpfrenssen
#27 2675600-27-8.3.x.patch6.23 KBpfrenssen
#25 2675600-25-8.3.x.patch6.17 KBpfrenssen
#22 2675600-22.patch6.22 KBpfrenssen
#20 2675600-20.interdiff.txt3.24 KBclaudiu.cristea
#20 2675600-20.patch6.18 KBclaudiu.cristea
#19 2675600-19.patch6.17 KBclaudiu.cristea
#17 interdiff.txt827 bytespfrenssen
#17 2675600-17-test-only.patch4.51 KBpfrenssen
#17 2675600-17.patch6.19 KBpfrenssen
#14 file_usage_limits-2675600-14-test-only.patch5.25 KBManuel Garcia
#14 file_usage_limits-2675600-14.patch6.21 KBManuel Garcia
#8 interdiff.txt1.17 KBpfrenssen
#8 2675600-8.patch6.21 KBpfrenssen
#8 2675600-8-test-only.patch5.25 KBpfrenssen
#5 interdiff.txt4.61 KBpfrenssen
#5 2675600-5-test-only.patch4.07 KBpfrenssen
#5 2675600-5.patch5.04 KBpfrenssen
#2 drupal-enlarge_file_usage_table-2675600.patch935 bytessandervd
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sandervd created an issue. See original summary.

sandervd’s picture

pfrenssen’s picture

Status: Active » Needs review
pfrenssen’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

Indeed core supports entity IDs up to 255 characters so this should be updated as such.

This still needs a test. The easiest way of testing this is to use the EntityTestStringId entity and add a file field to it.

+++ b/core/modules/file/file.install
@@ -120,3 +120,21 @@ function file_requirements($phase) {
+  db_change_field(

db_change_field() is deprecated. You can use \Drupal::database()->schema()->changeField() instead. See system_update_8001() for an example.

pfrenssen’s picture

Status: Needs work » Needs review
FileSize
5.04 KB
4.07 KB
4.61 KB

I fixed my remarks and added a test. By increasing the ID length to 255 characters (which is allowed for entities) it transpires that there is another bug preventing this from working: SqlContentEntityStorageSchema imposes a hard limit of 128 characters for the entity_id in the field tables. I will create a separate issue for this.

This at least proof that the fix works. It needs another test for the update path.

The last submitted patch, 5: 2675600-5.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 5: 2675600-5-test-only.patch, failed testing.

pfrenssen’s picture

The last submitted patch, 8: 2675600-8-test-only.patch, failed testing.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

claudiu.cristea’s picture

Issue tags: +Needs reroll
Manuel Garcia’s picture

Assigned: Unassigned » Manuel Garcia
Status: Needs review » Needs work
Manuel Garcia’s picture

Assigned: Manuel Garcia » Unassigned
Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
6.21 KB
5.25 KB

Reroll of #8.

Status: Needs review » Needs work

The last submitted patch, 14: file_usage_limits-2675600-14-test-only.patch, failed testing.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Status: Needs review » Needs work

The last submitted patch, 17: 2675600-17-test-only.patch, failed testing.

claudiu.cristea’s picture

Status: Needs work » Needs review
FileSize
6.17 KB

Reroll.

claudiu.cristea’s picture

Status: Needs review » Needs work

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

pfrenssen’s picture

Status: Needs work » Needs review
FileSize
6.22 KB

Rerolled #19 against latest HEAD, there was a merge conflict since #2801777: Give users the option to prevent drupal from automatically marking unused files as temporary got in.

Status: Needs review » Needs work

The last submitted patch, 22: 2675600-22.patch, failed testing. View results

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

pfrenssen’s picture

Status: Needs work » Needs review
FileSize
6.17 KB

Here is a version that should apply to 8.3.x.

Status: Needs review » Needs work

The last submitted patch, 25: 2675600-25-8.3.x.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

pfrenssen’s picture

The last submitted patch, 27: 2675600-27-8.3.x.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

Status: Needs review » Needs work

The last submitted patch, 27: 2675600-27-8.4.x.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

pfrenssen’s picture

Status: Needs work » Needs review
FileSize
6.32 KB
585 bytes

Fixy fixy?

pfrenssen’s picture

Status: Needs review » Postponed

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.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: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should 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: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

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

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

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should 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.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should 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.

Version: 9.5.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. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.