[TYPO3-mvc] Repository ->update with TYPO3 4.7.6 / 4.7.7
Valentin Zickner
typo3 at joan.coderworks.de
Fri Nov 30 11:28:36 CET 2012
Hi Adrien,
I solved the problem. This problem occures, when you do not use
dependency injection (in your own extension).
In this old extension, I used the old way:
$this->repo = t3lib_div::makeInstance('Tx_...Repository');
In this case, the repository can not use dependency injection and this
error occures. So it is neccessary to use dependency injection for
repositories in TYPO3 4.7.6 and later.
Regards,
Valentin
On 30.11.2012 06:06, Adrien Crivelli wrote:
> Hello,
>
> I unfortunately don't have any solution to suggest, but another user had
> the same issue (with Newsletter extension):
> http://forge.typo3.org/issues/43212
>
> There is a high likelihood that both issues have same origin...
>
> Please let us know if you find out anything else
>
> Cheers,
>
> Adrien
>
>
> On 29 November 2012 19:40, Valentin Zickner<typo3 at joan.coderworks.de>wrote:
>
>> Hi all,
>>
>> I upgraded my TYPO3 site from TYPO3 4.7.5 to 4.7.6 (for 4.7.7 the same).
>> After that, my ->update($object); on a repository failed.
>>
>> In the server logfile the following message appears:
>> PHP Fatal error: Call to a member function replaceObject() on a
>> non-object in /var/www/typo3_src-4.7.6/**typo3/sysext/extbase/Classes/**Persistence/Repository.php
>> on line 222
>> The "non-object" is $this->backend (and after that $this->session).
>>
>> Looking in this file, I recognized, that the injection from the backend
>> and session changed from:
>> $backend = $this->persistenceManager->**getBackend();
>> $session = $this->persistenceManager->**getSession();
>> to a global injection at the top of the file.
>>
>> Why this do not work for me?
>>
>> Regards,
>>
>> Valentin
>> ______________________________**_________________
>> TYPO3-project-typo3v4mvc mailing list
>> TYPO3-project-typo3v4mvc@**lists.typo3.org<TYPO3-project-typo3v4mvc at lists.typo3.org>
>> http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-**
>> project-typo3v4mvc<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