ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Unknown column 'Array' in 'field list' (Template CP page) probably MSM issue

June 02, 2011 2:20pm

Subscribe [4]
  • #1 / Jun 02, 2011 2:20pm

    sherpanaut

    58 posts

    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 Occurred

    Error 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.

  • #2 / Jun 03, 2011 5:15am

    John Henry Donovan

    12339 posts

    tricycleinteractive,

    What version and build of both MSM and EE are you using?
    If on an older build or version we would recommend upgrading. This in turn may iron out the issue you are experiencing.

    Do you have any add-ons installed?

  • #3 / Jun 03, 2011 6:36am

    sherpanaut

    58 posts

    Hi John,

    We’re running the latest versions of both (EE 2.1.3 and MSM Version: 2.0 Build: 20101215).

    There are a few addons installed (NavEE, Structure, User, Comment, Playa, Query, RSS).

    I reinstalled MSM just to be sure but it hasn’t affected the error.

    I have 4 sites and this only happens when I go to the template page on one particular page.

    Thanks,
    Aodh.

  • #4 / Jun 05, 2011 12:48pm

    Greg Salt

    3988 posts

    Hi tricycleinteractive,

    Are you saving templates as files in this particular site? Are you working as a Super Admin or some other member group when seeing this error?

    Cheers

    Greg

  • #5 / Jun 13, 2011 7:22am

    sherpanaut

    58 posts

    Hi Greg,

    Yeah I’m saving templates as files and I’m logged in as super admin.

  • #6 / Jun 13, 2011 3:47pm

    Brandon Jones

    5500 posts

    Hi tricycleinteractive,

    This sounds similar to this thread, which also involved Structure. Were you using an older build at any point? We can’t seem to reproduce this on the current version/build.

  • #7 / Jun 15, 2011 6:33am

    sherpanaut

    58 posts

    It sounds similar enough alright. Yeah we upgraded to EE2.1.3 from an older version. Nothing in that thread has solved it. I guess if you guys haven’t been able to replicated I’ll just have to keep tinkering with it.

  • #8 / Jun 16, 2011 8:42am

    John Henry Donovan

    12339 posts

    Aodh,

    Can you try and disable your Extensions globally please. This will keep their settings. Do not disable individually. Yo can do this using the large button in the top right on the Extensions screen or by changing the value in your config.php file if you are more comfortable doing it there

    $config['allow_extensions'] = "n";

    See if the issue persists after doing that. Also take a look over at the Structure forums. I’m not saying it is related but something may come up.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases