Okay, I got it... I included a file with some functions named user.php /** * User service * * @var \Whmcs\Registration\Service\User * @inject */ protected $user = NULL; In this file there were empty lines after the ?> tag. These empty lines were the problem. I deleted them and now...
typo3,extbase,typo3-6.1.x,typo3-6.2.x,typo3-4.5
I fixed this issue. After going to Install tool. In DB Analyser there are so many tables are not properly indexed. After fixing that this issue has been fixed....
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,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)...
typo3,typoscript,extbase,typo3-6.2.x,typo3-6.1.x
If sex is your model that has the property sex (type string) you can use {person.sex.sex} in TYPO3 Fluid. An alternative approach is to adjust the getter method Person.getSex() in your model person so that it returns the property sex from the model sex: getSex() { return $this->sex->getSex(); } Having...
$tempColumns = array( 'title2' => array( 'exclude' => 0, 'label' => 'title2', 'config' => array( 'type' => 'input' ) ) ); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('table1', $tempColumns, 1); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('table1', 'title2;;;;1-1-1'); This should be enough to add a field to an existing table in TCA. Have you tried this?...
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 }...
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...
If you have your users in a sysfolder you have to give your users the pid of your sysfolder. Otherwise you will not see any users in your List View.
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...
De facto you need to use methods addMatrikelnr(...) and removeMatrikelnr(...) for adding and remving relations, they are generated by Builder in Fach model. Take a look at a setMatrikelnr method in the model it takes a collection not single object as a param. There's typical set of methods for m:n...
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...
typo3,fluid,extbase,typo3-6.2.x
As an alternative to using a custom ViewHelper, you could use a transient property in your model. Let's assume your model has a property "jsonData" that is a JSON encoded string. Now, you add another property $jsonArray and a getter for it: /** * @var array * @transient */ protected...
typo3,relation,fluid,extbase,typo3-6.2.x
Please check if the ObjectStorage is related to the correct class in your model. Sometimes the extensionbuilder does set up the ObjectStorage but messes up the annotation. Check if the annotation for "fach" in your ReRe\Rere\Domain\Model\Modul class contains the referenced class. It should look like this: @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\ReRe\Rere\Domain\Model\Fach> If assume...
You could do it like this, details are at the bottom: Get all file references. Go through them, retrieve the referenced file for each of them and retain only the ones where the field mime_type starts with image/. There are two things you probably need to watch out for: The...
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...
typo3,fluid,extbase,typo3-6.2.x
You don't need to have a findByUid method in your repository because this method is already defined in the Repository base class. The problem is most likely that you didn't clear the system caches (in Development Context, there's a button for this in the Backend and there's a button for...
First you have to consider the aspect of performance: If you want to insert a big amount of data, you should not use the Extbase persistence for such a task. Because if you do so, it will generate an object for each row you want to insert and persist it....
Remove params from your createAction() so you can use methods $this->request->hasArgument('foo') $this->request->getArgument('foo') for custom collecting fields....
security,typo3,antivirus,extbase
Simple question, simple answer: No. You can search for extensions in the TER (TYPO3 Extension Repository). I've already tried for several keywords in the topic, but with no success. So obviously, no extension for that (yet).
In order to pass non persistent objects between multiple actions, I would suggest that you store the objects serialized in a TYPO3 session variable. Doing so, you can restore the objects in the target action. Below you find a working example which can also be found here. <?php namespace derhansen\ValidationExamplesNew\Controller;...
interface,phpunit,typo3,implementation,extbase
You are mocking the wrong (inexistent) ObjectManager. The correct namespace is TYPO3\\CMS\\Extbase\\Object\\ObjectManager. So the correct line should be $objectManager = $this->getMock('TYPO3\\CMS\\Extbase\\Object\\ObjectManager', ...); Otherwise I wonder why you mock the ObjectManager at all. You don't use it in your method. One side note: Your code will fail if there is no...
Use ObjectStorage to get an 1:n-Relation to the FileReference model. In your model that could look like this: /** * uploadFiles * * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> * @cascade remove */ protected $uploadFiles = NULL; /** * __construct */ public function __construct() { //Do not remove the next line: It would break...
typo3,extbase,typo3-6.1.x,realurl
You can not only use your own lookup tables but also user defined functions: ... 'fixedPostVars' => array( // your extension parameter identifier 'yourParamIdentifier' => array( array( 'GETvar' => 'tx_yourextension_plugin[parameter]', 'userFunc' => 'EXT:yourextension/pi1/class.tx_yourextension_realurl.php:&tx_yourextension_realurl->handleRealURLCoding', ) ), // set the page id with your plugin to paramater identifier to hide the page...
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....
Yes, when you're using actions with model binding in param it will always look for object by field defined as ID - in our case it's always uid, but remember, that you do not need to bind model automatically, as you can retrive it yourself. Most probably you remember, that...
By default each Extbase repository has flag respectStoragePage set to true, that means that user groups need to be placed at the page which is configured as Default storage PID in your exts constants, anyway as I saw you probably don't include it at all. In such case you need...
Action's view uses controller's context, but standalone view has no any context by default. You need to pass it yourself i.e. right after creating the view object: $View = $this->objectManager->get('TYPO3\\CMS\\Fluid\\View\\StandaloneView'); $View->setControllerContext($this->controllerContext); ...
first of all, check the functions inside the model. You surely have functions like addCategory(), getCategories(), removeCategory() or setCategories(). second, if really needed, do not get the repository using the makeInstance function (it is outdated), simply inject it or use the ObjectManager: /** * categoryRepository * * @var \TYPO3\GoMapsExt\Domain\Repository\CategoryRepository *...
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,...
$Query = $this->createquery(); $Query->getQuerySettings()->setReturnRawQueryResult(TRUE); $Query->getQuerySettings()->setRespectStoragePage(FALSE); $Query->statement('your query'); return $Query->execute(); In your controller class your_Controller_name extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController { protected $myimagegalleryRepository; public function yourAction() { $myimagegalleries = $this->myimagegalleryRepository->getImages( $uidOfCE, $this->cObj->data['pid'] ); } }...
Use the following column configuration for the article TCA: 'foreign_table' => 'tx_somethingarticles_user_articleslike_article_mm' And remove the MM :)...
Yes, for label in extbase you can use $GLOBALS['LANG'] -sL('LLL:EXT:arzte/Resources/Private/Language/locallang.xlf:tx_extension_name'); but some it's not working at all. I have found solution may help you: \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('your_label_key','your_extensionName'); It's work fine for me try it :)...
repository,extbase,findall,typo3-4.5
This has something to do with the object and reflection caching in Extbase. In TYPO3 4.5 you should truncate manually all cache related tables in your database. I guess the related tables for the Extbase object and reflection caching are cf_extbase_object, cf_extbase_object_tags, bcf_extbase_reflection and cf_extbase_reflection_tags but I'm not sure. In...
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...
To achieve this, I can use so-called constructor injection. The ObjectManagerInterface is defined as an argument of the constructor and then automatically injected by Extbase: /** * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface */ protected $objectManager; public function __construct(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager) { $this->objectManager = $objectManager; $this->standaloneView = $this->objectManager->get('TYPO3\CMS\Fluid\View\StandaloneView');...
This is a breadcrumb navigation I did a while ago which incorporates news detail views, but you'll get an idea of how to incorporate your own tables. Please note that there is some additional markup, as it follows the Google Rich Snippet Microformat for breadcrumbs. lib.navi.breadcrumbs = COA lib.navi.breadcrumbs {...
Sorry, I found the solution myself. I tried to instantiate the model using new keyword which (ofc) doesn't work. I had to use $this->objectManager->get('\Vendor\Package\Domain\Model\MyModel'); instead....
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()....
annotations,typo3,extbase,typo3-6.2.x
when you declare param you need to set type of it. For all of them not only one. when you're not sure what type will be set use 'mixed' why you have @param $newNewsletter if it is not declared in method ? Either delete this annotation or add it to...
In your cronjob, change the language of the current backend user. You can use the $GLOBALS['BE_USER'] variable to access this. It has a property for the language. However, you might need to reinitialize the language service. How a look into the bootstrap to see how this is done.
why not, instead of render your plugin as a content object, directly address it in your ajax call? plugin_yourext_ajax = PAGE plugin_yourext_ajax { typeNum = 2000 config { disableAllHeaderCode = 1 xhtml_cleaning = 1 admPanel = 0 additionalHeaders = Content-type: text/plain no_cache = 1 } 10 = USER 10 {...
In order to have no hassle with autoloading, you need to stick to the Extbase naming convention even if you're not using namespaces: Tx_MyExtension_Controller_ProjectController should be the following file: EXT:my_extension/Classes/Controller/ProjectController.php (Mind the UpperCamelCase extension name which transform to underscores in the directory structure.) If you don't know which 6.2 class...
typo3,extbase,typo3-6.2.x,realurl
Not quite simple, but at least working... In EVERY of my ext I DO NOT use f:link.action VH, instead f:link.page so you can genearte links like ?id=123&tx_yourext_foo=bar Without controller and action params, of course as you can see most probably you'll need to modify your FE plugins, to read these...
public function listAction() { $firstObject = $this->myobjectRepository->findAll()->getFirst(); // just pseudocode $this->forward('show', NULL, NULL, array('myArgument' => $firstObject->getUid())); } With this you will send the uid of your first object to the other method (for ex: show), thus you will need to get the object back with a call to your repository...
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...
I just had to change the file AjaxDispatcher : line 101 to: \TYPO3\CMS\Core\Core\Bootstrap::getInstance();...
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...
For me the ext_tables_static+adt.sql dosn't work ... I've done a workarround with prefilling the table if the table is empty!
Indeed you're specifying absolute path in the filesystem and most probably there's no such path like /fileadmin/pdf/... there. Quite safe would be using some TYPO3 constant to specify where's your app's root i.e. PATH_site, like: fopen(PATH_site . "/fileadmin/pdf/anass.pdf", "w") or die('could not create file'); it will use the path like...