Thank you very much, it seems to have worked flawlessly. But i had to change the line
where i create the Typo3QuerySettings object to
"'TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings'". I had not
time to test it yet in its full extent, because i just got to work, but you saved
Quote: christian ewigfrost (ewigfrost) wrote on Tue, 07 November 2017 16:14
Quote: christian ewigfrost (ewigfrost) wrote on Tue, 07 November 2017 16:08
> Quote: Mikel wrote on Tue, 07
Quote: christian ewigfrost (ewigfrost) wrote on Tue, 07 November 2017 16:08
Quote: Mikel wrote on Tue, 07 November 2017 16:02
> The execute method needs a return statement.
> Add return
Quote: Mikel wrote on Tue, 07 November 2017 16:02
The execute method needs a return statement.
Add return TRUE; add the end of your method.
Thanks... It works.
But the var dump returns
Quote: christian ewigfrost (ewigfrost) wrote on Tue, 07 November 2017 15:37
Here my TestTask.php:
get(\Cjk\Icingaconfgen\Domain\Repository\HostRepository::class);
\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($apprep->findByUid(1));
It works now, it was my fault...
But: I get an error when executing the saved task:
Execution of task "Foobar Test ()" failed with the following message: Task
failed to execute successfully. Class: Cjk\Icingaconfgen\Tasks\TestTask, UID: 5
___
Here my TestTask.php:
get(\Cjk\Icingaconfgen\Domain\Repository\HostRepository::class);
\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($apprep->findByUid(1));
}
}
___
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
Sry, i'm an idiot... I forgot a semicolon in the line before.^^
It works now.
___
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
Quote: Mikel wrote on Tue, 07 November 2017 15:18
>
> Oops, an error occurred!
> syntax error, unexpected 'DebuggerUtility' (T_STRING)
Take the full namespace (or take a use statement at the beggining of your
class):
OK, i tried to do what you told me:
I registered the task in the ext_localconf.php:
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\Cjk\Icingaconfgen\Tasks\TestTask::class]
= array(
'extension' => $_EXTKEY,
'title' => 'Foobar Test'
);
I created a TestTask.php file in
One thing i'm confused about:
I already registered the CommandController in the ext_localconf.php like this:
if (TYPO3_MODE === 'BE') {
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers'][]
= 'Cjk\\Icingaconfgen\\Command\\SimpleCommandController';
}
So i need to
..Also the part about: "The TypoScript needs to be present in the root page of your
website for backend modules/CommandControllers to use them. I suggest you add the stuff
to myext/Configuration/TypoScript/setup.txt and add the static template of your ext to
the root page."
..Is something
BTW: I used that Stackoverflow post as a reference:
https://stackoverflow.com/questions/23068053/in-an-extbase-extension-how-to-access-the-persistence-layer-from-a-scheduler-ta/23077743#23077743
The problem is: I don't understand where to put the line "module.tx_yourext.persistence
<
Quote: Mikel wrote on Tue, 07 November 2017 13:18
Try to fetch a single record with findByUid instead of getting all with
findAll. If you get a result, your repository has no records storage uid. You
can set it global in TypoScript or you
The task runs well enough, i tried this with creating a dummy file with some
summy text in it with trying to access the repositories. It worked (even
without execute()). But it seems i cannot access the repositories from the
Command Controller.
___
15 matches
Mail list logo