TYPO3 Backend Error VHS ResourceViewHelper - typo3

I updated a TYPO3 Installation from 6.2. to 7.6 and now I have the problem, that I always get an error after clicking on the Page Settings. I always get:
Could not analyse class: "Tx_Vhs_ViewHelpers_Extension_Path_ResourcesViewHelper" maybe not
loaded or no autoloader? Class
Tx_Vhs_ViewHelpers_Extension_Path_ResourcesViewHelper does not
exist"
Some relevant Extension in the installation:
crawler
fluid
fluid_styled_content
fluidcontent
formhandler
ke_search
news
realurl
Maybe someone of you have an idea why this appears only at the page settings

That is because at least one template is rendered (or at least parsed) where you use the VHS ViewHelper ResourcesViewHelper with its old class name from the pre namespace era.
Scan your fluid templates (most likely page templates) for the old VHS namespace declaration
{namespace v=Tx_Vhs_ViewHelpers}
and change it to
{namespace v=FluidTYPO3\Vhs\ViewHelpers}
You can also switch to declaring the namespace in the HTML tag like this:
<html
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
xmlns:v="http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers"
data-namespace-typo3-fluid="true">

Related

What is the difference between f:link and f:uri ViewHelpers in TYPO3 fluid

There are a number of viewhelpers which can be used in Fluid. The f:link and f:uri seem to do basically the same thing.
For example:
f:link.external :
"A ViewHelper for creating links to external targets."
f.uri.external :
"This ViewHelper creates a link to an external page"
This results in the following questions:
What's the difference between f.link.external and f.uri.external (and which is supported in which Fuid / TYPO3 version?).
For which TYPO3 version is the documentation "Extbase Guide"? Because usually you see a version in lower left column, here it just shows 'latest'.
What is the best up-to-date resource for Fluid ViewHelpers using TYPO3 8?
All link viewhelpers in Fluid render a full HTML link, so <a href="..." ...>...</a>. In comparison all uri viewhelpers only render the URI, thus what would end up within href of a link or e.g. a src() in CSS.
The Extbase guide is rarely updated and there is no real version dependency. If at all it applies to the latest LTS but you'll find outdated info here and there.
There are some docs around the net which cover parts of Fluid but there is no definite guide which contains everything. Here are a few resources:
Viewhelpers reference in Fluid powered TYPO3
Viewhelpers in the Fluid Guide
Source code of TYPO3 Fluid
Source code of TYPO3
You are very welcome to improve the docs wherever you see something amiss. :-)
f.link.external actually creates a link and f.uri just outputs the uri.
f.link.external
Fluid Source:
<f:link.external uri="https://typo3.org">f.link.external</f:link.external>
Result:
f.link.external
f.uri.external
Fluid Source:
<f:uri.external uri="https://typo3.org">f.uri.external</f:uri.external>
Result:
https://typo3.org
It might be a good idea to update the documentation for f.uri.external because it is misleading.

How can I insert html Code in Typo3 8.7 Form extension in a label or description Field

I want insert this code in a Label or Description Field of a Contact-Form Field:
test Page
But when I save the form, the HTML-Code was removed:
test Page
How can I deactivate the removing of HTML Code in Typo3 8.7 tx_form?
Thank you
In TYPO3 v8, EXT:form does not provide this out-of-the-box. You can use a custom form element to achieve this. Here is an example: https://github.com/tritum/form_element_linked_checkbox
The upcoming TYPO3 v9 could contain a slim configuration for the CKEditor RTE to the form labels. It would allow to add links or style texts. The agency TRITUM worked on this as part of the TYPO3 User Experience Week 2018 (T3UXW18). It has yet to be added to the core, though.
Source: https://twitter.com/tritum/status/988778861948174336

How to get rendered links of a HTML element in TYPO3 7.6

IN TYPO3 versions before 7.6 it was possible to render links inside the content element HTML by using the TypoScript
tt_content.html.parseFunc.tags.link < lib.parseFunc.tags.link
This does not work anymore since 7.6. How can it be solved?
If you use fluid_styled_content, override the HTML.html and want to use forms and have the Typo3 link tags <link>text</link> converted to html links, you will have to use this (at least this worked for me, both custom html forms were working and links were converted):
<f:format.htmlentitiesDecode>
<f:format.html parseFuncTSPath="lib.parseFunc">
{data.bodytext}
</f:format.html>
</f:format.htmlentitiesDecode>
There are a couple of possible solutions for this question.
1.) Use fluid_styled_content.
I guess that now fluid_styled_content instead of css_styled_content is used. Therefore the used TypoScript does not work anymore. A valid solution would be to switch back to css_styled_content. However that is the old ancient way and for newer projects you shouldn't do this.
2.) Override the template of fluid_styled_content.
If you open the template of fluid_styled_content and the HTML element, found at typo3/sysext/fluid_styled_content/Resources/Private/Templates/Html.html you will see
<f:format.raw>{data.bodytext}</f:format.raw>
this must be changed to
<f:format.html>{data.bodytext}</f:format.html>
Overriding is described in the docs, see https://docs.typo3.org/typo3cms/extensions/fluid_styled_content/7.6/Configuration/OverridingFluidTemplates/Index.html

TYPO3 include plugin in fluid

I have TYPO3 version 7.6.18, do you know how include extension plugin right on fluid template? I found this link Insert plugin into a fluid template?
but I can't understand how I can find path to my plugin ? There described something about some typoscript browser.. Can you tell me how to do it, please )
Normally all plugins are registered in the same location in typoscript, tt_content.list.20 - you'll just have to add your pluginname tt_content.list.20.your_plugin_name. If you're unsure you can use the typoscript object browser (in the backend module "template") to look the exact path up.

TYPO3 FAL changed image not available in translation

In TYPO3 7.6, when I exchange an image in the base language I am not able to add this image in an already existing translation record.
For example: I added image pic1.jpg in English (L=0), on translating to German (L=1) pic1.jpg is available for activation. Later I remove pic1.jpg and add pic2.jpg, probably clipping or otherwise modify the relation so I have data that I want to preserve.
I'm able to delete the German translation record and add a new translation in both list view and page->languages:"Add Translation" with new image(s) and all its modifications preserved, but that is a work-around loosing all translated fields in the process.
If my memory doesn't fail me, there was a dimmed FAL record appearing in the translation media tab once it was added in the base language back in former versions of TYPO3 (6.1).
Bug? Or am I missing something?
It's a TYPO3 v7.6 core bug which exists since 2014 but it was never fixed. See bug report: https://forge.typo3.org/issues/57272
There are multiple ways to solve this issue. I had this problem too and for me it only worked with the first solution.
1. Create a ViewHelper
It's a solution from Kai Tallafus who shared his ViewHelper in the comments of the bug report 57272 (see link to bug report above).
ViewHelper: https://forge.typo3.org/attachments/download/32333/FalTranslationFixViewHelper.php
Usage of the ViewHelper in Fluid Template:
<util:falTranslationFix record="{record}" tableName="tx_myext_domain_model_foo" relationFieldName="files" as="files">
<f:if condition="{files -> f:count()} > 0">
<f:for each="{files}" as="file">
{file.properties.title}
</f:for>
</f:if>
</util:falTranslationFix>
2. Install an Extension
I found two extensions who probably will fix the bug. I recommend the first one but it doesn't work for me but maybe it will for you.
repair_translation
faltranslation (only available on bitbucket -> bitbucket.org/t3easy_de/faltranslation/src)
3. Enable sys_language_uid field for the FAL Media
There is a workaround for the translation of the FAL Media in which you enable the sys_language_uid field. When enabled the enduser can select the language for the media element. This also not worked for me but I know from a friend that in one of his project it worked. Manual (in german): www.npostnik.de/typo3/workaround-fuer-uebersetztungen-der-datensaetze-mit-fal-media/
4. Update to TYPO3 v8 LTS
When you're working on a project which could be updated to the new Version, you should consider to make an update. The Bug is fixed in the TYPO3 v8 LTS.
The viewhelper won't work for the field media in tablep-pair pages/page_labnguage_overlay. (TYPO3 8.7)
You have to seperate your translateted parts in the fluid-template. The where-clause in the query should check for 'pid' instead of 'uid'. And you have to check for a relavant entry in the media-field of the $rawRecord.