Image file cannot be resolved - typo3

The file of an image I used in an productbox cannot be resolved anymore.
I used this tag f:uri.image(src:bild.url,crop:bild.crop)} and PhpStorm throws me this error from now on, I did not recognize this message when I used it in other projects, but it`s also happening there.
Seems to be a current problem maybe with some Viewhelper Updates or the TYPO3 Version, I used TYPO3 v8.7.18 and v.8.7.4.
Anyone got a similar issue?

by default PhpStorm does not know about fluid. So PhpStorm probably tries to validate the fluid against HTML syntax which will fail, as there are tags not included in HTML. Also if you use fluid-variables where in HTML strings are used PhpStorm will fail.

Related

TYPO3 extension - f:uri.resource returns wrong path

I'm writing a backend module for my own TYPO3 extension, where I'm wrapping the content into a be.container including a CSS and a JS file:
<f:be.container
includeCssFiles="{0: '{f:uri.resource(path:\'CSS/backend.css\')}'}"
includeJsFiles="{0: '{f:uri.resource(path:\'JS/backend.js\')}'}"
>
<!-- module content -->
</f:be.container>
None of those resources gets included though. When I'm rendering f:uri.resource directly into the HTML, it - no matter which path - resolves to
/typo3/
which makes no sense to me. In my project, /typo3/ is the path where the TYPO3 core is symlinked to, relative to my web path.
I've assured that my resource files are placed in EXT:my_extension/Resources/Public/CSS/backend.css and EXT:my_extension/Resources/Public/JS/backend.js respectively. I had a similiar issue including resources in the frontend, where it would resolve to just a / - in the end I decided to go with inclusion via Typoscript instead. I'm not sure if I'll be able to do this for the backend module as well. Any idea how to solve this? Maybe I missed something in the configuration which messes up path resolution for f:uri.resource. Any help would be appreciated.
For a minimal test case, try putting the plain output into your fluid template:
{f:uri.resource(path:'CSS/backend.css')}
If that yields the same result, it seems like the ViewHelper is not aware of the current extension. You can pass it the extension key as argument, see https://docs.typo3.org/other/typo3/view-helper-reference/9.5/en-us/typo3/fluid/latest/Uri/Resource.html.

Typo3 problem: internal links not rendered correctly after upgrade to 9.5.11

I have just updated my typo3 site from 8.7.29 to 9.5.11 following the official documentation. From technical point of view everything went fine: the upgrade wizard ran successfully in all the required steps and there are no complains from all the available checking tools (database, extensions,...).
The additional problem was that I had to migrate from css_styled_content to fluid_styled_content (because scc_styled_content is not supported anymore by typo3 9). So I modified my old template to work with fluid. After that everything is fine except the fact that all the internal links are not rendered correctly. In particular in the FE all the internal links are reported as:
<a class="internal-link" href="t3://page?uid=246" title="Opens internal link in current window">My link</a>
So obviously typolinks are not parsed correctly.
Some other users reported a similar problem when the extension frontend editing is used. In my case the problem is still there even if this extension is disabled...
Do you have any idea on what is going on?
Thanks a lot for your help!

Getting error message using EXT:recaptcha and EXT:form in Typo3 8.7.9 in a custom template

im using the new EXT:form extension from Typo3 8. I put it in my own extension folder so i made a custom template for it. This works fine until the point i want to integrate Google recaptcha into it.
I want to use the EXT:recaptcha for this:
https://docs.typo3.org/typo3cms/extensions/recaptcha/Index.html
In the sample EXT:form layout the recaptcha works without problems. But when im switching back to my layout i get the following error message:
Oops, an error occurred! The validator preset identified by
"Recaptcha" could not be found, or the implementationClassName was not
specified.
What i have to do? Anyone has an idea?
I know this question is quite old, you probably found the solution already.
I'm quite sure you did not include the static template. After adding the recaptcha template to my root template the validator was available.

realurl prevar language and get parameter

I have a strange problem:
TYPO3 7.6 with realul 2.2.1
I got a page with a form. One field of the form gets prefilled via get-parameter (sysid=xxxxx).
The site is multilanguage: german->0, english->1, mapped via prevars '' and en.
When I call the page via www.domain.tld/form-page/?sysid=xxxxx I can fetch the get parameter and fill the field.
When I call the page via www.domain.tld/en/form-page/?sysid=xxxxx I get a 404. That's weired because www.domain.tld/en/form-page/ works without any problems.
I tried several settings (e.g. exclude sysid from chash generation) but nothing worked.
Any hints what I could do?
One additional note: the getvar links are not generated in TYPO3, the are called via barcodes.
I cannot reproduce your problem on the same versions of T3 and realurl.
And I guess (wild guess), it is not a realurl problem, but a TYPO3-core problem.
Could you try calling the page via:
www.domain.tld/index.php?id=XX&L=1&sysid=xxxxx
Furthermore investigate and tell us your settings of
[FE][pageNotFound_handling] and according (installtool/LocalConfiguration).
Nevermind. Error occured because I didn't adjust the realurl-setting for the domain after moving to live. Therefore automatic configuration took place and that didn't work. With manual conf it works.

Configure TinyMCE in Typo3 to run over HTTPS

we are using Typo3 7.6.6 for our new homepage. To simplify the process of writing new articles, we introduced the extension TinyMCE4 as TYPO3 RTE. On our test-system tinyMCE works fine, the editors are satisfied.
To prepare for production environment we introduced SSL. Hence the homepage is referenced over https://....
Since this change tinyMCE no longer appeared. After some research we found out, that the tinyMCE extension tries to load a specific dynamically generated js-file tinymceConfiguration....js over HTTP (not over SSL as preferred).
Since we have a strict policy, the server doesn't allow the client to catch the script without using SSL. Unfortunately we cannot change that policy.
The question is: where does the extension get the URL from. Can I overwrite it to reference the https://.. path?
I already tried changing
config.baseURL
tinyMCE.init({
...
document_base_url : "https://.."
});
But it didn't work.
Does anybody have an idea?
Regards,
Thomas
you could try to tell your browser to use "Content-Security-Policy" in that way all http links are rewriten by the browser itself. Maybe the lazy way.
https://developers.google.com/web/fundamentals/security/encrypt-in-transit/why-https?hl=en
http://www.html5rocks.com/en/tutorials/security/content-security-policy/
Regards
Pete