TYPO3 - Troubleshooting Version 8
FlashMessages in Fluid Templates[Bearbeiten]
FlashMessages:renderMode funktioniert nicht mehr. Den Parameter renderMode aus Fluid Templates entfernen (ist jetzt immer im Mode div)
Beispiel
<ul class="typo3-flashMessages">
<f:for each="{flashMessages}" as="flashMessage">
<li class="alert {flashMessage.class}">
<h4>{flashMessage.title}</h4>
{flashMessage.message}
</li>
</f:for>
</ul>
</f:flashMessages>
Zugriff auf Settings in Fluid Templates klappt nicht mehr
TCA Konfiguration in Extension[Bearbeiten]
http://t3-developer.com/1/ext-programmierung/basics/das-tca-im-detail/
Die Definition der Backend TableContentArray muss jetzt in eine eigene Datei statt in die ext_tables.php
Früher hat man in der ext_tables die crtl Section gehabt und darin eine Zeile wie:
'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Configuration/TCA/Category.php',
In der Datei auf die Verwiesen wird hat man den Rest definiert.
So geht man vor[Bearbeiten]
Jetzt legt man in
Configuration/TCA für jede Tabelle eine eigene Datei an: tx_meineextension_domain_model_meinetabelle.php
und definiert darin
// alle TCA Infos für die Tabelle return array( 'ctrl'=>(...), 'interface'=>, ... );
Die ctrl Daten kompiert man aus ext_tables.php und löscht sie dort. Die dynamicConfigFile Zeile zeigt dir wo die restlichen Definitionen sind (interface, type...). Wenn du alle Definitionen in deine Tabellen kopiert hast muss die dynamicConfigFile Zeile gelöscht werden.
Die Dateien auf die dynamicConfigFile verwiesen hat, kannst du am Ende auch löschen Mach das aber erst wenn alles funktioniert, so hast du noch eine Referenz.
Die includeIcon Zeile kannst du auch erst mal auskommentieren. Da man jetzt alle Icons mit dem Icon Provider registrieren muss (s.u.)
Icons definieren[Bearbeiten]
Die Icon Definition hat sich ebenfalls geändert.
TYPO3 - Icon Factory https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/Icon/Index.html // allgemein https://coding.musikinsnetz.de/typo3-extbase-fluid/backend/add-icons-to-extension-storage-folders-in-page-tree konkrete Anleitung https://usetypo3.com/icon-api.html // etwas besse erklärt
Num muss man erst die eigenen Icons registrieren. Es gibt verschiedene IconProvider je nachdem ob es svg, pixel oder font-awesome Icons sind. eigene kann man theoretisch aucch nutzen.
Add the following code:
<?php
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
$iconRegistry->registerIcon(
'tx-gbbandpass-band',
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
['source' => 'EXT:' . $extKey . '/Resources/Public/Icons/tx_gbbandpass_domain_model_band.gif']
);
you can use all standard file formats for the icons like svg, png, gif, jpg; the $iconRegistry->detectIconProvider method will choose the right provider (there is a different one for svg files than for bitmap files) 3. Add a TCE override for the pages table
Path: /Configuration/TCA/Overrides/pages.php
<?php
defined('TYPO3_MODE') or die();
/**
* Override icon for storage folder
*/
$ext = 'yourextension';
$iconRef = $ext . '-record-folder';
$addToModuleSelection = true;
foreach ($GLOBALS['TCA']['pages']['columns']['module']['config']['items'] as $item) {
if ($item['1'] == $ext) {
$addToModuleSelection = false;
break;
}
}
if ($addToModuleSelection) {
$GLOBALS['TCA']['pages']['ctrl']['typeicon_classes']['contains-' . $ext] = $iconRef;
$GLOBALS['TCA']['pages']['columns']['module']['config']['items'][] = [
0 => 'LLL:EXT:' . $ext . '/Resources/Private/Language/locallang_be.xlf:extension_name',
1 => $ext,
2 => $iconRef
];
}
;
make sure to use the same name for your extension as in /ext_localconf.php (variable $ext)
$iconRef must be the identifier you chose for the folder icon in your /ext_localconf.php
$GLOBALS['TCA']['pages']['columns']['module']['config']['items'][][0]
is the name of your extension that will appear in the selection list; make sure to add the localisation to your /Resources/Private/Language/locallang_be.xlf (or however your backend language file is called, which will often be locallang_db.xlf), in this case it would be 'extension_name' but of course it can be whatever you want as long as you call it by that name in this array variable 4. Select the icon for your Storage Folder or Page
Edit the Page Properties of the Storage Folder or Page where you store your extension records. Go to Behaviour tab and select the extension under “Use as Container”. Needless to say TYPO3 needs extensive cache flushing before you’ll be able to see the extension in the list, of course. And if, in the page tree, you see a default error icon instead of the folder icon after you saved the properties – just reload again. And again. Might help, might not.
Allgemeine Hinweise[Bearbeiten]
Deprecation: #70514 - dynamicConfigFile is deprecated
See Issue #70514 Description
The TCA configuration dynamicConfigFile within the ctrl section of a table has been marked as deprecated and must not be used any longer. Impact
Using dynamicConfigFile within the ctrl section of a table will trigger a deprecation log entry. Migration
The setting is typically used in ext_tables.php files of extensions. The table configuration (TCA) must be moved to an own file in Configuration/TCA/<table_name>.php. The dynamicConfigFile setting isn’t needed anymore since the whole TCA array definition is in this file.
Furthermore, any other TCA manipulation of third party tables must be moved to Configuration/TCA/Overrides and no TCA setting must remain in ext_tables.php. This is highly encouraged since TYPO3 CMS 6.2 already for performance reasons. If this change is not applied to extensions, extension compatibility6 must be loaded or further migration may not be applied to this portion of TCA leading to all sorts of possible issues.
Fluid in JavaScript funktioniert nicht mehr[Bearbeiten]
Das Problem liegt daran, das der ViewHelper Parser die geschweiften Klammern erhalten möchte, er denkt das gehört zum JavaScript. Man muss ihn dazu bringen die Detection abzuschalten.
https://docs.typo3.org/m/typo3/guide-extbasefluid/master/en-us/Fluid/ThingsToKnow/JsAndInline.html
Bei mir hat es am Besten geholfen den ersten Wert so zu verpacken:
<f:format.raw>{settings.rows}</f:format.raw>
Für die restlichen hat es dann seltsamerweise auch funktioniert. Wahrscheinlich ist die detection dann ausgeschalten und er verhält sich wie früher.
cHash Probleme[Bearbeiten]
http://typo3.3.n7.nabble.com/TYPO3-8-6-amp-cHash-empty-td287591.html https://github.com/einpraegsam/training/issues/2 https://docs.typo3.org/m/typo3/book-extbasefluid/master/en-us/b-ExtbaseReference/Index.html
Page Not Found Reason: Request parameters could not be validated (&cHash empty)
Der cHash wird für das caching benötigt.
Das Problem ist, dass TYPO3 8.x den cHash grundsätzlich validieren möchte. Wenn keiner vorhanden ist wird das als Fehler interpretiert. Man kann das mit folgender TypoScript Konfiguration unterbinden:
plugin.tx_aimeos.features.requireCHashArgumentForActionArguments = 0
Oder das Caching ausschalten ? Oder man muss schauen, das bei der Link generierung auch immer der cHash mit geht.
cHash und JavaScript Links[Bearbeiten]
Wenn man einen Link per JS zusammenbaut, dann hat man keine Möglichkeit den cHash mitzuschicken. Sobald ein Plugin eine Action ausführt z.B. so:
https://www.self-storage4u.de/kontakt?tx_powermail_pi1%5Baction%5D=create&tx_powermail_pi1%5Bcontroller%5D=Form#c289
möchte Typo3 einen gültigen cHash. Man kann aber für alle Extensions diesen Check abschalten. In dem Beispiel z.B. im TypoScript
plugin.tx_powermail.features.requireCHashArgumentForActionArguments = 0
Weitere Möglichkeiten:
Ein eigenes Plugin für den (oder alle) AJAX-Request(s) zu bauen (z.B. Pi2) und dort den Check auszuschalten:
plugin.tx_extkey_pi2.features.requireCHashArgumentForActionArguments = 0
Parameter aus dem cHash Check in der Konfiguration auschalten
// für mehrere Parameter und Extensions... $GLOBALS['TYPO3_CONF_VARS']['FE']['cHashExcludedParameters'] = 'L, pk_campaign, pk_kwd, utm_source, utm_medium, utm_campaign, utm_term, utm_content,tx_extkey_pi1[myparameter]'; // für einzelne Extensions $GLOBALS['TYPO3_CONF_VARS']['FE']['cHashExcludedParameters'] .= ',tx_extkey_pi1[myparameter]';
Backend Icons funktionieren nicht mehr[Bearbeiten]
Bis v6 hatte man das IconUtility, das ist in v8 rausgeflogen. Ab hier gibt es nur noch die IconRegistry