[TYPO3-mvc] fluid f:form in backend

Johannes C. Schulz - EnzephaloN IT-Solutions info at enzephalon.de
Wed Feb 15 13:10:37 CET 2012


Ouch!
Solved the problem - I'm an idiot! Forgot to change the name oft he action
in ext_tables.php :-(
Thanks a lot for your help and the hints!
Johannes

-----Ursprüngliche Nachricht-----
Von: typo3-project-typo3v4mvc-bounces at lists.typo3.org
[mailto:typo3-project-typo3v4mvc-bounces at lists.typo3.org] Im Auftrag von
Sebastian Schreiber
Gesendet: Mittwoch, 15. Februar 2012 11:04
An: TYPO3 v4 MVC project
Betreff: Re: [TYPO3-mvc] fluid f:form in backend

Hello Johannes,
by the way: What is this redirect('index')?
i guess, that´s a typo, you have to write $this->redirect('index')

But that does not solve you problem.


Am 15.02.2012 10:49, schrieb Johannes C. Schulz - EnzephaloN IT-Solutions:
> Hello Sebastian
>
> Thanks for your help.
> I run this dev-page under XAMP, found no Suhosin-Entry in phpinfo.
> But: If I place your code inside my saveedited-action, nothing more 
> happens then before. There seems to be a cache... 
> Extbase-Reflaction-cache is disabled. I cleared cache several times, 
> re-startet apache, logged-out and logged-in. No change. :-/ Best 
> regards Johannes
>
> -----Ursprüngliche Nachricht-----
> Von: typo3-project-typo3v4mvc-bounces at lists.typo3.org
> [mailto:typo3-project-typo3v4mvc-bounces at lists.typo3.org] Im Auftrag 
> von Sebastian Schreiber
> Gesendet: Mittwoch, 15. Februar 2012 09:54
> An: typo3-project-typo3v4mvc at lists.typo3.org
> Betreff: Re: [TYPO3-mvc] fluid f:form in backend
>
> Another guess:
>
> Do you have the suhosin-Extension enabled?
> Have a look at phpinfo e.g. INSTALLTOOL. Search for: Suhosin.
>
> If this is the case. What value do you get for example for the
> directive: suhosin.request.max_varname ?
>
> Am 15.02.2012 09:43, schrieb Sebastian Schreiber:
>> Looks fine to me.
>>
>> Is it possible to ouput something with the following lines in your
>> saveeditedAction:
>>
>> <?php
>> t3lib_div::debug(t3lib_div::_GPmerged('tx_psoaaccredit_web_psoaaccred
>> i
>> tmodule'));
>>
>> exit;
>>
>> ?>
>>
>> Do you get something?
>>
>>
>>
>>
>> Am 15.02.2012 09:37, schrieb Johannes C. Schulz - EnzephaloN
>> IT-Solutions:
>>> Hello Sebsatian
>>> Yes, I know what you ment with "hidden". In the DB the column 
>>> "hidden" is 0 at every accreditation-entry.
>>>
>>> I tried this at the beginning of my action:
>>> $accr = $this->accreditationRepository->findByUid($accreditation);
>>> and
>>> $accr =
>>> $this->accreditationRepository->findByUid($accreditation->getUid());
>>> None of them returned anything, so I think the $accreditation is 
>>> empty. But wonder, why extbase don't alert the empty object if it 
>>> starts with the action.
>>>
>>> The Template is very large, so I deleted some rows:
>>> {namespace psoa=Tx_PsoaAccredit_ViewHelpers}<f:be.container
>>> pageTitle="Akkreditierung" loadExtJs="true"
>>> loadExtJsTheme="true"
>>>
>
addCssFile="{f:uri.resource(path:'public/css/tx_psoaaccredit_backend.css')}"
>
>>> enableClickMenu="true">
>>> <div style="padding:10px;">
>>> <h1><f:translate key="tx_psoaaccredit_domain_model_accreditation"
>>> /></h1>
>>> <f:form method="post" action="saveedited" name="accreditation"
>>> object="{accreditation}">
>>> <table width="100%">
>>> <tr>
>>> <th colspan="2"><h3>{accreditation.company} - 
>>> ({accreditation.magtype.magtypename})</h3></th>
>>> <th><f:if condition="{0:accreditation.accepted} == 
>>> {0:accreditation.denied}">  <psoa:form.advancedSelect 
>>> name="accreditation" property="accepted"
>>> options="{0:'abgelehnt',1:'akzeptiert'}"
>>> defaultOption="{f:translate(key:'accr_cr_choose')}"/>
>>> </f:if>
>>> <f:form.submit value="Speichern&   Email" />  </th>  </tr>  <tr><td
>>> colspan="3" style="border-bottom:1px dotted #000000;"></td></tr>  
>>> <tr>
>>>
>>> <td><strong>Details</strong></td><td><strong>Kommentare&
>>> Nachrichten</strong></td><td></td>
>>> </tr>
>>> <tr><td colspan="3" style="border-bottom:1px dotted 
>>> #000000;"></td></tr>  <tr>
>>> <td>Review: {accreditation.review}<br />Preview:
>>> {accreditation.preview}<br />Auflage: {accreditation.circulation}<br 
>>> />{accreditation.www}<br /><br /><strong>Kontakt:</strong><br 
>>> />{accreditation.firstname} {accreditation.lastname}<br 
>>> />{accreditation.email} | {accreditation.phone}<br 
>>> />{accreditation.address}<br />{accreditation.zipcity}<br /><br 
>>> /><strong>Photopass:</strong>  <f:if 
>>> condition="{accreditation.photopass}"><span
>>> style="color:#FF0000;">Photopass
>>> gewünscht</span></f:if></td>
>>> <td colspan="2">
>>> <strong>Über:</strong><br
>>> />{accreditation.about}<br /><br />
>>> <strong>interner Kommentar</strong><br /><f:form.textarea cols="60"
>>> rows="3" property="comment"
>>> value="{accreditation.comment}"/><br /><br />  <strong>Message an 
>>> Magazin</strong><br /><f:form.textarea cols="60" rows="3"
>>> property="message"
>>> value="{accreditation.message}"/>
>>> </td>
>>> </tr>
>>> [... some other stuff - manipulating the child-objects...]</table> 
>>> </f:form>  </div>  </f:be.container>
>>>
>>> -----Ursprüngliche Nachricht-----
>>> Von: typo3-project-typo3v4mvc-bounces at lists.typo3.org
>>> [mailto:typo3-project-typo3v4mvc-bounces at lists.typo3.org] Im Auftrag 
>>> von Sebastian Schreiber
>>> Gesendet: Mittwoch, 15. Februar 2012 09:23
>>> An: TYPO3 v4 MVC project
>>> Betreff: Re: [TYPO3-mvc] fluid f:form in backend
>>>
>>> by hidden i mean set to hidden.
>>> In your backend list you can see hidden elements anyway.
>>>
>>> Do you receive an empty accreditation or do you get at least the uid 
>>> with
>>> accreditation->getUid()?
>>>
>>> Could you please post your form template for me, so i can have a 
>>> close look.
>>>
>>> Am 15.02.2012 09:20, schrieb Johannes C. Schulz - EnzephaloN
>>> IT-Solutions:
>>>> Hello Sebastian
>>>> No it isn't. I also can see it in the list.
>>>> Best regards
>>>> Johannes
>>>>
>>>>
>>>> -----Ursprüngliche Nachricht-----
>>>> Von: typo3-project-typo3v4mvc-bounces at lists.typo3.org
>>>> [mailto:typo3-project-typo3v4mvc-bounces at lists.typo3.org] Im 
>>>> Auftrag von Sebastian Schreiber
>>>> Gesendet: Mittwoch, 15. Februar 2012 09:18
>>>> An: TYPO3 v4 MVC project
>>>> Betreff: Re: [TYPO3-mvc] fluid f:form in backend
>>>>
>>>> Hi Johannes,
>>>> is your accreditation maybe hidden?
>>>>
>>>>
>>>>
>>>> Am 15.02.2012 09:11, schrieb Johannes C. Schulz - EnzephaloN
>>>> IT-Solutions:
>>>>> I recieve an empty accreditation-object. So nothing more happens, 
>>>>> just the redirect to the list-action.
>>>>> Here the complete action:
>>>>> /**
>>>>>       * saves an edited accreditation and sends email
>>>>>       *
>>>>>       * @param Tx_PsoaAccredit_Domain_Model_Accreditation
>>>>> $accreditation
>>>>>       */
>>>>>      public function
>>>>> saveeditedAction(Tx_PsoaAccredit_Domain_Model_Accreditation
>>>> $accreditation){
>>>>>          if($accredtitation->getAccepted() == 0){
>>>>>              $accreditation->setDenied(1);
>>>>>          }else{
>>>>>
>>>>> $this->accreditationRepository->update($accreditation);
>>>>>              $persons = $this->request->getArgument('person');
>>>>>              foreach ($persons as $aid =>     $person) {
>>>>>                  $person['aid'] = $aid;
>>>>>                  $personObject =
>>>>> $this->personRepository->findByAid($aid);
>>>>>                  if($personObject->getDenied() != 1)
>>>> $personObject->setAccepted(1);
>>>>> $personObject->setExchangeticket($person['exchangeticket']);
>>>>>
>>>>> $personObject->setPassport($person['passport']);
>>>>>                  if($person['delete']!=NULL) 
>>>>> $accreditation->remove($personObject);
>>>>>              }
>>>>>          }
>>>>>          $this->flashMessageContainer->add('Your Accreditation was 
>>>>> updated.');
>>>>>          //#### SEND EMAIL ####
>>>>>          $this->notify($accreditation, 'processed');
>>>>>          $this->view->assign('data', $accreditation);
>>>>>          redirect('index');
>>>>>      }
>>>>>
>>>>> Best regards
>>>>> Johannes
>>>>>
>>>>>
>>>>> -----Ursprüngliche Nachricht-----
>>>>> Von: typo3-project-typo3v4mvc-bounces at lists.typo3.org
>>>>> [mailto:typo3-project-typo3v4mvc-bounces at lists.typo3.org] Im 
>>>>> Auftrag von Sebastian Schreiber
>>>>> Gesendet: Mittwoch, 15. Februar 2012 09:09
>>>>> An: TYPO3 v4 MVC project
>>>>> Betreff: Re: [TYPO3-mvc] fluid f:form in backend
>>>>>
>>>>> Hi Johannes,
>>>>> So what do you receive in your action, if you click on submit of 
>>>>> the
>>> form?
>>>>> Am 15.02.2012 09:07, schrieb Johannes C. Schulz - EnzephaloN
>>> IT-Solutions:
>>>>>> Hello
>>>>>> Yes, the hidden input is there and correct:
>>>>>> <input type="hidden"
>>>>>>
> name="tx_psoaaccredit_web_psoaaccreditmodule[accreditation][__identity]"
>>>>>> value="72"/>
>>>>>> The annotation of the backend-controller-action:
>>>>>> /**
>>>>>>       * saves an edited accreditation and sends email
>>>>>>       *
>>>>>>       * @param Tx_PsoaAccredit_Domain_Model_Accreditation
>>>>>> $accreditation
>>>>>>       */
>>>>>> public function
>>>>>> saveeditedAction(Tx_PsoaAccredit_Domain_Model_Accreditation
>>>>>> $accreditation){
>>>>>>
>>>>>> Best regards
>>>>>> Johannes
>>>>>>
>>>>>>
>>>>>> -----Ursprüngliche Nachricht-----
>>>>>> Von: typo3-project-typo3v4mvc-bounces at lists.typo3.org
>>>>>> [mailto:typo3-project-typo3v4mvc-bounces at lists.typo3.org] Im 
>>>>>> Auftrag von Sebastian Schreiber
>>>>>> Gesendet: Mittwoch, 15. Februar 2012 08:58
>>>>>> An: TYPO3 v4 MVC project
>>>>>> Betreff: Re: [TYPO3-mvc] fluid f:form in backend
>>>>>>
>>>>>> Am 15.02.2012 08:12, schrieb Johannes C. Schulz - EnzephaloN
>>>> IT-Solutions:
>>>>>>> tx_psoaaccredit_web_psoaaccreditmod
>>>>>>> ule
>>>>>> Have a look in the source code, you should find something like:
>>>>>> <input type="hidden"
>>>>>>
> name="tx_psoaaccredit_web_psoaaccreditmodule[accreditation][__identity]"
>>>>>> value="###UID_OF_ACCREDITATION###" />
>>>>>>
>>>>>> Did you add the annotation to your Controller-Action?
>>>>>>
>>>>>>
>>>>>>
>>>>> --
>>>>> Sebastian Schreiber
>>>>> (Medieninformatiker B.Sc.)
>>>>> (TYPO3 Certified Integrator)
>>>>>
>>>>> Schanzenstraße 27, Schlosserei 4
>>>>> D-51063 Köln
>>>>>
>>>>> T  0221 677 88 541
>>>>> M  0176 431 05 790
>>>>>
>>>>> Skype schreibersebastian.de
>>>>>
>>>>> me at schreibersebastian.de
>>>>> www.schreibersebastian.de
>>>>>
>>>>> Steuernummer: 217 / 5269 / 4675
>>>>>
>>>>> _______________________________________________
>>>>> TYPO3-project-typo3v4mvc mailing list 
>>>>> TYPO3-project-typo3v4mvc at lists.typo3.org
>>>>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo
>>>>> 3
>>>>> v4
>>>>> m
>>>>> vc
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> TYPO3-project-typo3v4mvc mailing list 
>>>>> TYPO3-project-typo3v4mvc at lists.typo3.org
>>>>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo
>>>>> 3
>>>>> v4
>>>>> m
>>>>> vc
>>>> --
>>>> Sebastian Schreiber
>>>> (Medieninformatiker B.Sc.)
>>>> (TYPO3 Certified Integrator)
>>>>
>>>> Schanzenstraße 27, Schlosserei 4
>>>> D-51063 Köln
>>>>
>>>> T  0221 677 88 541
>>>> M  0176 431 05 790
>>>>
>>>> Skype schreibersebastian.de
>>>>
>>>> me at schreibersebastian.de
>>>> www.schreibersebastian.de
>>>>
>>>> Steuernummer: 217 / 5269 / 4675
>>>>
>>>> _______________________________________________
>>>> TYPO3-project-typo3v4mvc mailing list 
>>>> TYPO3-project-typo3v4mvc at lists.typo3.org
>>>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3
>>>> v
>>>> 4m
>>>> vc
>>>>
>>>>
>>>> _______________________________________________
>>>> TYPO3-project-typo3v4mvc mailing list 
>>>> TYPO3-project-typo3v4mvc at lists.typo3.org
>>>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3
>>>> v
>>>> 4m
>>>> vc
>>> --
>>> Sebastian Schreiber
>>> (Medieninformatiker B.Sc.)
>>> (TYPO3 Certified Integrator)
>>>
>>> Schanzenstraße 27, Schlosserei 4
>>> D-51063 Köln
>>>
>>> T  0221 677 88 541
>>> M  0176 431 05 790
>>>
>>> Skype schreibersebastian.de
>>>
>>> me at schreibersebastian.de
>>> www.schreibersebastian.de
>>>
>>> Steuernummer: 217 / 5269 / 4675
>>>
>>> _______________________________________________
>>> TYPO3-project-typo3v4mvc mailing list 
>>> TYPO3-project-typo3v4mvc at lists.typo3.org
>>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v
>>> 4
>>> mvc
>>>
>>>
>>> _______________________________________________
>>> TYPO3-project-typo3v4mvc mailing list 
>>> TYPO3-project-typo3v4mvc at lists.typo3.org
>>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v
>>> 4
>>> mvc
>>
>
> --
> Sebastian Schreiber
> (Medieninformatiker B.Sc.)
> (TYPO3 Certified Integrator)
>
> Schanzenstraße 27, Schlosserei 4
> D-51063 Köln
>
> T  0221 677 88 541
> M  0176 431 05 790
>
> Skype schreibersebastian.de
>
> me at schreibersebastian.de
> www.schreibersebastian.de
>
> Steuernummer: 217 / 5269 / 4675
>
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4m
> vc
>
>
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4m
> vc


--
Sebastian Schreiber
(Medieninformatiker B.Sc.)
(TYPO3 Certified Integrator)

Schanzenstraße 27, Schlosserei 4
D-51063 Köln

T  0221 677 88 541
M  0176 431 05 790

Skype schreibersebastian.de

me at schreibersebastian.de
www.schreibersebastian.de

Steuernummer: 217 / 5269 / 4675

_______________________________________________
TYPO3-project-typo3v4mvc mailing list
TYPO3-project-typo3v4mvc at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc




More information about the TYPO3-project-typo3v4mvc mailing list