CoreCommunity ExtensionsIncubatorDistributionsTYPO3 4.5 ProjectsTYPO3 4.6 ProjectsTYPO3 4.7 ProjectsTYPO3 6.0 ProjectsTYPO3 6.1 ProjectsTYPO3 6.2 Projects (+)

Bug #6164

Empty data of cObj in Tx_Formhandler_Finisher_DB

Added by A.BE.ZET Entwickler over 3 years ago. Updated over 2 years ago.

Status:Resolved Start date:2010-01-22
Priority:Should have Due date:
Assignee:- % Done:

100%

Category:Finisher
Target version:-
Votes: 0

Description

Hello,
by using formhandler and Tx_Formhandler_Finisher_DB I wanted to map the uid of the plugins startingpoint to the pid of my records generated by formhandler. Unfortunately the current cObj I could refer to via TypoScript was page but not the content element.

In your class Tx_Formhandler_Finisher_DB you are writing:

        //make cObj instance
        $this->cObj = t3lib_div::makeInstance('tslib_cObj');
        $this->cObj->setCurrentVal($GLOBALS['TSFE']->id);

Why you don't you use:

        //make cObj instance
        $this->cObj = t3lib_div::makeInstance('tslib_cObj');
        $this->cObj->start(Tx_Formhandler_Globals::$cObj->data, 'tt_content');

Maybe you set it so on purpose and I don't get it. I just want to tell you (I currently solved it by using a own Finisher extending Tx_Formhandler_Finisher_DB and overwriting $this->cObj)

History

Updated by Reinhard Führicht over 3 years ago

I guess it would be enough to just remove the 2 lines in Finisher_DB.
The Finisher gets the cObject from Globals::$cObj in AbstractComponent.
This cObject is the one which gets passed to the pi1-class and therefore should contain the tt_content record.

Updated by Reinhard Führicht over 3 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

I removed these 2 lines in Finisher_DB. The cObj will now be inherited from AbstractComponent like any other class does.

Updated by Franz Kugelmann over 3 years ago

Hallo Reinhard,
vielen Dank für den schnellen Fix und eure Arbeit am Formhandler, macht Freude damit zu arbeiten!

Also available in: Atom PDF