TYPO3 Update: cannot find deprecated RTE properties - typo3

I want to update from TYPO3 4.7.5 to TYPO3 4.7.10. Now I'm in the Upgrade Wizard and it says:
Deprecated RTE properties in Page TSconfig
The following Page TSconfig RTE properties are deprecated since TYPO3 4.6 and will be
removed in TYPO3 6.0.
Deprecated property Use instead
disableRightClick contextMenu.disable
disableContextMenu contextMenu.disable
hidePStyleItems buttons.formatblock.removeItems
hideFontFaces buttons.fontstyle.removeItems
fontFace buttons.fontstyle.addItems
hideFontSizes buttons.fontsize.removeItems
classesCharacter buttons.textstyle.tags.span.allowedClasses
classesParagraph buttons.blockstyle.tags.div.allowedClasses
classesTable buttons.blockstyle.tags.table.allowedClasses
classesTD buttons.blockstyle.tags.td.allowedClasses
classesImage buttons.image.properties.class.allowedClasses
classesLinks buttons.link.properties.class.allowedClasses
blindImageOptions buttons.image.options.removeItems
blindLinkOptions buttons.link.options.removeItems
defaultLinkTarget buttons.link.properties.target.default
fontSize buttons.fontsize.addItems
RTE.default.classesAnchor RTE.default.buttons.link.properties.class.allowedClasses
RTE.default.classesAnchor.default.[link-type] RTE.default.buttons.link.[link-type].properties.class.default
mainStyleOverride contentCSS mainStyleOverride_add.[key] contentCSS
mainStyle_font contentCSS mainStyle_size contentCSS
mainStyle_color contentCSS mainStyle_bgcolor contentCSS
inlineStyle.[any-keystring] contentCSS ignoreMainStyleOverride n.a.
disableTYPO3Browsers buttons.image.TYPO3Browser.disabled and
buttons.link.TYPO3Browser.disabled
showTagFreeClasses buttons.blockstyle.showTagFreeClasses and
buttons.textstyle.showTagFreeClasses
disablePCexamples buttons.blockstyle.disableStyleOnOptionLabel and
buttons.textstyle.disableStyleOnOptionLabel You are currently using
some of these properties on 1 pages (including deleted and hidden
pages).
Pages id's: 2
This wizard cannot update the following properties, some of which are present on those pages:
Deprecated property
fontSize
RTE.default.classesAnchor
RTE.default.classesAnchor.default.[link-type]
mainStyleOverride
mainStyleOverride_add.[key]
mainStyle_font
mainStyle_size
mainStyle_color
mainStyle_bgcolor
inlineStyle.[any-keystring]
ignoreMainStyleOverride
disableTYPO3Browsers
showTagFreeClasses
disablePCexamples
Therefore, the Page TSconfig column of those pages will need to be updated manually.
Only page records were searched for deprecated properties. However, such properties can also be used in BE group and BE user records (prepended with page.). These are not searched nor updated by this wizard.
Page TSconfig may also be included from external files. These are not updated by this wizard. If required, the update will need to be done manually.
Note also that deprecated properties have been replaced in default configurations provided by htmlArea RTE
I found a page TS config:
RTE.classes{
highlight{
name = newStyle
value = color:#636466; font-size:15px;
}
brown{
name = braun
value = color:#9A3811;
}
}
RTE.default{
ignoreMainStyleOverride = 1
useCSS = 1
showTagFreeClasses = 1
contentCSS = fileadmin/templates/css/rte.css
buttons {
blockstyle.tags.div.allowedClasses := addToList(highlight, brown)
blockstyle.tags.p.allowedClasses := addToList(highlight, brown)
textstyle.tags.span.allowedClasses := addToList(highlight, brown)
}
proc.allowedClasses := addToList(highlight, brown)
}
I changed it to
RTE.classes{
highlight{
name = newStyle
value = color:#636466; font-size:15px;
}
brown{
name = braun
value = color:#9A3811;
}
}
RTE.default{
useCSS = 1
contentCSS = fileadmin/templates/css/rte.css
buttons {
blockstyle.showTagFreeClasses = 1
blockstyle.tags.div.allowedClasses := addToList(highlight, brown)
blockstyle.tags.p.allowedClasses := addToList(highlight, brown)
textstyle.showTagFreeClasses = 1
textstyle.tags.span.allowedClasses := addToList(highlight, brown)
}
proc.allowedClasses := addToList(highlight, brown)
}
but the Upgrade Wizard still complains. I looked in the main TS, user TS, user group TS, export of the database but there is none of the mentioned properties used. My added style also doesn't work anymore ...
Where are the deprecated properties? How can I find that out?

I suggest to do a manual search in the database pages table to find pages with TSconfig:
SELECT uid, TSconfig FROM pages WHERE TSconfig!='';
If this will not give you a desired result, then grep for settings in your extensions:
find typo3conf/ext/ -type f -name ext_*\.php -exec egrep -H -n '(addPageTSConfig|addUserTSConfig)' {} \;
The TSconfig deprecation handling for RTE is done in:
tx_rtehtmlarea_deprecatedRteProperties::getPagesWithDeprecatedRteProperties()
This class can be found in typo3/sysext/rtehtmlarea/hooks/install/class.tx_rtehtmlarea_deprecatedrteproperties.php

Upgrade wizard is using SQL statement
SELECT uid, TSconfig FROM pages WHERE (TSConfig LIKE BINARY "%RTE.%showTagFreeClasses%" AND TSConfig NOT LIKE BINARY "%RTE.%showTagFreeClassess%")
so even changing showTagFreeClasses to buttons.blockstyle.showTagFreeClasses doesn't help. Just remove from RTE configuration and all is fine.

Related

Typo3 10.4.4 Gridelements 10.0.0 extension not working

Hey I am pretty new to typo3 and I want to build a website.
I am running version 10.4.4 of TYPO3 with the bootstrap package installed.
I have tried to follow the guide on https://docs.typo3.org/typo3cms/extensions/gridelements/stable/
I have copied the TypoScript into my template setup, but there is no output on the frontend.
Remember I am new to this so I don't understand the TypoScript well yet.
So any ideas to what I could do?
EDIT:
I want to use GriElements so that I can create my own layouts on my page. The standard layouts are good but I need more freedom than what they offer.
I can get output on the frontend without GridElements, but when I use the extension only the content in the GridElements block wont show. If I remove the standard TypoScript from the example on the manual page for this extension i get an error saying "Oops an error occurred! Code:" and then a code that changes every time I update the page.
My TypoScript on my template looks like this:
page.includeCSS.1 = fileadmin/user_upload/template/css/fonts.css
page.includeCSS.theme = fileadmin/user_upload/template/css/custom-theme.scss
# plugin.tx_bootstrappackage._LOCAL_LANG.da.readmore = test (NOT WORKING)
# https://docs.typo3.org/m/typo3/reference-coreapi/10.4/en-us/ApiOverview/Internationalization/ManagingTranslations.html
page.meta.robots = noindex, nofollow
page.meta.robots.replace = 1
page.10.partialRootPaths.3 = fileadmin/user_upload/template/partials/ContentElements/
page.10.partialRootPaths.4 = fileadmin/user_upload/template/Partials/Page/
page.10.dataProcessing.10.levels = 3
page.includeJSFooterlibs.bootstrap_navbar = fileadmin/user_upload/template/js
page.includeJSFooterlibs.bootstrap_navbar = fileadmin/user_upload/template/js/navbar.js
lib.contentElement.partialRootPaths.20 = fileadmin/user_upload/template/partials/ContentElements/
lib.contentElement.partialRootPaths.20 = fileadmin/user_upload/template/Partials/ContentElements/
lib.gridelements.defaultGridSetup {
// stdWrap functions being applied to each element
columns {
default {
renderObj = COA
renderObj {
# You can use registers to i.e. provide different image settings for each column
# 10 = LOAD_REGISTER
20 =< tt_content
# And you can reset the register later on
# 30 = RESTORE_REGISTER
}
}
}
# if you want to provide your own templating, just insert a cObject here
# this will prevent the collected content from being rendered directly
# i.e. cObject = TEMPLATE or cObject = FLUIDTEMPLATE will be available from the core
# the content will be available via fieldnames like
# tx_gridelements_view_columns (an array containing each column)
# or tx_gridelements_view_children (an array containing each child)
# tx_gridelements_view_column_123 (123 is the number of the column)
# or tx_gridelements_view_child_123 (123 is the UID of the child)
}
lib.tt_content.shortcut.pages = COA
lib.tt_content.shortcut.pages {
10 = USER
10 {
userFunc = tx_gridelements_view->user_getTreeList
}
20 = CONTENT
20 {
table = tt_content
select {
pidInList.data = register:pidInList
where = colPos >= 0
orderBy = colPos,sorting
orderBy.dataWrap = FIND_IN_SET(pid,'{register:pidInList}'),|
}
}
}
tt_content.shortcut.5 = LOAD_REGISTER
tt_content.shortcut.5 {
tt_content_shortcut_recursive.field = recursive
}
tt_content.shortcut.20 {
0 {
tables := addToList(pages)
conf.pages < lib.tt_content.shortcut.pages
}
1 {
tables := addToList(pages)
conf.pages < lib.tt_content.shortcut.pages
}
}
tt_content.gridelements_pi1 >
tt_content.gridelements_pi1 = COA
tt_content.gridelements_pi1 {
#10 =< lib.stdheader
20 = COA
20 {
10 = USER
10 {
userFunc = tx_gridelements_view->main
setup {
default < lib.gridelements.defaultGridSetup
}
}
}
}
The statics i included is:
Bootstrap Package: Full Pacakage (bootstrap_package)
Bootstrap Package: Bootstrap 4.x (SCSS) (bootstrap_package)
XML Sitemap (seo)
Gridelements w/DataProssing (recommended) (gridelements)
Gallery (bm_image_gallery)
EDIT2:
New TypoScript with DataProcessing
lib.gridelements.defaultGridSetup =< lib.contentElement
lib.gridelements.defaultGridSetup {
templateName.field = tx_gridelements_backend_layout
templateName.ifEmpty = GridElement
layoutRootPaths {
1 = EXT:gridelements/Resources/Private/Layouts/
}
partialRootPaths {
1 = EXT:gridelements/Resources/Private/Partials/
}
templateRootPaths {
1 = EXT:gridelements/Resources/Private/Templates/
}
dataProcessing {
10 = GridElementsTeam\Gridelements\DataProcessing\GridChildrenProcessor
10 {
default {
as = children
# Default options of the grid children processor
# Change them according to the needs of your layout
# Read more about it in the TypoScript section of the manual
# options {
# sortingDirection = ASC
# sortingField = sorting
# recursive = 0
# resolveFlexFormData = 1
# resolveBackendLayout = 1
# respectColumns = 1
# respectRows = 1
# }
}
}
}
}
My includes:
Fluid Contetn Elements (fluid_styled_content)
Fluid Contetn Elements CSS (fluid_styled_content)
Bootstrap Package: Full Pacakage (bootstrap_package)
Bootstrap Package: Bootstrap 4.x (SCSS) (bootstrap_package)
XML Sitemap (seo)
Gridelements w/DataProssing (recommended) (gridelements)
Gallery (bm_image_gallery)
The error I get:
Tried resolving a template file for controller action "Standard->3" in format ".html", but none of the paths contained the expected template file (Standard/3.html). The following paths were checked: /httpdocs/typo3conf/ext/bootstrap_package/Resources/Private/Templates/ContentElements/, /httpdocs/typo3conf/ext/gridelements/Resources/Private/Templates/
You probably missed to include the static template of gridelemnts. To do so edit your TS-Root-Template, select in the dropdown at the top "Info/Modify", hit the button "Edit the whole template record", go to tab "Includes" and select gridelements static setup in the Multiselect box on the right.
Please provide more information:
Which static templates have you included at all? Maybe you forgot to include fluid_styled_content?
How does your Typoscript/Flexform setup look like?
For what do you need gridelements?
EDIT: bootstrap_package did not very well together with gridelements in the past. Maybe you should first try to install Benjamin Knott's extension autogrids (see this issue on github for more information)
EDIT 2: Try this Typoscript, it just wraps a section around all elements but maybe you will then see your content in the frontend:
tt_content.gridelements_pi1.20.10.setup {
section < lib.gridelements.defaultGridSetup
section {
wrap >
dataWrap = <section id="c{field:uid}">|</section>
}
}
SOLVED:
I installed an extension that is called "Grids for bootstrap" included it in the template and it worked.
Thnaks for all the help you guys gave!
I think your problem is coming from your fluid code for gridelemnts, you didn't use the right syntax maybe.

Typo3 Fluid Templates - How to set up different templates for different pages

I'm trying to build from scratch a website with typo3 9.5 and setting up different template files for different pages. How do I achieve this?
I'm following the tutorial from https://docs.typo3.org/m/typo3/tutorial-sitepackage/master/en-us/TypoScriptConfiguration/Index.html and also tried the solution with no success provided at Typo3 Fluid Templates How to add multiple templates
Now all pages load the Default template and if I set the default cObject to Alternative, it loads the Alternative.html to all pages, even when the TCA at Typo3 is set correctly for each page:
All Pages Back-end Layout to [Default]
Contact set to [Alternative].
_
page = PAGE
page {
typeNum = 0
// Part 1: Fluid template section
10 = FLUIDTEMPLATE
10 {
templateName = TEXT
templateName.stdWrap.cObject = CASE
templateName.stdWrap.cObject {
key.data = pagelayout
pagets__default = TEXT
pagets__default.value = Default
default = TEXT
default.value = Default
pagets__alternative = TEXT
pagets__alternative.value = Alternative
alternative = TEXT
alternative.value = Alternative
}
templateRootPaths {
0 = EXT:photo/Resources/Private/Templates/Page/
1 = {$page.fluidtemplate.templateRootPath}
}
partialRootPaths {
0 = EXT:photo/Resources/Private/Partials/Page/
1 = {$page.fluidtemplate.partialRootPath}
}
layoutRootPaths {
0 = EXT:photo/Resources/Private/Layouts/Page/
1 = {$page.fluidtemplate.layoutRootPath}
}
dataProcessing {
10 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
10 {
levels = 1
includeSpacer = 1
as = mainnavigation
}
}
}
I want to use for instance a default.html template for all pages except contact page, which will have it's own template ( site_template/Resources/Private/Templates/Page/Alternative.html ).
First:
you should use higher numbers for the paths to your templates.
The higher the number the higher the priority for overriding files with the same name.
second:
there is no field pagelayout. either use layout or better backend_layout and backend_layout_next_level (example configuration with the full usage of configuration for subpages).
Your key values (pagets__default and pagets__alternative) already hint to the usage of backend_layout (pagets__* is the usual key for backend layouts defined in page TSconfig).
Probably the example in the documentation needs some correction. (Pull-request commited)

How can I make a Condition in TypoScript for loading different JavaScript-Files to different Backend-Layouts? (TYPO3)

After a "long way" with Google, Searching and many tries:
I created a lib.variable for the current Page:
lib.currentPage = TEXT
lib.currentPage.data = page:uid
If I debug it in my FluidTemplate in the Frontend with:
Testing currentPage: <f:cObject typoscriptObjectPath="lib.currentPage" />
I got the correct value.
Now I want to use that Variable in a Condition in my pageSetup.ts like follows:
[DB:pages:lib.currentPage:backend_layout = pagets__pagelayout_logoclaim_subpage]
page.includeJSFooter.belayoutlogoclaim = EXT:rm_base/Resources/Public/JS/be_logoclaim.js
[end]
I testet this with some other Conditions, but nothing works like expected.
Tested Conditions:
[page|backend_layout = pagelayout_logoclaim_subpage]
[globalVar = TSFE:page|backend_layout = pagelayout_logoclaim_subpage]
I also tested the Condition in the TypoScript Object Browser, and here it looks like good working:
TypoScript Object Browser - If I activate the Condition
SourceCode in the Frontend on a Site with the correct PageLayout
I need this, because I have two different Menus, and they need different JavaScripts, to avoid wrong behaviour in the Frontend.
Update:
I inserted the pageLayouts like this:
page = PAGE
page {
10 = FLUIDTEMPLATE
10 {
partialRootPath = EXT:rm_base/Resources/Private/Templates/Fluid/Partials/
layoutRootPath = EXT:rm_base/Resources/Private/Templates/Fluid/Layouts/
file.stdWrap.cObject = CASE
file.stdWrap.cObject {
key.data = pagelayout
// Default-Template is LogoFull_Subpage (No Navigation Dependence)
default = TEXT
default.value = EXT:rm_base/Resources/Private/Templates/Fluid/LogoFull_Subpage.html
// LogoClaim - Subpage
pagets__pagelayout_logoclaim_subpage = TEXT
pagets__pagelayout_logoclaim_subpage.value = EXT:rm_base/Resources/Private/Templates/Fluid/LogoClaim_Subpage.html
}
}
You see: The Backendlayouts are in Files of my Extension, not in the Database-Table: backend_layouts.
Update 2:
I would prefer a TypoScript-Way, if someone knows how - with external BE-Layouts. Thank you.
As I've seen the prefix pagets__ ,I guess that the problem here is that the backend_layouts are not stored in the database, so I think that a condition about that would not work.
If you are using a different html template for each backend layout and you are running TYPO3 8.7.x there is a different way to solve this issue: Add to your template file a new section called:
<f:section name="FooterAssets">
<!--your code here-->
</f:section>
This section will be loaded just before the closing of </body>. As far as I remember you don't even have to call this section in your layout file.
i would opt for using the VHS extension which provides an asset viewhelper.
you than include the asset view helper into the frontend template you are rendering. and it takes care about plaching the javascript in the header / footer
it allows also to definde dependancies and loads the script in the correct order. also supports concatination / minification ...
an example include might look like this:
<v:asset.script path="EXT:your_ext/Resources/Public/JavaScript/menu_a.js" dependencies="jquery" />
this requires you that you specified "jquery" via typoscript (or another assit view helper)
example typoscript:
plugin.tx_vhs.settings.asset.jquery {
path = EXT:your_ext/Resources/Public/JavaScript/jquery.js
type = js
}
I found another solution, that uses a TypoScript Custom Condition:
First I create a BackendlayoutCondition.php in my Extension here:
/Classes/TypoScript/BackendlayoutCondition.php
Its content is this (See Comments for more Detail):
<?php
namespace RM\RmBase\TypoScript;
use \TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractCondition;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Object\ObjectManager;;
class BackendlayoutCondition extends AbstractCondition
{
/**
* Evaluate condition
*
* #param array $conditionParameters
* #return bool
*/
public function matchCondition(array $conditionParameters)
{
\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($conditionParameters,'cond Params');
# Return false if in Backend (Condition for Frontend only)
if (!$GLOBALS['TSFE']) return false;
# QueryBuilder for Table: pages
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('pages');
# Check if current BackendLayout is inside the $conditionParameters
if (!empty($conditionParameters) && substr($conditionParameters[0], 0, 1) === '=') {
# Trim the Parameter to get the correct Value of the Parameter (behind '=')
$conditionParameters[0] = trim(substr($conditionParameters[0], 1));
# Get Backendlayout on this Page
$backendLayoutOnThisPage = $queryBuilder
->select('backend_layout')
->from('pages')
->where(
$queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter(intval($GLOBALS['TSFE']->id), \PDO::PARAM_INT))
)
->execute();
# Store Backendlayout Value of the current Page in $backendLayoutOnThisPage
$backendLayoutOnThisPage = $backendLayoutOnThisPage->fetch()['backend_layout'];
} else {
# If no ConditionParameter was set return false
return false;
}
# Check if parent BackendLayout_NextLevel is inside the $conditionParameters
if ($backendLayoutOnThisPage == '') {
# Get pageRepository
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
$pageRepository = $objectManager->get('TYPO3\\CMS\\Frontend\\Page\\PageRepository');
# Get Rootline of the current Page
$pageRootline = $pageRepository->getRootLine(intval($GLOBALS['TSFE']->id));
# Set rootlineIndex to the Parent Page Index
$rootlineIndex = count($pageRootline)-2;
# Check Parent Page Backendlayout_NextLevel till 0 or Backendlayout found
while ($rootlineIndex > 0) {
if ($pageRootline[$rootlineIndex]['backend_layout_next_level'] == $conditionParameters[0]) {
return true;
} else {
$rootlineIndex--;
}
}
# No BackendLayout_NextLevel found till 0
return false;
} else {
# If Condition Backendlayout found return true, otherwise return false
if ($backendLayoutOnThisPage == $conditionParameters[0]) {
return true;
} else {
return false;
}
}
}
}
(Edited 2)
Than I just have to use the following Condition in my pageSetup.ts:
[RM\RmBase\TypoScript\BackendlayoutCondition = pagelayout_logoclaim_subpage]
page.includeJSFooter.belayoutlogoclaim = EXT:rm_base/Resources/Public/JS/be_logoclaim.js
[global]
Now I have this Sourcecode in the Frontend:
<script src="/typo3conf/ext/rm_base/Resources/Public/JS/be_logoclaim.js?1523005944" type="text/javascript"></script>
not that:
<script src="/typo3conf/ext/rm_base/Resources/Public/JS/be_logoclaim.js" type="text/javascript"></script>
if I use the FooterAssets method:
<f:section name="FooterAssets">
<script src="/typo3conf/ext/rm_base/Resources/Public/JS/be_logoclaim.js" type="text/javascript"></script>
</f:section>
Edit: I found some errors in my Answer, i fix it and edit my answer then.
Edit2: Now the Condition checks the Backendlayouts and the Backendlayouts_Nextlevel Fields for Backendlayouts to get all possible BE-Layouts including the inherited.
The problem with the backend_layout field is that there also is a field backend_layout_next_level which affects subpages. so you can't build a simple condition.
Either you use stdWrap.if where you can calculate the current value for backend_layout overlaying an inherited value from backend_layout_next_level.
Or you define a userfunc where you evaluate it yourself in PHP.
Be aware that layouts defined in records have another prefix than layouts defined in pagesTS.
edit:
Example
temp.layout = CASE
temp.layout {
key.data = levelfield:-1, backend_layout_next_level, slide
key.override.field = backend_layout
default = TEXT
default.value = default-layout
1 = TEXT
1.value = layoutdefinition_from_record
pagets__layout2 = TEXT
pagets__layout2.value = layoutdefinition_from_pageTSconfig
sitepackage__layout3 = TEXT
sitepackage__layout3.value = layoutdefinition_from_sitepackage
}
Now you can use temp.layout for further decisions:
10 = TEXT
10.field = bodytext
10.wrap = <div class="demo">|</div>
10.wrap.if {
equals.cObject < temp.layout
value = default-layout
}

Page object isn't returned with the categories

I am developping a plugin to list all the page of a certain type. I added the new type without any difficulties. I also wanted to display the categories of the page but when I debug the objects in the template, I only see the number of categories associated with the page.
The repository doesn't return the categories of the page and I can't find why. Also, as a test, I checked if a normal page would return the childrens but it doesn't even count the number of categories attributed to the page.
I took a look into the sys_category_record_mm table and the rows are created correctly. I haven't touched the categories in the TCA.
This is the items configuration in the sys_category TCA
items
config
allowed = *
internal_type = db
MM = sys_category_record_mm
MM_oppositeUsage
pages
0 = categories
sys_file_metadata
tt_content
tx_news_domain_model_news
0 = categories
show_thumbs =
size = 10
type = group
exclude = 0
label = LLL:EXT:lang/locallang_tca.xlf:sys_category.items
This is my page categories config in the TCA
categories
config
autoSizeMax = 50
foreign_table = sys_category
foreign_table_where = AND sys_category.sys_language_uid IN (-1, 0) ORDER BY sys_category.sorting ASC
maxitems = 9999
MM = sys_category_record_mm
MM_match_fields
fieldname = categories
tablenames = pages
MM_opposite_field = items
renderType = selectTree
size = 10
treeConfig
appearance
expandAll = 1
maxLevels = 99
showHeader = 1
parentField = parent
type = select
exclude = 1
label = LLL:EXT:lang/locallang_tca.xlf:sys_category.categories
I didn't add more category selector to the page. Either manually or via the makeCategorizable so that should still the default configuration.
Are you using extbase as you are talking about objects? If yes, then the categories property got a wrong type in your model. Instead of string, use
/**
* #var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\Category>
* #lazy
*/
protected $categories;
If you are not using extbase, just do an additional query to sys_category_record_mm to fetch the according counts.

Typo3 7.6.2 - Custom Styles RTE

I got the newest Typo3 LTS version. Now i need to have some custom textstyles.
I can`t find anything useful on Google which works with version 7.6.2
The last configuration i tried is following:
RTE.default {
contentCSS = fileadmin/templates/css/typo3-RTE.css
}
RTE.default.proc.allowedClasses := addToList(tel, fax)
RTE.default.buttons {
textstyle.tags.span.allowedClasses := addToList(tel,fax)
}
RTE.default.proc.allowedClasses := removeFromList(csc-frame-frame1, csc-frame-frame2, important, name-of-person, detail)
RTE.classes := removeFromList(csc-frame-frame1, csc-frame-frame2, important, name-of-person, detail)
RTE.classes.tel {
name = Telefonnummer
class = tel
}
RTE.classes.fax {
name = Fax
class = fax
}
I wanted to have the textstyles "Telefonnummer" and "Fax". As you can already guess, it does not work.
Beside of that none of the codes i found are working. Is there anyone having a solution for the newest LTS version of Typo3 and the RTE?
My working example (Typo3 8.5.1):
Page TsConfig
RTE.classes {
custom-class {
name = custom-class
value = color: #186900;
}
}
## Default RTE configuration
RTE.default {
proc.allowedClasses := addToList(custom-class)
buttons.textstyle.tags.span.allowedClasses = custom-class
buttons.textstyle.showTagFreeClasses = 1
contentCSS = fileadmin/templates/css/rte.css
ignoreMainStyleOverride = 1
useCSS = 1
}
## Use same processing as on entry to database to clean content pasted into the editor
RTE.default.enableWordClean.HTMLparser < RTE.default.proc.entryHTMLparser_db
## front end RTE configuration
RTE.default.FE < RTE.default
RTE.default.FE.FE >
RTE.default.FE.userElements >
The rte.css file looks like this:
span.custom-class{
color: #186900;
}