Menu
  • HOME
  • TAGS

File url [tmp_name] after upload via Typo3 backend

Tag: typo3,fluid

I'm building a typo3 extension and in a backend plugin I want to build a image upload form. I seem not to get the correct $_Files url. The following fluid form is used:

<f:form action="customerSliderImages" id="customerSliderImages">
    <f:form.upload name="custSlider[sliderimage]" />
    <f:form.submit value="Upload" />
</f:form>

I want to have the [name] and [tmp_name] to store the image, but I don't get the correct url. Also I don't know to echo $_Files for debugging. I tried the following but not working:

$_FILES["tx_mtclnt_user_mtclntmtcus"]["tmp_name"]["custSlider"]['sliderimage']
$_FILES["tx_mtclnt_user_mtclntmtcus"]["name"]["custSlider"]['sliderimage']

Best How To :

It seems you did not define the enctype attribute on the <f:form> tag.

<f:form ... enctype="multipart/form-data"> ... </f:form>

See also:

  • http://www.w3schools.com/tags/att_form_enctype.asp
  • http://wiki.typo3.org/Fluid#f:form

typo3 flow persist updated relation

php,doctrine2,typo3,typo3-flow

From the Flow manual: When you add or remove an object to or from a repository, the object will be added to or removed from the underlying persistence as expected upon persistAll. But what about changes to already persisted objects? As we have seen, those changes are only persisted, if...

htaccess and authentication for multiple domains

.htaccess,typo3

This will make it so authorisation unless the host ends in example2.com # set the "require_auth" var if Host ends with "example2.com" SetEnvIfNoCase Host example2\.com$ require_auth=true # Auth stuff AuthUserFile /var/www/htpasswd AuthName "Password Protected" AuthType Basic # Setup a deny/allow Order Deny,Allow # Deny from everyone Deny from all #except...

Typoscript CASE & default value

typo3,typoscript

Use default.data = field:pid instead of default.data = pid. TYPO3 needs to know where to look for pid, it could be a request parameter, register, configuration setting and so on as well.

Show Typo3 FlexForm checkbox items inline

typo3

Flexforms does not support such palette functionality like TCA offers. You can use a multiple value selector to offer all available options in a single field instead of using checkboxes (see: http://docs.typo3.org/typo3cms/TCAReference/Reference/Columns/Select/Index.html#columns-select-examples-multiple). An example of this in your case: <settings.ownchoice> <TCEforms> <label>Own Choice</label> <config> <type>select</type> <items> <numIndex index="0"> <numIndex index="0">For...

Is it possible to set by fluid a argument that the typo3 backend uses as input

typo3,fluid

You can't do that in the view, instead you can make a copy of lib.lastaddeditmes in TypoScript and then use it in other place like: lib.lastaddeditmesOnlyThree < lib.lastaddeditmes lib.lastaddeditmesOnlyThree.someSetting.items = 3 and in view: <f:cObject typoscriptObjectPath="lib.lastaddeditmesOnlyThree" /> Remember that TypoScript is just a configuration syntax (not programming language) so it...

Display Extbase FileReference with Fluid

typo3,fluid,extbase,typo3-6.2.x

Files and file references behave a bit different in fluid that usual: They are lazy-loaded, so the originalResource (Extbase file reference) and originalFile (Core file reference) values are NULL before the first access to them. But you can just access them as usual. The value uidLocal of an extbase file...

Remove default html header with typoscript

typo3,typoscript

On the rewritten question: how to remove the page title tag. config.noPageTitle = 2 This is an age-old extravaganza of TypoScript: https://forge.typo3.org/issues/14929...

File url [tmp_name] after upload via Typo3 backend

typo3,fluid

It seems you did not define the enctype attribute on the <f:form> tag. <f:form ... enctype="multipart/form-data"> ... </f:form> See also: http://www.w3schools.com/tags/att_form_enctype.asp http://wiki.typo3.org/Fluid#f:form ...

Hide typo3 content elements for specific user(groups)

typo3,typoscript

Note: I have only an old Typo3 4.3.5 installation, but I hope this hasn't changed much. In User admin, edit group permissions and go to Access lists. At the bottom is "Explicitly allow/deny field values" where you can restrict specific content types. With the restriction, affected users still see the...

TYPO3 extbase create url in repository (not controller)

typo3,extbase

First of all, you shouldn't do this. For creating URIs in Extbase, you need access to the current controller context, because there are several factors that go into creating an URI (currently called controller action, current host name, selected language, ...). If you would create URIs within your repository (i.e....

How to use Hook “processDatamap_postProcFieldArray” in TYPO3 6.x

php,typo3,extbase,typo3-6.2.x

Solved: in my ext_localconf.php there was just a '/' missing inside the namespace ... $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = 'EXT:navolspmanager/Classes/Hooks/GetGeoCodesHook.php:\NachVORNE\Navolspmanager\Hooks\GetGeoCodesHook'; Improvements: When updating one field according to other user input we should use the 'processDatamap_postProcessFieldArray' function. That way trim, date and number stuff etc is already done at the moment we grep the...

tt_news single view with static news_id

typo3,tt-news

Insert the following lines to the setup field of an ext-template at the page where you want to display the selected news item in SINGLE view if no SINGLE view for another record was requested: # hide the "no news id" message plugin.tt_news._LOCAL_LANG.default.noNewsIdMsg = &nbsp; # set the tt_news singlePid...

TYPO3 Extbase build own Sitemap

typo3,sitemap,extbase

If you use ts for create sitemap you can add any items. http://www.adick.at/2010/06/01/typoscript-xml-sitemap/. MB this will help 20 = CONTENT 20 { table = tx_adprojects_domain_model_project select { orderBy = title ASC languageField = sys_language_uid pidInList = 11,12,13,14,15,30 } renderObj = COA renderObj { stdWrap.wrap = <url>|</url> 5 = TEXT 5...

CSS right sidebar fixed width and left contant fluid

html,css,width,fixed,fluid

Just move .page-side before .page-content in your html .page-main{ padding: 10px; height: auto; overflow: hidden; } .page-content{ background-color: red; width: auto; overflow: hidden; } .page-side { float: right; width: 200px; background-color: green; } <div class="page-main"> <div class="page-side"> Sidebar </div> <div class="page-content"> Content </div> </div> ...

How to get typo3 settings in the utility files?

php,typo3,fluid,extbase

You can add below line in the your controller. $objectManager = \TYPO3\CMS\Core\UtilityGeneralUtility::makeInstance('Tx_Extbase_Object_ObjectManager'); $configurationManager = $objectManager->get('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManager'); $this->setting = $configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT); $this->ts_config = $this->setting['plugin.']['tx_xxxx.']['settings.']['storagePid']; I think...

TYPO3 Solr extension and facets

solr,typo3,typoscript,typo3-6.2.x

I assume that your type-field in the solr index only has 4 values, one for pages, 1 each for the two custom tables, and 1 for news. In order to get 6 facets, you need to have 6 different values in the field the faceting is done on. I'm not...

How to assign variable in fluid?

typo3,fluid,view-helpers

Define namespace like following at the top {namespace v=FluidTYPO3\Vhs\ViewHelpers} Then use set viewhelper <v:variable.set name="test" value="12345" /> {test} {test} will return value 12345...

Typo3 6.2: “Could not find a suitable type converter for ”String“ ” exeption after update

php,typo3,typo3-6.2.x

I think it needs to be /** * action show * * @param string $id Course-Id * @return void */ public function showAction($id){ } string lowercase and the argument $id must be specified as well...

Fluid image with extra data for cycle2

typo3,fluid

Since data-cycle-title and data-cicle-desc are not registered arguments within the ImageViewHelper you cant pass those values directly. But there is a additionalAttributes argument for the rescue. You can add as many attributes as you like to have in your image tag. additionalAttributes expects an array notation: <f:image ... additionalAttributes="{data-cycle-title: 'Title',...

How to get filename in Typo3 solr extension with FAL and own Extbase extension

solr,typo3,extbase,typo3-6.2.x,fal

Solution found: index { queue { tx_myextension = 1 tx_myextension { fields { ... bild_stringS = FILES bild_stringS { references { table=tx_myextension_model_name uid.data = field:uid fieldName=artikelbild } renderObj = TEXT renderObj { stdWrap.data = file:current:publicUrl stdWrap.wrap = | } } } } } } This way I get the URL,...

How to get Query object to felogin repository?

typo3,typo3-6.1.x

I think Below code is useful to you $query = $this->persistenceManager->createQueryForType('TYPO3\CMS\Extbase\Domain\Model\FrontendUser'); Write in this your extension repository....

How to disable cache for a image carousel in TYPO3

caching,typo3,typoscript,extbase,typo3-6.2.x

in your ext_localconf.php there, where you added your plugin make an usage of the 4-th param of configurePlugin method \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( 'Vendor.' . $_EXTKEY, 'PluginName', array('Customers' => 'slider',), array('Customers' => 'slider',) // List non-cachable action(s) ); Of course fix the VendorName and PluginName to your own. It will cause that plugin's...

typo3 templavoila check current language

typo3,typoscript,templavoila

Using translation labels in TypoScript You can use a translation label in TypoScript. For example: {LLL:typo3conf/customlabels.xlf:label.id} {LLL:EXT:mytemplateext/Resources/Private/Language/locallang.xlf:label.id} You may want to look at: http://docs.typo3.org/typo3cms/FrontendLocalizationGuide/BasicSetupOfALocalizedWebsite/Llxml%28locallang-xml%29InPluginsAndTyposcript/Index.html llXML files are XML files containing labels that the system can fetch in a localized version if a language pack is installed. If you want to...

How can I render preview of FE plugin diplayed in Page module

typo3,backend,extbase,typo3-6.2.x,typo3-extensions

If I understood well you are asking for ContentElement preview. You need to use cms/layout/class.tx_cms_layout.php hook for this, here's quite nice gist just two additions: don't use t3lib_extMgm class it's removed since 7.x you can register this hook just with: $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem'][$_EXTKEY] = 'EXT:your_ext/Classes/Hooks/PageLayoutView.php:\Vendor\YourExt\Hooks\PageLayoutView'; Depending on how did you register the...

Typoscript add class to the first element using stdWrap

typo3,typoscript,typo3-6.2.x

Your original TS is fine. Supposing you have the images in the same CE (Content element), not in several CEs. As such: For easier readability, I have modified the following line: stdWrap.wrap = <div class="item active">A|ENDA</div>|*|<div class="item">B|ENDB</div>|*|<div class="item">C|ENDC</div> Which gives me: <div id="c1531" class="csc-default"> <div id="carousel-example-generic" data-ride="carousel" class="carousel slide carousel-fade">...

Typo3 extbase database query

typo3,extbase,typo3-6.2.x,queryinterface

first of all you dont need this $query->matching( $query->logicalAnd( $query->equals('deleted', 0), $query->equals('hidden', 0) )); disable fields are included in query from default according to setting of table in ext_tables.php multiple matching will not work cause your third matching $query->matching($query->logicalNot( $query->equals('logo', '') )); is overwriting the matching() used before it logicalAnd...

PHP errors parsing Realurl config file

php,typo3

Use this instead <?PHP $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'] = array( '_DEFAULT' => array( ), ); ?> In newer version there are some problems with $TYPO3_CONF_VARS vs $GLOBALS['TYPO3_CONF_VARS'] the last one works always....

Copy typo3 to a new domain

typo3,typo3-6.2.x

empty the typo3temp folder did the trick.

How to end typo3 realurl with .html

typo3,realurl

In your realurl configuration file (usually typo3conf/realurl_conf.php1) there is a section fileName. In it there is a key defaultToHTMLsuffixOnPrev. Set it's value to 1. Should look somehow like this afterwards (generated by realurl autoconfig): 'fileName' => array( 'defaultToHTMLsuffixOnPrev' => 1, // <-- Important part 'acceptHTMLsuffix' => 1, 'index' => array(...

Typoscript USER / USER_INT objects in powermail input fields

typoscript,fluid,extbase,typo3-6.2.x

I'm just starting out with Typo3 myself, but I needed that functionality also. I had the same problem, it started working for me when I used this: plugin.tx_powermail.settings.setup.prefill { company = USER company { userFunc = tx_extbase_core_bootstrap->run extensionName = ExtPowermail pluginName = Extpowermail vendorName = TYPO3 switchableControllerActions.Extpowermail.1 = list }...

Routes for TYPO3 Neos plugin

typo3,typo3-flow,typo3-neos

Ok, I finally figure out what was wrong. I defined my route for plugin with optional params, which somehow was wrongly interpreted by request handler. Correct routes for my plugin should looks as follows: - name: 'Nice urls for my plugin' uriPattern: '{node}/q/{--acme_myplugin-element.object1}/{--acme_myplugin-element.object2}' defaults: '@package': 'TYPO3.Neos' '@controller': 'Frontend\Node' '@action': 'show'...

Language detection not working in Typo3 6.2.12

typo3,typoscript,typo3-6.2.x,language-detection

I've added the following configuration; plugin.tx_rlmplanguagedetection_pi1 { useOneTreeMethod = 1 defaultLang = de limitToLanguages = de,en } page.987 =< plugin.tx_rlmplanguagedetection_pi1 I understood that the functionality is not working only with this configuration. We need to "Select Official Language (ISO code):" in the website langauge ( alternate language we added in...

Typo3 6.2 fluid pagination not working as expected

typo3,fluid,extbase,typo3-6.2.x,typo3-4.5

To fix the above issue i rebuilt the query in extbase query format. In typo3 6.2.x paginate will not work with query statement so we need to convert it into extbase query format. My rebuilt query format is, $constraints = array(); $subConstraints = array(); $query = $this->createQuery(); foreach($PublicationYears as $year)...

Clean way to switch between typo3 fluid page and action link

typo3,fluid

You can extract the code within the links into a partial. For this, first create a partial template. Inside an Extbase extension, they are placed in Resources/Private/Partials by convention (you can change this by using the setPartialsRootPath() method on the template object, but usually that shouldn't be necessary). # Resources/Private/Partials/LinkContent.html...

How does my frontend usergroup list get lost between Extbase action controller and Fluid template partial in TYPO3 6.2?

typo3,fluid,extbase,typo3-6.2.x,typo3-extensions

Your variables are not passed to the partial, so {groups} is not a variable inside your Partial. You can specify the variables you want to use in the partial by giving the attribute arguments on your <f:render.partial> like in your case: <f:render partial="Report/FormFields" arguments="{groups : groups}" /> Since TYPO3 4.6...

Using FAL in Extbase correctly

typo3,extbase,fal

I get the hint in the Slack channel of TYPO3. You just need to set plugin.tx_myext.persistence.updateReferenceIndex = 1 respectively module.tx_myext.persistence.updateReferenceIndex = 1 and the index will be updated. Alternatively you could use \TYPO3\CMS\Core\Database\ReferenceIndex::updateRefIndexTable()....

google sitemap for tx_news records with dd_googlesitemap_dmf (or alternative)

typo3,sitemap,typo3-6.2.x

I had to downgrade dd_googlesitemap (using 1.2.0 now) to get dd_googlesitemap_dmf to work

Replace URLs in Typo3 DB

mysql,database,typo3

There are two (three with realurl) places where you need to look if changing the domain of a TYPO3 site, if everything is done by the book and noone hardcoded the domain all over the place or something. Usually you do not need to work in the database directly. After...

userfunc condition for detecting mobile device

typo3,typoscript,typo3-7.x

You can accomplish this with TypoScript using the PAGE Object. The code below shows you how to execute your own code before executing something else (like the template engine/content rendering etcetera). page.01 = USER_INT page.01 { userFunc = TYPO3\MyExt\Utility\MobileDeviceUtility->detectMobileDevice } And in code: <?php namespace TYPO3\MyExt\Utility; class MobileDeviceUtility { /**...

Where are TYPO3 constants from constant editor stored?

typo3,constants

The constants set in the constant editor are stored in TypoScript syntax in the field constants of the table sys_template.

TYPO3-Upgrade 4.5 to 6.2: namespaces

namespaces,typo3,typo3-6.2.x

To use the new XLASS feature, you need to provide a proper autoloading, by either sticking to the convention or by creating an ext_autoload.php file. http://docs.typo3.org/typo3cms/CoreApiReference/ApiOverview/Autoloading/Index.html http://docs.typo3.org/typo3cms/CoreApiReference/ApiOverview/Xclasses/Index.html...