Bug #102160
closedEXT:form Clicking on references of forms stored inside extensions leads to exception
100%
Description
This is the exception message:
Fri, 13 Oct 2023 11:06:09 +0200 [CRITICAL] request="5eed67f9280ad" component="TYPO3.CMS.Core.Error.DebugExceptionHandler": Core: Exception handler (WEB: BE): TYPO3\CMS\Core\Resource\Exception\ResourceDoesNotExistException, code #1633777536, file /var/www/html/vendor/typo3/cms-core/Classes/Resource/ResourceFactory.php, line 312: Tried to access a private resource file " EXT:example/Resources/Private/Forms/myForm.form.yaml " from fallback compatibility storage. This storage only handles public files.
Files
Updated by Stefan Terborg 5 months ago
- PHP Version set to 8.3
Can confirm with TYPO3 12.4.16.
Error message:
Uncaught TYPO3 Exception: #1633777536: Tried to access a private resource file "EXT:my_ext/Resources/Private/FormYaml/my.form.yaml" from fallback compatibility storage. This storage only handles public files.
Updated by Markus Zipfel 3 months ago · Edited
ResourceFactory->retrieveFileOrFolderObject()
is not able to resolve files from "EXT:.../Resources/Private/...", anymore.- Source is line 306 of
ResourceFactory
:if (str_starts_with($absoluteFilePath, Environment::getPublicPath()))
because in v11Environment::getPublicPath()
was the "private" web root folder (for whatever reason). In v12 it's the "public" web directory - like defined inweb-dir
incomposer.json
. - So I think at first we have to discuss if it is not the expected behaviour that
ResourceFactory
is not able to retrieve extensions' private resources because in first place, it is meant to deal with FAL resources. Means: In my opinionResourceFactory->retrieveFileOrFolderObject()
should not be changed. - My suggestion is to update
DatabaseService->getReferencesByPersistenceIdentifier
so that it is able to deal with form persistence identifiers if no FAL file can be retrieved. I don't have a nice fix, yet. But I will try to create a pull request if I will find some time. But if I do, I will provide a PR formaster
.
Suggestion for a temporary fix for all users that do not have the time to wait:
Move your form YAML files to a EXT:.../Resources/Public/Forms/
folder and prevent web access by providing a .htaccess
file with content Deny from all
in that folder.
Updated by Gerrit Code Review 3 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/+/85856
Updated by Garvin Hicking 3 months ago
- Has duplicate Task #104804: [BUGFIX] EXT:form Clicking on references of forms stored inside exten… added
Updated by Gerrit Code Review 3 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/+/85856
Updated by Gerrit Code Review 3 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/+/85856
Updated by Markus Zipfel 3 months ago · Edited
- TYPO3 Version changed from 12 to 13
@Nikita Hovratov @Stefan Terborg @Andreas Kießling I provided a patch to solve this issue. Maybe one of you has the time to check if it also works for you: https://review.typo3.org/c/Packages/TYPO3.CMS/+/85856
Updated by Stefan Terborg 3 months ago
Seems to work in TYPO3 12.4.19. The info popup appears, no errors in console.
Updated by Mathias Brodala about 2 months ago
- Has duplicate Bug #100915: "Show references for this form" throws error for form definitions in Private path of custom extension added
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/+/85856
Updated by Benjamin Franzke about 1 month ago
- File form-reference-readonly.png form-reference-readonly.png added
- Status changed from Under Review to Closed
With latest 13 `main` the form is rendered as readonly, that means I can no longer trigger this error:
Therefore I'm closing this.
Note: When forcing the URL to be opened by appending it to the query parameter, it does not produce that error but an exception: "Edit an extension formDefinition is not allowed." – not perfect, but ok for now.
Updated by Gerrit Code Review about 1 month ago
- Status changed from Closed to Under Review
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/+/85856
Updated by Gerrit Code Review 27 days 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/+/85856
Updated by Gerrit Code Review 27 days 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/+/85856
Updated by Gerrit Code Review 24 days 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/+/85856
Updated by Gerrit Code Review 22 days 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/+/85856
Updated by André Buchmann 7 days ago · Edited
Can reproduce this with TYPO3 12.4.23 in a composer instance
Updated by Garvin Hicking 7 days ago
@André Buchmann If you could try the related patch, it's missing votes but may be addressed soon ;)
Updated by André Buchmann 7 days ago
Garvin Hicking wrote in #note-19:
@André Buchmann If you could try the related patch, it's missing votes but may be addressed soon ;)
Done. The patch works in 12.4.23
Updated by Gerrit Code Review 3 days 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/+/85856
Updated by Gerrit Code Review 3 days ago
Patch set 1 for branch 13.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/+/87033
Updated by Gerrit Code Review 3 days 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/+/87034
Updated by Anonymous 3 days ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 9951e36813a423409059f5444f97c22a6996b5a4.