[TYPO3-english] Using object properties of a list of existing objects options in a form.select viewhelper

2017-10-16 Thread christian ewigfrost
Before i start describing the Problem: I'm pretty new to Typo3 and Extension developement for it (it's basically my first Extension and the first time i'm working with Typo3), so don't be to hard on me. Currently im developing an extension that lets the user create objects of the class

[TYPO3-english] Typo3 foreign_table: How to specify a specific column to a select drop down menu?

2017-10-24 Thread christian ewigfrost
Basically a simple question (i guess): I want to add records in the Typo3 backend. Thatfor i made an extension containing 4 different classes. While adding a record of one specific class to a folder via the backend i want to have a select that lets me chose from items of a column from another

[TYPO3-english] displayCond: How can i specify additional optional conditions of the same field?

2017-11-23 Thread christian ewigfrost
Basically: In the Backend i want to make specific fields only visible when the BE user chooses a specific value from a drop down menue of another field. I know i have to do this via displayCond in the TCAs, but i'm only able to define ONE condition or rather one value of the specific field to

[TYPO3-english] Preventing a record to be saved if the BE user input value was undesired?

2017-12-14 Thread christian ewigfrost
I want to prevent a BE user from inputting undesired property values for records, let's say for the property IPv4. I wrote an evaluation class for this: class IPv4Evaluation { /** * @param string $value * @param string $is_in * @param bool $set

[TYPO3-english] Prevent the task from accessing a class repository if there are no records of that class?

2017-11-17 Thread christian ewigfrost
So basically i'm using a Scheduler task in which i first create an object of each class repository and use the function findAll() on each: /** @var CustomerRepository $apprep2 */ $apprep2 = $objectManager->get(\Cjk\Icingaconfgen\Domain\Repository\ApplianceRepository::class); /** @var

[TYPO3-english] Re: Prevent the task from accessing a class repository if there are no records of that class?

2017-11-17 Thread christian ewigfrost
I solved the problem myself: Instead of using... if($appliances != null){...} I simply checked if a record in the repository is empty: foreach($appliances as $appliance) { \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump(!empty($appliance)); if(!empty($appliance)){

[TYPO3-english] Extension: Automatically delete also the referenced records in BE?

2017-11-17 Thread christian ewigfrost
I think (hope) this is a very basic, easy to answer question: In my extension i enable the backend user to create and delete records. Some of these classes define one or more of their properties through the uid of the record/object of another class (with 'type' => 'select' and access to a

[TYPO3-english] Typo3 scheduler: Can i somehow execute Action of controllers of my extension with it or my code?

2017-11-06 Thread christian ewigfrost
A while ago i was tasked to write a Typo3 extension to write so called .conf files for the icinga2 montoring tool (has nothing to do with Typo3). Still let me explain some parts of it: Basically the backend user needs to create records of records of specific classes and set values for each records

[TYPO3-english] Re: Typo3 scheduler: Can i somehow execute Action of controllers of my extension with it or my code?

2017-11-06 Thread christian ewigfrost
Yeah, i checked that out already. My problem is that i don't know where to put that code. The documentation states: "A task is represented by a PHP class that extends the base task class..." So is the task basically an additional class in my extension and do i therefore create a seperate

[TYPO3-english] Re: Typo3 scheduler: Can i somehow execute Action of controllers of my extension with it or my code?

2017-11-07 Thread christian ewigfrost
Thanks. I'm working with a CommandController now btw. Is still need to figure out how to use it properly but it seems i learn how to properly use the scheduler the way it's supposed to be used. ___ TYPO3-english mailing list

[TYPO3-english] Command Controller: I can't execute a command that uses class repositories of my extension

2017-11-07 Thread christian ewigfrost
Yesterday i finally got my Typo3 Scheduler working the way i want. Mostly it was the implementation of the CommandController into my extension that was a little bit "problematic". Now i have another question regarding the Scheduler and the CommandController specifically. I have an Action i

[TYPO3-english] Re: Command Controller: I can't execute a command that uses class repositories of my extension

2017-11-07 Thread christian ewigfrost
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

[TYPO3-english] Re: Command Controller: I can't execute a command that uses class repositories of my extension

2017-11-07 Thread christian ewigfrost
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

[TYPO3-english] Re: Command Controller: I can't execute a command that uses class repositories of my extension

2017-11-07 Thread christian ewigfrost
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 <

[TYPO3-english] Re: Command Controller: I can't execute a command that uses class repositories of my extension

2017-11-07 Thread christian ewigfrost
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

[TYPO3-english] Re: Command Controller: I can't execute a command that uses class repositories of my extension

2017-11-07 Thread christian ewigfrost
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. ___

[TYPO3-english] Re: Command Controller: I can't execute a command that uses class repositories of my extension

2017-11-07 Thread christian ewigfrost
..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

[TYPO3-english] Re: Command Controller: I can't execute a command that uses class repositories of my extension

2017-11-07 Thread christian ewigfrost
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

[TYPO3-english] Re: Command Controller: I can't execute a command that uses class repositories of my extension

2017-11-07 Thread christian ewigfrost
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 ___

[TYPO3-english] Re: Command Controller: I can't execute a command that uses class repositories of my extension

2017-11-07 Thread christian ewigfrost
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

[TYPO3-english] Typo3 Extension: Controllers can't be found by Backend Module

2017-11-09 Thread christian ewigfrost
Recently I've been trying to create a Backend Module for my extension. More or less for self study reasons, since I technically don't need it, but still, it'd be nice to know what i'm doing wrong. Basically: I have an extension, that works perfectly fine. I can create records in the Backend

[TYPO3-english] Re: Typo3 Extension: Controllers can't be found by Backend Module

2017-11-09 Thread christian ewigfrost
Can be closed ___ TYPO3-english mailing list TYPO3-english@lists.typo3.org http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english

[TYPO3-english] A refresh in the Backend creates a new record everytime

2017-11-08 Thread christian ewigfrost
I have, what i think is a minor problem, so hopefully this won't casue to much troble for anyone helping me: In the Backend i want the user to create records of a specific Model. The form should change depending on a select list which is filled with record of another model. It technically

[TYPO3-english] Re: Command Controller: I can't execute a command that uses class repositories of my extension

2017-11-07 Thread christian ewigfrost
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

[TYPO3-english] Re: Command Controller: I can't execute a command that uses class repositories of my extension

2017-11-07 Thread christian ewigfrost
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

[TYPO3-english] Re: Command Controller: I can't execute a command that uses class repositories of my extension

2017-11-07 Thread christian ewigfrost
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 retur

[TYPO3-english] Re: Command Controller: I can't execute a command that uses class repositories of my extension

2017-11-07 Thread christian ewigfrost
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,

[TYPO3-english] Re: Command Controller: I can't execute a command that uses class repositories of my extension

2017-11-07 Thread christian ewigfrost
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):

[TYPO3-english] Re: Command Controller: I can't execute a command that uses class repositories of my extension

2017-11-07 Thread christian ewigfrost
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->findByUi

[TYPO3-english] Re: Typo3 scheduler: Can i somehow execute Action of controllers of my extension with it or my code?

2017-11-06 Thread christian ewigfrost
I've tried this step by step guide, but the Command simply doesn't pop up in the Scheduler: http://blog.scwebs.in/typo3/typo3-commandcontroller-in-scheduler-task ___ TYPO3-english mailing list TYPO3-english@lists.typo3.org

[TYPO3-english] I changed my extension folder name and now Typo3 throws an error message

2017-12-06 Thread christian ewigfrost
So today my extension_builder overwrote my entire TCAs while saving, so i did something stupid: i changed the folder name of my extension via winscp and uploaded the backupfolder of my extension i made yesterday. Now i get the error message Oops, an error occurred! TYPO3 Fatal Error:

[TYPO3-english] Typo3 Extension: 'Unknown column in field list' error

2017-12-06 Thread christian ewigfrost
I have a huge problem adding new classes/models to my extension. Basically: Every time i add a new class/model with the extension_builder and then want to create a record of that class i get the following error message: 2: SQL error: 'Unknown column 'edited' in 'field list''

[TYPO3-english] Re: I changed my extension folder name and now Typo3 throws an error message

2017-12-06 Thread christian ewigfrost
Topic can be closed... I renamed the folder again and how the extension is name in the PackageStates.php. ___ TYPO3-english mailing list TYPO3-english@lists.typo3.org http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english

[TYPO3-english] Re: Typo3 foreign_table: How to specify a specific column to a select drop down menu?

2017-10-25 Thread christian ewigfrost
Quote: Mikel wrote on Wed, 25 October 2017 15:45 I think, I now understand. You just want to have a different label in your select box, right? If so, you can change that in the TCA of Kunde. 'ctrl' => [ 'label' => 'name', Change the

[TYPO3-english] Re: Typo3 foreign_table: How to specify a specific column to a select drop down menu?

2017-10-24 Thread christian ewigfrost
Hmmm... But that's not waht i want to do: What this does is just filtering the assignable records by their properties and then lets me choose the record in the select. But it assigns the entire record or the uid of the record to the property of the creatable record as understand. What i want to

[TYPO3-english] Re: Typo3 foreign_table: How to specify a specific column to a select drop down menu?

2017-10-25 Thread christian ewigfrost
c> You can prepare the items for the select in your own method. Mikel > Am 24.10.2017 um 15:04 schrieb christian ewigfrost : > > Hmmm... But that's not waht i want to do: What this does is just filtering the assignable records by their properties and then lets me choose the re

[TYPO3-english] Re: Typo3 foreign_table: How to specify a specific column to a select drop down menu?

2017-10-26 Thread christian ewigfrost
Quote: Mikel wrote on Wed, 25 October 2017 16:38 OK. Yes, that is possible. Like I said --> itemsProcFunc. Go into your tca, to the select field. 'renderType' => 'selectSingle', 'foreign_table' => 'tx_cvfoobar_domain_model_kunde',

[TYPO3-english] TYPO3 extension thought experiment: Editing a news entry and comment entries in one go

2018-01-31 Thread christian ewigfrost
I have a class called news. This class of course has an edit and update Action in its specific controller. Next to this it has objects of the class comments attached to it (the relation to these comments objects is stored in an Object Storage). Normally, as you can imagine, you can edit the news

[TYPO3-english] TYPO3 extension: attaching an object to an objectstorage throws a MySQL database error

2018-01-29 Thread christian ewigfrost
One of my TYPO3 extension classes uses a property (checklist) that is an object storage. class Kaufmnnisch extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity { public function __construct(){ $this->checklist = new

[TYPO3-english] Re: TYPO3 extension: attaching an object to an objectstorage throws a MySQL database error

2018-01-29 Thread christian ewigfrost
BTW: In my ext_tables.sql the datatype for the 'checklist' is: checklist smallint(5) unsigned DEFAULT '0' NOT NULL, So i guess this smallint throws the error!? But what datatype should i specify for an objectstorage? ___ TYPO3-english mailing list