extbase

TYPO3: disable cache for specific plugin / extension

安稳与你 提交于 2019-12-11 07:40:03
问题 I built an extension and a plugin where frontend-users can edit their profile but I noticed a critical issue: Under "Edit profile", users could see the full information about another user who wasn't even logged in. Apparently the form was a cached on the server because after adding: config.no_cache = 1 it didn't happen again. Now the issue is that indexing is disable on the whole website. Is there a way to disable caching only for this specific extension / plugin ? 回答1: You should have

TYPO3 Extbase - Failing to render json via typnum

安稳与你 提交于 2019-12-11 06:16:02
问题 TYPO3 Extbase - Failing to render json via typnum Next to list/edit/new/remove action (which work) I tried to render the output in json. But no values render. If I do a simple ... $data = array('value'=>'001'); return json_encode($data); It does return ... {"value":"001"} What am I missing? Edit: With using and referencing to the same repository its working: JSONController.php <?php namespace Vendor\Lei\Controller; use Vendor\Lei\Domain\Model\Lei; /** * JSONController */ class JSONController

Get FlexForm configuration in TypoScript

别来无恙 提交于 2019-12-11 06:07:30
问题 I need to get the page.headerData in typoscript from pi_flexform.How can implement my requirement? page = PAGE page { headerData { 10 = TEXT 10.value =<script>/**********************/</script> } } 回答1: I am not so sure about what you really need. I am guessing you want to access a FlexForm configuration inside your TypoScript? Since the version 8.4 this is possible by using plain TypoScript lib.flexformContent = CONTENT lib.flexformContent { table = tt_content select { pidInList = this }

Set sys_language_uid in an extbase command controller

。_饼干妹妹 提交于 2019-12-11 05:07:09
问题 I have a command controller (an importer) run by scheduler, which should persist data as such: foreach ($items as $item){ // store it $entry = $this->objectManager->get('STUBR\Importer\Domain\Model\Item'); $entry->setTitle($item['Title']); $entry->setData(json_encode($item)); // manually set the storage page (defined in scheduler form) $entry->setPid($itemStoragePid); // works // manually set the language (defined in scheduler form) // EDIT // $entry->setSysLanguageUid = -1; // had typo

Parameters to action lost when validation error occurs

自闭症网瘾萝莉.ら 提交于 2019-12-11 03:54:49
问题 I have two actions, newAction and createAction . Both get the same parameters, which are plain values, not objects. Their implementations looks similar to this: /** * Renders a form with the createAction as action="". * * @param string $value1 * @param boolean $value2 * * @ignorevalidation $value1 * @ignorevalidation $value2 */ public function newAction($value1 = NULL, $value2 = NULL) { $this->view->assignMultiple([ 'value1' => $value1, 'value2' => $value2, ]); } /** * @param string $value1 *

How to properly output DateTime with TYPO3 extbase fluid

本小妞迷上赌 提交于 2019-12-10 19:10:55
问题 I got two dateTime Objects stored in the Database: 2014-11-03 09:00:00 2014-10-21 13:45:00 When i try to output them with the ViewHelper format.date <f:format.date format="H:i">{termin.datumBeginn}</f:format.date> I get the following results: 10:00 15:45 So i got a one hour shift and a two hour shift which i can't write a workaround for. How do i set the timezones properly to have a clean output? 回答1: Although this is very old, I want to highlight that this was a bug in Extbase until recently

TYPO3: get path out of file reference in Extbase

Deadly 提交于 2019-12-10 16:43:54
问题 i've created a Custom Content Element with Fluid and Extbase (TYPO3 6.1), in which you can define a picture. In the picture-settings i can set a img-link, which is targetting a file. In my Controller i can access this data with $this->configurationManager->getContentObject(); But i just get a file-reference for this setting and no path. like this: file:1206 I've googled a lot and i didn't find a solution to access the path. Has anybody a solution or knows maybe a function in the

TYPO3 4.7.2 include extbase plugin via typoscript

不想你离开。 提交于 2019-12-10 16:12:14
问题 I wrote an extension and the implementation of the Plugin via backend does everything correctly. But when I try to implement my extension via typoscript I got this error everytime: Oops, an error occurred! The default controller can not be determined. Please check for Tx_Extbase_Utility_Extension::configurePlugin() in your ext_localconf.php. and I don't know why.. I have tried different implementations (per tx_extbase_core_bootstrap->run or tx_extbase_dispatcher->dispatch and with additional

Extbase query to compare two fields in same table

為{幸葍}努か 提交于 2019-12-10 15:57:46
问题 Is it possible to compare two database fields in the query api? For example I want compare the fields tstamp and crdate like: SELECT * FROM tt_content WHERE tstamp > crdate; In the query api I could not found a solution. To get all records and compare the fields in a loop is not a performed way, because this could be over 2 million records (in my real case). Thanks for your help. 回答1: The only way I can think of (and that the query builder supports) is to directly supply the statement. It'll

TYPO3 Extbase - redirect to pid

感情迁移 提交于 2019-12-10 15:57:22
问题 $GLOBALS['TSFE']->pageNotFoundAndExit(''); is currently used, but instead I would like to redirect to a page ID. With the command redirectToUri , I could find no solution, or didn't work. Code: /** * initialize action show * @return void */ public function initializeShowAction() { if ($this->request->hasArgument('xxx')) { if ( $xxx=$this->xxxRepository->findByUid( intval($this->request->getArgument('xxx')) ) ) { $this->request->setArgument('xxx',$xxx); return; } } $GLOBALS['TSFE']-