Bug #103157
closedImage referenced by `EXT:` does not work in TYPO3 subfolder installation
Added by Ayke Halder 9 months ago. Updated about 1 month ago.
100%
Description
In a composer-based TYPO3 subfolder installation ( e.g. BE https://example.org/subfolder/typo3 ) images refrenced by `EXT:` are not working.
<f:image src="EXT:example/Resources/Public/Images/test.svg" />
#1509741914 TYPO3Fluid\Fluid\Core\ViewHelper\Exception Unable to render image tag in "pages:123": File /subfolder/_assets/abcdef0123456789abcdef0123456789/Images/test.svg does not exist.
Updated by Ayke Halder 9 months ago
- Related to Bug #95543: Processed files of static images are stored outside document root added
Updated by Gerrit Code Review 9 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/+/83043
Updated by Benjamin Franzke 9 months ago
Hm, the fix itself it fine, but I guess you'll run into alot of issues with that setup, since the subfolder you're referring to is probably a symlink to some/projectpath/public
.
That means that `Environment::getPublicPath()` will be wrong (pointing to `some/projectpath/public`) and thus basically every place that uses `Environment::getPublicPath()` is broken for you.
Can you canfirm that you're using such a symlink to the public folder?
(Please share some more details, composer.json and directory structure)
Updated by Gerrit Code Review 9 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/+/83043
Updated by Ayke Halder 9 months ago · Edited
@Benjamin Franzke Thank you for looking into this!
I'm not really using symlinks, instead I use this special configuration in composer.json
:
{
"extra": {
"typo3/cms": {
"web-dir": "public/subfolder"
}
}
composer.json [click to open]composer.json [click to open]
{
"config": {
"vendor-dir": "vendor",
"classmap-authoritative": false,
"allow-plugins": {
"typo3/class-alias-loader": true,
"typo3/cms-composer-installers": true,
"helhum/dotenv-connector": true,
"helhum/typo3-console-plugin": true,
"cweagans/composer-patches": true
}
},
"repositories": [
{
"type": "path",
"url": "../typo3-composer-dev/example-extension",
"options": {
"symlink": true
}
},
{
"type": "artifact",
"url": "../typo3-composer-artifacts/"
},
{
"type": "composer",
"url": "https://composer.typo3.org/"
}
],
"name": "example-company/example-typo3-cms-distribution",
"require": {
"typo3/cms-adminpanel": "^12.4",
"typo3/cms-backend": "^12.4",
"typo3/cms-belog": "^12.4",
"typo3/cms-beuser": "^12.4",
"typo3/cms-core": "^12.4",
"typo3/cms-extbase": "^12.4",
"typo3/cms-extensionmanager": "^12.4",
"typo3/cms-felogin": "^12.4",
"typo3/cms-filelist": "^12.4",
"typo3/cms-fluid": "^12.4",
"typo3/cms-form": "^12.4",
"typo3/cms-frontend": "^12.4",
"typo3/cms-impexp": "^12.4",
"typo3/cms-info": "^12.4",
"typo3/cms-install": "^12.4",
"typo3/cms-linkvalidator": "^12.4",
"typo3/cms-lowlevel": "^12.4",
"typo3/cms-opendocs": "^12.4",
"typo3/cms-recordlist": "^12.4",
"typo3/cms-recycler": "^12.4",
"typo3/cms-redirects": "^12.4",
"typo3/cms-reports": "^12.4",
"typo3/cms-scheduler": "^12.4",
"typo3/cms-seo": "^12.4",
"typo3/cms-setup": "^12.4",
"typo3/cms-sys-note": "^12.4",
"typo3/cms-t3editor": "^12.4",
"typo3/cms-tstemplate": "^12.4",
"typo3/cms-viewpage": "^12.4",
"typo3/minimal": "^12.4",
"helhum/typo3-console": "^v8.1.1",
"example-company/example-a": "*",
"example-company/example-b": "*",
"example-company/example-extension": "*",
"cweagans/composer-patches": "^1.7"
},
"require-dev": {
"undkonsorten/typo3-auto-login": "~2.1.1"
},
"scripts": {
"folder-structure": [
"@php vendor/bin/typo3 install:fixfolderstructure"
],
"ext-setup": [
"@php vendor/bin/typo3 install:extensionsetupifpossible"
],
"language-update": [
"@php vendor/bin/typo3 language:update"
],
"post-autoload-dump": [
"@folder-structure",
"@ext-setup",
"@language-update"
]
},
"extra": {
"typo3/cms": {
"cms-package-dir": "{$vendor-dir}/typo3/cms",
"web-dir": "public/subfolder"
},
"patches": {
"typo3/cms-core": {
"[BUGFIX] Make images referenced by EXT: work in subfolder installation": "https://github.com/rr-it/TYPO3.CMS/commit/cee8daaff8e41fd1b7a9857d1b1c286469b12c47.diff"
}
}
}
}
Directory structure [click to open]Directory structure [click to open]
/var/www/ ├─ typo3-composer-artifacts/ │ ├─ example_a.zip │ └─ example_b.zip │ ├─ typo3-composer-dev/ │ └─ example-extension/ │ ├─ Resources/ │ │ ├─ Private/ │ │ └─ Public/ │ │ └─ Images/ │ │ └─ test.svg │ │ │ ├─ composer.json │ └─ ext_emconf.php │ └─ html/ ├─ config/ ├─ public/ <- https://example.org/ │ └─ subfolder/ <- https://example.org/subfolder/ │ ├─ _assets/ │ │ ├─ 1ee1d3e909b58d32e30dcea666dd3224 -> ../../../vendor/typo3/cms-core/Resources/Public │ │ └─ abcdef0123456789abcdef0123456789 -> ../../../vendor/example-company/example-extension/Resources/Public │ │ │ ├─ fileadmin/ │ ├─ typo3/ │ │ ├─ index.php │ │ └─ install.php │ │ │ ├─ typo3temp/ │ ├─ uploads/ │ ├─ .htaccess │ └─ index.php │ ├─ vendor/ │ ├─ symfony/ │ ├─ typo3/ │ │ └─ cms-core/ │ │ ├─ Resources/ │ │ │ ├─ Private/ │ │ │ └─ Public/ │ │ │ │ │ ├─ composer.json │ │ └─ ext_emconf.php │ │ │ └─ example-company/ │ └─ example-extension/ -> ../../../typo3-composer-dev/example-extension/ (symlink created by composer) │ ├─ var/ └─ composer.json
Updated by Garvin Hicking 8 months ago
This could be the problematic "subdirectory in composer mode" issue with some other effects:
https://forge.typo3.org/issues/101911
I grouped a few similar sounding issues there.
Updated by Garvin Hicking 8 months ago
- Related to Bug #101911: TYPO3 composer mode does not properly respect installations in a subdirectory added
Updated by Markus Klein 7 months ago
- Has duplicate Bug #100661: Wrong resource links to symlinked _assets unsing base with appending path segment added
Updated by Georg Ringer 5 months ago
- Status changed from Under Review to Closed
closed in favor of #101911
Updated by Gerrit Code Review about 2 months ago
- Status changed from Closed to Under Review
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/+/83043
Updated by Gerrit Code Review about 2 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/+/83043
Updated by Gerrit Code Review about 2 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/+/83043
Updated by Gerrit Code Review about 2 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/+/83043
Updated by Gerrit Code Review about 2 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/+/83043
Updated by Gerrit Code Review about 2 months ago
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/+/86330
Updated by Ayke Halder about 2 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 1179dd00c7ee735a53fa0e4a4d111892fb741ee4.
Updated by Ayke Halder about 1 month ago
- Related to Bug #104460: Asset ViewHelper does not take config.forceAbsoluteUrls into account added