[TYPO3-irre] IRRE + dbal without pid :)
Oliver Hader
oh at inpublica.de
Thu May 3 13:35:40 CEST 2007
Hi Nikolas,
Nikolas Hagelstein wrote:
> Oliver Hader wrote:
>> TCEmain tries to check
>> access to the page by pid - currently I don't know how this will work
>> without a proper pid.
> Yes right that causses the "access denied atm" because in fact the
> records show up at
> Pid 76 since they are fetched by something like:
> "select * from table where pid=76"
> Which gets rewritten by DBAL To "select * from table where 76=76" but
> obviously the record itself doesnt own a pid field itself. :)
>
> Therefore i thought of hooking in at :
> - processDatamap_preProcessFieldArray and fake pid
> - processDatamap_PostProcessFieldArray unset the fake pid (otherwise a
> DB error would occure)
There is a hook in TCEforms "getMainFields_preProcess". You could use
this one to fake the pid of the parent/child record to the fixed value
"76". Doing this should also prevent from screwing up the variable
"inlineFirstPid" with nonsense.
When the data should be save using TCEmain you have to catch the
"virtual things" to prevent from writing to the field pid which doesn't
exist at all.
I didn't test it, but I think it could work. To get this working without
the disposal of hooks IMO the DBAL should add the pid virtually to
records if it's defined in the mapping.
olly
--
Oliver Hader
http://inpublica.de/
More information about the TYPO3-project-irre
mailing list