[TYPO3-mvc] 6.2: How to debug recursive validation

g4-lisz at tonarchiv.ch g4-lisz at tonarchiv.ch
Thu May 15 14:02:04 CEST 2014


Hi Matthew,

thanks for your response.

I turned the property manager off because this extension was working
with TYPO3 4.6 for years...

I'm not sure if it's an issue with the domain or action.

When I access the plugin using a realURL address it works:
http://mydomain.com/startseite/spitalsuche/ergebnisse-ihrer-suche/kontakt/spital/151/
This is mapped to
index.php?id=27&tx_hplusinfo_fe_spitalinfo[action]=spitalinfo&tx_hplusinfo_fe_spitalinfo[klinik]=151,
which also works when typed into the browser directly.

But using this piece of TS on the same page (same controller, same
domain object) gives an error ("An error occurred while trying to call
Tx_Hplusinfo_Controller_KlinikController->headerNameAction()"):

  5 = LOAD_REGISTER
  5.clinicName {
    cObject = USER
    cObject {
      userFunc = tx_extbase_core_bootstrap->run
      pluginName = Fe_spitalinfo
      extensionName = Hplusinfo
      pluginKey = hplusinfo
      controller = Klinik
      action = headerName
      switchableControllerActions  {
        Klinik {
          1 = headerName
        }
      }
    }
...
  // the view results raw text, so it has to be wrapped
  10 = TEXT
  10.data = register:clinicName
  10.trim = 1
  10.wrap = <h1>|</h1>

The action just looks like this:

    /**
     * Displays a single Klinik
     *
     * @param Tx_Hplusinfo_Domain_Model_Klinik $klinik the Klinik to display
     * @return string The rendered view
     */
    public function headerNameAction(Tx_Hplusinfo_Domain_Model_Klinik
$klinik) {
        $this->view->assign('klinik', $klinik);
    }

Same issue when calling other pages containing an extbase plugin with
this model when using url.action viewhelper.
I.e. GET works, but POST doesn't?

The domain model class has 3150 lines - maybe i can send it to you directly?

Cheers,
Till

On 05/15/2014 08:40 AM, Matthew Colton wrote:
> Hi Till,
> turn the new property manager back on, it doesn't make any sense to turn
> it off.
>
> Which kind of validation is throwing the errors? Action or domain model?
> Which version of Typo3 are you using now? 6.2 has recursive validation
> of objects, 6.1 doesn't. Post the action and/or the model that throws
> the error.
>
> Cheers
> Matthew
>
> Am 14.05.2014 23:38, schrieb g4-lisz at tonarchiv.ch:
>> No one...?
>>
>> Please tell me where to start solving this issue...
>>
>> BR
>> Till
>> Am 30.04.14 17:58, schrieb g4-lisz at tonarchiv.ch:
>>> Hi there,
>>>
>>> my extension ported from 4.6 gives me a lot of troubles when calling
>>> link.action from fluid.
>>>
>>> I wonder if the new validation handles bidirect relations correctly. My
>>> "root" object has a lot of them.
>>>
>>> With the new property mapper, I just get a "An error occurred while
>>> trying to call ...action" error.
>>>
>>> When I switch off the new property manager, the PHP script consumes too
>>> much memory (over 500MB). This happens in
>>> ../Validation/PropertyError.php line 75
>>> on addErrors(). So I guess there could be some infinite loop...
>>>
>>> I piped the errors to a file
>>>          public function addErrors($errors) {
>>>                  $this->logger->error(print_r($errors,true));
>>>                  //$this->errors = array_merge($this->errors, $errors);
>>>          }
>>>
>>> The file grows to 6GB before i get a PHP timeout (240sec). Its content
>>> looks like this:
>>>
>>> Thu, 24 Apr 2014 01:00:50 +0200 [ERROR] request="5358462053fd8"
>>> component="TYPO3.CMS.Extbase.Validation.PropertyError": A
>>> rray
>>> (
>>>      [0] => TYPO3\CMS\Extbase\Validation\Error Object
>>>          (
>>>              [message:protected] => The given subject was empty.
>>>              [code:protected] => 1221560718
>>>              [arguments:protected] => Array
>>>                  (
>>>                  )
>>>
>>>              [title:protected] =>
>>>          )
>>>
>>> )
>>>   Thu, 24 Apr 2014 01:00:50 +0200 [ERROR] request="5358462053fd8"
>>> component="TYPO3.CMS.Extbase.Validation.PropertyError": A
>>> rray
>>> (
>>>      [0] => TYPO3\CMS\Extbase\Validation\Error Object
>>>          (
>>>              [message:protected] => Value is no object.
>>>              [code:protected] => 1241099148
>>>              [arguments:protected] => Array
>>>                  (
>>>                  )
>>>
>>>              [title:protected] =>
>>>          )
>>>
>>> )
>>>
>>> million times... and from time to time something like this:
>>>
>>> Thu, 24 Apr 2014 01:00:50 +0200 [ERROR] request="5358462053fd8"
>>> component="TYPO3.CMS.Extbase.Validation.PropertyError": A
>>> rray
>>> (
>>>      [name] => TYPO3\CMS\Extbase\Validation\PropertyError Object
>>>          (
>>>              [message:protected] => Validation errors for property
>>> "name"
>>>              [code:protected] => 1242859509
>>>              [propertyName:protected] => name
>>>              [errors:protected] => Array
>>>                  (
>>>                  )
>>>
>>>              [logger:protected] => TYPO3\CMS\Core\Log\Logger Object
>>>                  (
>>> ....
>>> )
>>>
>>> Please someone tell me how I can solve this issue (with or without new
>>> property manager)...
>>>
>>> BR
>>> Till
>>> _______________________________________________
>>> TYPO3-project-typo3v4mvc mailing list
>>> TYPO3-project-typo3v4mvc at lists.typo3.org
>>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
>> _______________________________________________
>> TYPO3-project-typo3v4mvc mailing list
>> TYPO3-project-typo3v4mvc at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
>>
>
> _______________________________________________
> 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