[TYPO3-english] sp_bettercontact in Typo 4.6.x - Form labels not rendered, shows "Array"

Den Denyer denyerec at gmail.com
Tue Dec 6 00:38:07 CET 2011


Hi all,
Attempting to use sp_bettercontact 2.4.4 with Typo3 4.6.1 on PHP 5.3,  
along with the latest version of templateVoila.

When rendering the frontend form instead of my form labels (Default  
template) I see:

	Array Array

Instead of something such as:

	First Name

I looked in the admin console and saw the following error:

Error handler (FE): PHP Warning: md5() expects parameter 1 to be string,  
array given in  
/typo3conf/ext/sp_bettercontact/pi1/class.tx_spbettercontact_pi1_template.php  
line 310

I took a look, and mitigated this error by adding the following tmpval (I  
was far too tired at the time to look into WHY the code didn't work in its  
original form, so excuse the brutal hack)

Original:
$aMultiNames['[' . $aField['labelName'] . ']'] =  
md5($this->aMarkers[$aField['labelName']]);

Hack:
$tmpval = isset($this->aMarkers[$aField['labelName']][0][target]) ?  
$this->aMarkers[$aField['labelName']][0][target] : '';
$aMultiNames['[' . $aField['labelName'] . ']'] = md5($tmpval);


This removed the error message, but still the field names show as "Array"  
rather than "Name" etc.
Clearly somewhere the output routine is expecting strings and is getting  
arrays. The only question is why, followed by "How do I resolve it" ?

Searching on google suggest that so far I am the only person with this  
issue, it's a fairly popular extension so I'm wondering if it really is a  
problem with the extension, or a problem with my particular installation.

I must point out, that on a different site I have used version 2.3.5 in  
its completely default configuration without errors. 2.3.5 does not,  
however, work with Typo 4.6.1

Any and all help appreciated,
Denyer


More information about the TYPO3-english mailing list