[TYPO3-mvc] Tx_Extbase_MVC_Exception_InfiniteLoop
Mark Kuiphuis
spam at markyourweb.com
Tue Jan 3 02:15:22 CET 2012
On 2/01/12 10:51 PM, Claus Due wrote:
> Hi Mark,
>
> Is the rewritten PropertyMapper enabled? It currently has an issue where it does not recognize @dontvalidate and this could make it end up in an infinite loop betweeen your newAction and createAction.
>
>>>> public function __construct($program = 0, $price = 0.00, $name = '', $address = '',
>>>> $postcode = '', $city = '', $email = '', $paymentType = '', $referral = '',
>>>> $transactionId = '') {
>>>>
>>>> $this->program = $this->setProgram($program);
>>>> $this->price = $this->setPrice($price);
>>>> $this->name = $this->setName($name);
>>>> $this->address = $this->setAddress($address);
>>>> $this->postcode = $this->setPostcode($postcode);
>>>> $this->city = $this->setCity($city);
>>>> $this->email = $this->setEmail($email);
>>>> //$this->newsletter = $this->setNewsletter($newsletter);
>>>> $this->paymentType = $this->setPaymentType($paymentType);
>>>> $this->referral = $this->setReferral($referral);
>>>> $this->transactionId = $this->setTransactionId($transactionId);
>>>> }
>
>
> About this piece of code - I think you need to remove the "$this->member = " part from all lines above - your setter methods do no return anything so you would actually end up with NULL/void as the value of all the properties you set. If you POST all these values it doesn't matter but if you create an instance manually with arguments to __construct() you would get incorrect values.
>
> Internally you do not need your setters and getters unless they perform special actions. In the code above you could use just $this->program = $program;
>
> Cheers,
> Claus
Hi Claus,
Thanks for your reply...
(I consider myself a noob in all this stuff, but still learning...)
I added the following to my typoscript:
plugin.tx_travelprograms {
features {
rewrittenPropertyMapper = 1
}
}
and then it won't show the order form anymore at all, where previously it did appear.
I was using TYPO3 version 4.5.10 (with the default Extbase version shipped with this
TYPO3 version) and the piece of typoscript didn't have any influence.
Then I upgraded TYPO3 to the latest version of the 4.6 branch (4.6.3), but now before
I go to the order form, I get the following exception:
#1297759968: Exception while property mapping at property path "":Object with
identity "3" not found.
Is there something else I need to do to make this work?
Cheers, Mark
More information about the TYPO3-project-typo3v4mvc
mailing list