It appears as though that one of the html attributes used in one of the fields is being loaded as an array. HTML attributes are primarily obtained from the fields.ini file (e.g., atts:size = 10 , etc...), but it may be something else. One tricky thing is that if you use any commas in any of the values in the fields.ini file and don't wrap the entire value in quotes, it will treat it as an array.
For example:
- Code: Select all
[FirstName]
widget:atts:style = font-family: helvetica, arial
This will cause an error similar to what you describe above because it will load the style attribute as
array( 'font-family: helvetica', 'arial');
The correct way would be :
- Code: Select all
[FirstName]
widget:atts:style = "font-family: helvetica, arial"
Note the quotes!
If you check over your fields.ini file and this is not the problem, please post your fields.ini file and your table definition (e.g., what fields are in the table and what are their types), and I can take a look .
One bit of debugging you can do is to make a temporary modification to HTML/Common.php.
Go to line 140 and you'll see a function:
- Code: Select all
function _getAttrString($attributes)
{
$strAttr = '';
if (is_array($attributes)) {
foreach ($attributes as $key => $value) {
$strAttr .= ' ' . $key . '="' . htmlspecialchars($value) . '"';
}
}
return $strAttr;
} // end func _getAttrString
Add the line:
- Code: Select all
if ( is_array($value) ) echo Dataface_Error::printStackTrace();
just inside the foreach statement, so that the function becomes
- Code: Select all
function _getAttrString($attributes)
{
$strAttr = '';
if (is_array($attributes)) {
foreach ($attributes as $key => $value) {
if ( is_array($value) ) echo Dataface_Error::printStackTrace();
$strAttr .= ' ' . $key . '="' . htmlspecialchars($value) . '"';
}
}
return $strAttr;
} // end func _getAttrString
This will cause a stack trace to be printed out at the offending part so that we'll know which field is causing it.
Please let me know how it goes. If it is a bug I'd like to squash it!
Best regards
Steve Hannah