0

When I save a new object the pid field in my db stays at 0, even when I use

$newCoupon->setPid(  $this->settings["COUPONSPID"]);

before the call to

$this->couponRepository->add($newCoupon);

I had previously set my repo to not respect storagepage and set my in my constants

plugin.tx_bpscoupons {
    ... 
    persistence {
        # cat=plugin.tx_bpscoupons//a; type=string; label=Default storage PID
        storagePid =     

    }
    ...
}

and that worked as expected but now I want to try using pids again for some things because there is a lib.quickstats thing I want to use which apparently can't find records with pid=0.

I am using TYPO3 v4.5.

Update:

I updated the repos to remove the custom body of initializeObject(), then in my TypoScript setup I set:

storagePid =     {$COUPONSPID}

And in the TypoScript constants I set

COUPONSPID = 44

Now the objects are created on the page with the ID 44.

4

0 回答 0