Tableless images in TYPO3 4.7? - typo3

I am stuck updating a site on TYPO3 4.7. Upgrading is not an option.
All the content elements that use images are formatted with tables and spacer.gifs, is there any way to make it use divs and css instead?

If css_styled_content is correctly installed, and you'Ve included the static template in your main template, this is indeed not the expected behaviour.
Did you flush all output caches? If so, check the value of the typoscript setting at tt_content.image.20.renderMethod and tt_content.textpic.20.renderMethod. They may be set to "table", and should be one of "figure", "ul" or "div".
However, TYPO3 4.7 is out of it's LTS phase. You need to update as soon as possible.

4.7 is outdated and there is no such option there, sorry

Related

How to add custom styles inside SilverStripe 4 CMS

Would anyone know what is the best way to add custom CSS for pages inside the CMS ?
I found we could do something like that, inside config.yml:
SilverStripe\Forms\HTMLEditor\TinyMCEConfig:
base_dir: 'silverstripe/admin:thirdparty/tinymce'
editor_css:
- 'themes/base/build/bundle-editor.css'
but that's only linked to TinyMCE, and I would like to add my styles to all the pages in the CMS, or at least for the pages that uses SilverStripe\Forms\TreeDropdownField as it is broken:
TreeDropdownField broken
Thank you
This is unfortunately a core bug, which has been fixed already and will be released in the next 4.0.x release (4.0.2), or 4.1.0.
More information: https://github.com/silverstripe/silverstripe-admin/issues/377
Edit: 4.0.2 has been released, so this should be resolved now.

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: tx_news: separate pagination between plugins

I'm using TYPO3 7.6 with the latest tx_news release from TER.
I want to show two news plugins at one page: one is configured to show all news from storage folder "A"; the other one is configured to show only the latest record from storage folder "B".
Now, once the first plugin paginates, the second one renders empty content since it tries to paginate as well (which doesn't make sense since it should display only the latest record).
So, my question is: How can I separate the pagination between both plugins?
In TYPO3 7.6 there is no solution to your issue, sorry. Workarounds include adding manual pagination for the second plugin or overriding the second widget with one that forces a different ID.
In TYPO3 8.6+ you can override the ID of each widget which causes the URL scope to change so you can isolate parameters for each widget. More information can be found on https://docs.typo3.org/typo3cms/extensions/core/8.7/Changelog/8.6/Feature-47006-ExtendTheWidgetIdentifierWithCustomString.html
I tweaked the fluid template to totally avoid the pagination in this case (based on "settings.templateLayout"
In the meantime (I don't know whether it was in place three years ago) there is an option Hide the pagination in the news plugin. You will find it in the tab Additional.
So if you place more than one list view on one page, you can disable pagination for all lists, which should not get paginated.

TYPO3 7.6 backend doesn't show startdate enddate of fluidcontent

We migrated an older TYPO3 site from 6.x to 7.6. One of the last things which don't work is that all be-users (inclusive admins) don't see the options startdate and enddate in the access tab of an element. This bug/feature affects only fluid content elements. On the same page are normal text elements, which are fine.
I already checked the user-rights, localconf.php, ext_tables.php and I searched for TCE.tt_content-configs but I couldn't find something irregular. In the rights management these element are not listed under "allowed exclusion fields". Do you have some ideas, hints?!
I think you need to inspect the TCA.
The TCA defines which fields are shown in the edit mask.This can be done field wise or in palettes.
I assume the startdate/enddate fields are in a palette and that the palette changed from TYPO3 6 to TYPO3 7 (name, contained fields, ...).
As long as your TCA is not adapted to this changes these fields are not visible.
Did you run the Database analyzyer? All Steps in the Upgrade Wizard are completed? For a full migration from css_styled_content to fluid_styled_content you have to run the Upgrade Wizard too.
install fluid_styled_content
uninstall css_styled_content
run Upgrade Wizard

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.