Hi all,
Whenever I go to the Template page on my CP while I’m on one of my sites in MSM I get the following:
A PHP Error was encountered
Severity: Notice
Message: Array to string conversion
Filename: mysql/mysql_driver.php
Line Number: 535
A Database Error OccurredError Number: 1054
Unknown column ‘Array’ in ‘field list’
INSERT INTO `exp_templates` (`group_id`, `template_name`, `template_data`, `edit_date`, `save_template_file`, `last_author_id`, `site_id`) VALUES (Array, ‘index’, ‘’, 1307034679, ‘y’, ‘1’, ‘5’)
Filename: models/template_model.php
Line Number: 81
I tracked down the line of code in models/template_model.php and its trying to create a template every time the page is loaded but the group_id is an empty array rather than an integer.
I put in a hack to check if that happens and to default to 1 (the superadmin group) to get around the error. However doing that just causes EE to constantly create “index” templates when the Template CP page is loaded.
Has anyone any ideas? Thanks.