FAQ Database Discussion Community


Typo3 FE User assign to FEUserGroup

typo3,extbase,typo3-6.2.x
I'm creating a FEUser programmatically (works fine) in the second Step I want to assign this FE User to an existing FEUsergroup. I Thought it works fine but it didn't. In database the entry is set and the counter goes up. But If i check the usergroup in List-View there...

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

php,typo3,extbase,typo3-6.2.x
Use case: When saving an object (in backend, maybe in frontend too later) I want to manipulate values before saving to database. Problem: The file seems to get included (shows an error on save if I choose a wrong file path) but the function does not seem to be executed...

Typo3 - extbase - Missing type information, probably no @param annotation for parameter “$currentPage”

annotations,typo3,extbase,typo3-6.2.x
I get the following error in Typo3 Backend: Missing type information, probably no @param annotation for parameter "$currentPage" in Tx_OptivoBm_Controller_NewsletterController->newAction() The function is set up like that: /** * action new * * @param $currentPage * @param $newNewsletter * @dontvalidate $newNewsletter * @return void */ public function newAction($currentPage) { if...

How to get all FAL File Objects which are referenced?

repository,typo3,extbase,fal
I'm trying to make a extbase extension for TYPO3 to get alle file objects with mimetype image/... which referenced by any content, plugin or fluid in typo3. But i don't know which is the best way to get these data. How should i create a model in my extension and...

Extbase: inject repository into domain model

extbase
I am currently working with Typo3 6.2.10 and Extbase. I am trying to inject a repository into my domain model like this: class MyModel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity { /** * @inject * @var \Vendor\Package\Domain\Repository\SomeRepository */ protected $someRepository; } However, $this->someRepository is always null. Injecting repositories into controllers always works though. Thank...

typo3 extbase - bidirectional relation

typo3,extbase
I have two tables: fe_users (for my frontend users) and tx_somethingarticles_domain_model_article. A user should be able to "like" an article, so for every user I need the information if he already liked an article or not, but also do I need the information how many likes an article already has....

How to get typo3 settings in the utility files?

php,typo3,fluid,extbase
plugin.tx_xxx { setting { storagePid = 23 } } I want this typo3 settings in utility file. Please help me....

Get String of n:1 Domain Model Object

typo3,typoscript,extbase,typo3-6.2.x,typo3-6.1.x
I made an extension for typo3 with the extension builder. In there I have a relation called "sex" that refers to another model object from type n:1 (of course, everyone can only just have one sex). Now I want to present that in a table. When I use {person.sex} I...

TYPO3 Extbase build own Sitemap

typo3,sitemap,extbase
There are a lot of sitemap Generators for TYPO3 in the TER available. But none of them can handle Sites created by Extbase, which are not shown in the TYPO3 page tree. Edit Thanks to biesior, detailed informations: Unconventional I switch in TypoScript the GET Parameter for my Extbase extension[globalVar...

can't create files in typo3 inside fileadmin

fopen,extbase,typo3-4.5
I am building an extension with extbase where I need to create a pdf file inside fileadmin folder with php from a controller : fopen("/fileadmin/pdf/anass.pdf", "w") or die('could not create file'); The permission is granted to write files ... so I think I made a mistake writing the path. Could...

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

solr,typo3,extbase,typo3-6.2.x,fal
Before FAL, I can get the filename of an image from my own Extbase extension in the solr config file "typo3/ext/solr/Configuration/TypoScript/Solr/setup.txt" via index { queue { tx_myextension = 1 tx_myextension { fields { ... myimage_stringS = articleimage ... } } } } Where "articleimage" was a database field with the...

In extbase, how to access item by another value than uid

typo3,extbase,typo3-6.2.x
In a custom extbase extension, I need to call a show action, passing it another value than uid (this is a continuation of Use other than primary key as RealURL id_field). As the value "other than uid" is not resolved, it results in the exception http://wiki.typo3.org/Exception/CMS/1297759968 EDIT: here's the current...

Typo3 extbase database query

typo3,extbase,typo3-6.2.x,queryinterface
I have an extbase database query like below. $query = $this->createQuery(); $result = $query->statement("Select * FROM table1 WHERE hidden = 0 AND deleted = 0 AND (".$PublicationYears.") AND logo != '' ORDER BY uid ASC LIMIT 0, ".$iLimit." ")->execute(); return $result; $PublicationYears = "ttra = '12' or ttra = '13'...

Typo3 6.2 fluid pagination not working as expected

typo3,fluid,extbase,typo3-6.2.x,typo3-4.5
My typo3 6.2(Upgraded from Typo3 4.5) fluid paginate displays all the items instead of 5 items. My Repository Method : public function getRandomLocation($iLimit) { $query = $this->createQuery(); $result = $query->statement("Select * FROM tx_sfel_domain_model_ttblocationsproduktegruppen WHERE hidden = 0 AND deleted = 0 AND logo != '' ORDER BY uid LIMIT 0,...

Display Extbase FileReference with Fluid

typo3,fluid,extbase,typo3-6.2.x
In an extbase extension, I have a FileReference Object. It was created with extension_builder originally. From The Model: /** * apprenticeshipDocument * @var \TYPO3\CMS\Extbase\Domain\Model\FileReference */ protected $apprenticeshipDocument = NULL; etc. In the frontend, <f:debug>{institution.apprenticeshipDocument}</f:debug> gives me this: First Thing: originalResource is missing. Second: When calling {institution.apprenticeshipDocument.uidLocal} directly, the value is...

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
I'm using TYPO3 CMS 6.2.12 and Extension Builder 6.2.0 to model a Report class and build an extension to manage it. One of the domain driven design requirements is that a report author be a logged-in front end user. A second requirement is that the author choose a single group...

TYPO3 extbase create url in repository (not controller)

typo3,extbase
There are good tutorials on how to create URL's in the controllers like this one. Examples are: $this->uriBuilder->reset()->setTargetPageUid($page_uid)->setCreateAbsoluteUri(TRUE)->build(); $this->controllerContext->getUriBuilder()->reset()->setTargetPageUid($page_uid)->setArguments(array('person'=>$person->getUid())->buildFrontendUri(); In works from the controller. But I cannot do the same work in a repository. Error log say that reset() in first example and getUriBuilder in second example is called on...

Using FAL in Extbase correctly

typo3,extbase,fal
Domain model class Image extends AbstractContent { /** * @var \TYPO3\CMS\Extbase\Domain\Model\FileReference */ protected $file; /** * Gets the image file * * @return \TYPO3\CMS\Extbase\Domain\Model\FileReference */ public function getFile() { return $this->file; } /** * Sets the image file * * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $file * @return void */ public function setFile($file)...

PHP-Unit Tests: how to implement a TYPO3 Extbase object interface

interface,phpunit,typo3,implementation,extbase
I have some problems with the PHP UnitTests for my Controller: this is the function in my controller code that has to be tested public function newAction(\ReRe\Rere\Domain\Model\Fach $newFach = NULL) { // Holt die übergebene Modulnummer if ($this->request->hasArgument('modul')) { // Holt das Modul-Objekt aus dem Repository $modul = $this->modulRepository->findByUid($this->request->getArgument('modul')); }...

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

typo3,backend,extbase,typo3-6.2.x,typo3-extensions
I have developed TYPO3 (6.2) extensions with some FE plugins. I need to change informations about plugin, which is displayed in the backend on page view. Now only Title and name of plugin is displayed ... I have used flexforms for configure the plugin and I would like to show...

How to disable cache for a image carousel in TYPO3

caching,typo3,typoscript,extbase,typo3-6.2.x
My TYPO3 extension has a lib that generates random 5 images from the total stock, for example out of the 100 images. This is done randomly every time the page is loaded. Only default the TYPO3 cache is enabled so every time the same 5 images are showed. As the...

findAll on non object in extbase

repository,extbase,findall,typo3-4.5
I just created an extension in typo3 4.5 with one model (product). I created the "productRepository" then injected it in the ProductController but I still get the Call to a member function findAll() on a non-object here is how the ProductController looks like : /** * @var Tx_PiProductDetail_Domain_Repository_ProductRepository */ protected...

How can I use an injected object in the constructor?

typo3,extbase
I have a service class in my Extbase extension and want to use the ObjectManager to create an instance of an object in the constructor. /** * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface * @inject */ protected $objectManager; public function __construct() { $this->standaloneView = $this->objectManager->get('TYPO3\CMS\Fluid\View\StandaloneView'); $this->standaloneView->setFormat('html'); } Unfortunately this doesn't fails with an error...

Typoscript USER / USER_INT objects in powermail input fields

typoscript,fluid,extbase,typo3-6.2.x
I've a custom extension to render a value from database. I want to prefill the returned value of the extension using powermail prefill typoscript. But when I add the plugin as userfunction, then it will display strange output in frontend. See my typoscript code below; lib.companyname = USER_INT lib.companyname {...

PHP error “Cannot redeclare class” in extbase-based extension of Typo3 4.7

php,typo3,extbase
I have created an extension for Typo3 4.7 (actually, it was created for Typo3 6.2, but I am trying to backport it) using the extbase framework. I have already removed all namespaces from the core and also checked TYPO3 - Call another repository. However, I have the problem that calling...

extbase extension - howto update breadcrumbs

php,typo3,breadcrumbs,extbase
I created an extension with extbase which displays different content dependning on the GET parameters. Is there a way to update the breadcrumbs to reflect this? My breadcrumbs look like this in typoscript: temp.breadcrumb = HMENU temp.breadcrumb { special = rootline special.range = 0|-1 1 = TMENU 1 { noBlur...