Project

General

Profile

Actions

Bug #103898

closed

Existing "_assets" subdirectories not being a symlink prevents installation

Added by Garvin Hicking 6 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
composer
Start date:
2024-05-24
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Scenario:

Someone transfers over contents of a production instance for local development. They copy "_assets" over to their local install (just because they "copy everything").

The file copying is done without respecting symlinks, so symlinks get turned into actual directories with actual, non-symlinked files. Depending on the deployment process, these symlinks may even have already been resolved on the upload to a production server (rsync dereferencing).

Resulting symptons

When now the development instance issues a composer update followed by composer dump-autoload, any updated assets will NOT be updated in the existing directory.

This could lead to odd issues where typo3 cms-... packages do not deliver the right CSS+JS files. See slack https://typo3.slack.com/archives/C025BQLFA/p1716455213954609

Workaround

One can remove the whole `_assets` directory and then let `composer dump-autoload` do its magic. However, people may not even notice this, as no errors are shown.

Reasons and suggested change

The PackageArtifactBuilder just assumes, everything is good, when the expected directory can be resolved. If it's actually a symlink is not evaluated.

My proposal would be to ensure that the target resource path is actually a symlink, and leads to the assumed symlink target. `composer dump-autoload` should then report a warning, if a directory does not match that expectation. It does not create any hard failures, so if anyone is using non-symlinks in production, nothing will be deleted/recreated, and continue as-is.

Additionally it would be nice if the Admin Tools > Environment > Directory Status could also reveal this warning.

Related documentation change: https://github.com/TYPO3-Documentation/TYPO3CMS-Reference-CoreApi/pull/4440


Related issues 4 (2 open2 closed)

Related to TYPO3 Core - Bug #96386: Cleanup of symlinks in _assets on extension uninstallAccepted2021-12-18

Actions
Related to TYPO3 Core - Bug #100468: Missing assets folder when creating public folder after installationClosedHelmut Hummel2023-04-05

Actions
Related to TYPO3 Core - Bug #104345: Composer installation of a Root Package does not properly store packagePathClosedGarvin Hicking2024-07-10

Actions
Related to TYPO3 Core - Bug #105327: PackageArtifactBuilder creates junctions on windows, incompatible with Docker DesktopNew2024-10-16

Actions
Actions #1

Updated by Garvin Hicking 6 months ago

Will provide a patch for this.

Actions #2

Updated by Garvin Hicking 6 months ago

  • Related to Bug #96386: Cleanup of symlinks in _assets on extension uninstall added
Actions #3

Updated by Garvin Hicking 6 months ago

  • Related to Bug #100468: Missing assets folder when creating public folder after installation added
Actions #4

Updated by Gerrit Code Review 6 months ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84383

Actions #5

Updated by Gerrit Code Review 6 months ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84383

Actions #6

Updated by Gerrit Code Review 6 months ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84383

Actions #7

Updated by Gerrit Code Review 6 months ago

Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84383

Actions #8

Updated by Gerrit Code Review 6 months ago

Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84383

Actions #9

Updated by Gerrit Code Review 6 months ago

Patch set 6 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84383

Actions #10

Updated by Gerrit Code Review 6 months ago

Patch set 7 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84383

Actions #11

Updated by Gerrit Code Review 6 months ago

Patch set 8 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84383

Actions #12

Updated by Gerrit Code Review 6 months ago

Patch set 9 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84383

Actions #13

Updated by Gerrit Code Review 6 months ago

Patch set 10 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84383

Actions #14

Updated by Gerrit Code Review 6 months ago

Patch set 11 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84383

Actions #15

Updated by Gerrit Code Review 5 months ago

Patch set 12 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84383

Actions #16

Updated by Gerrit Code Review 5 months ago

Patch set 13 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84383

Actions #17

Updated by Garvin Hicking 5 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #18

Updated by Gerrit Code Review 5 months ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84759

Actions #19

Updated by Gerrit Code Review 5 months ago

Patch set 2 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84759

Actions #20

Updated by Garvin Hicking 5 months ago

  • Status changed from Under Review to Resolved
Actions #21

Updated by Benni Mack 4 months ago

  • Status changed from Resolved to Closed
Actions #22

Updated by Garvin Hicking 4 months ago

  • Related to Bug #104345: Composer installation of a Root Package does not properly store packagePath added
Actions #23

Updated by Chris Müller about 1 month ago

  • Related to Bug #105327: PackageArtifactBuilder creates junctions on windows, incompatible with Docker Desktop added
Actions

Also available in: Atom PDF