typo3

Are there viable usecases for using standalone PHP scripts in a TYPO3 site?

£可爱£侵袭症+ 提交于 2021-01-28 20:11:42
问题 I just came across this question How can I use a PHP script in typo3 v9? and for me more interesting is right now - should you even do it and what are the possible usecases? The reason I am asking: I am currently useing standalone legacy PHP scripts on a site. Not happily, as I had always intended to migrate this to an extension or deprecate it, but as is often the case - the PHP scripts may long outlive PHP itself ;-) Consider you have some functionality, which you want to integrate in your

TYPO3 9.5.4 CKEditor RTE deletes style attributes

Deadly 提交于 2021-01-28 18:44:08
问题 I updated a TYPO3 website from 7->8->9. Now the problem is that the RTE CKEditor keeps deleting style attributes and even styles. So and old Element with content: <div class="mobilr"> <table height="655" width="972" style="vertical-align: middle; background-color: rgb(255, 255, 255); border-style: solid; border-color: rgb(187, 187, 187);" class="centertable"> <tbody> <tr style="vertical-align: middle;"> <td> <p> </p> .... is loaded in the editor as: <table class="centertable" style="height

TYPO3: check if current page is translated by typoscript

本秂侑毒 提交于 2021-01-28 09:03:22
问题 For the generation of the canonical tag by typoscript, I need to check if the current page is translated. If not, the canonical needs to point to the url in default language. How can I check if current page is translated by typoscript? Language handling in my typoscript config: sys_language_overlay = 1 sys_language_mode = content_fallback 回答1: If anyone is interested, I have worked out a solution to my task: Render the canonical url in default language if there is no translation for the

TYPO3 - Overriding & adding meta tags (from tx_metaseo) on detail view of custom extension

时间秒杀一切 提交于 2021-01-28 08:23:29
问题 I have a custom extension and on the detail page of the records I want to seo pimp the profile sites. I'm also using tx_metaseo. I'm already changing the 'title' tag via the show action like this: /** * action show * * @param Application $record * @return void */ public function showAction(Application $record=null) { // For the search $GLOBALS['TSFE']->indexedDocTitle = $record->getName(); } } But since I have tx_metaseo installed ... I'm also getting the generall meta tags. So on the detail

<If> condition with HTTP_HOST in htaccess breaks PHP

倾然丶 夕夏残阳落幕 提交于 2021-01-28 07:43:16
问题 I'd like to harden my shared hosting webspace to prevent it from rendering PHP with faked filenames like foo.php.wrong as suggested in the TYPO3 Security Guidelines. For details see also https://stackoverflow.com/a/61760273/3946047 Since I don't have access to the Apache configuration I'd like to add the configuration to my .htaccess file. But to make the .htaccess file work on both , my local development environment and in production, I need to wrap the code with a <If> condition to

Why doesn't TYPO3 have a Page Model in Core?

随声附和 提交于 2021-01-28 05:13:05
问题 When I use the core PageRepository (TYPO3\CMS\Frontend\Page\PageRepository), function getPage (), I get an array returned and not an object , as in many other core repositories. Then I have to build some "magic" for myself in order to inject the Categories or the Page Author as Objects to be used in the Fluid Templates . Question is if it is a kind of "design decision" not to provide a Page Model at all? 回答1: The PageRepository is not used in Extbase context, so there is no Domain modelling

Fluid Typo3 - How to get variables definded via flux from different page uids

爷,独闯天下 提交于 2021-01-27 13:42:36
问题 I guess my problem is easily solved, but I'm thinking for days about it, googling didn't help me out. Maybe I just don't understand the concept :-). In my provider extension I define a simple main page with one configuration option. Depending on what "fontawesomeicon" says for a page, its corresponding Fonteawesome-Icon shall be placed before the menu entry text. But when I implement it this way, every page menu entry gets the Icon from the actual page. I don't know how to tell the system,

TYPO3 10.3: Username in frontend

强颜欢笑 提交于 2021-01-24 22:08:09
问题 In TYPO3 9 I managed to display the current username in a FLUID-template with the following Typoscript: [loginUser=*] temp.username = TEXT temp.username { insertData = 1 value = {TSFE:fe_user|user|username} noTrimWrap = | || } [global] In TYPO3 10.4 this is not working anymore. Any idea how to display the current user? Many thanks! Urs 回答1: It's probably not working because you're using the old TypoScript conditions. Since TYPO3 9 the conditions work with Symfony expressions. The old

TYPO3 10.3: Username in frontend

喜夏-厌秋 提交于 2021-01-24 22:06:55
问题 In TYPO3 9 I managed to display the current username in a FLUID-template with the following Typoscript: [loginUser=*] temp.username = TEXT temp.username { insertData = 1 value = {TSFE:fe_user|user|username} noTrimWrap = | || } [global] In TYPO3 10.4 this is not working anymore. Any idea how to display the current user? Many thanks! Urs 回答1: It's probably not working because you're using the old TypoScript conditions. Since TYPO3 9 the conditions work with Symfony expressions. The old

Get TYPO3 Plugin settings from FlexForms in controller

♀尐吖头ヾ 提交于 2021-01-24 08:09:29
问题 I have a FE Plugin which uses a FlexForm MyExtFlexForm which is used to set certain configurations like limit or SourcePage etc.. In my controller action list I get these settings using $this->settings . Works fine till now. Now, I make AJAX calls to action update and I need to use the same settings which have been set earlier through the FlexForm for the FE plugin on this page. $this->settings does not show anything . I checked $GLOBALS['TSFE']->tmpl->setup['plugin']['MyExt.']['settings.']