default userpic

Publish failing: Statement has no result columns to bind (perhaps you need to successfully call execute first) at /var/www/cgi-bin/mt/extlib/Data/ObjectDriver/Driver/DBI.pm line 154

Vote 0 Votes

This error has started with no apparent cause.
No change to version of MT.
No change to database engine.
No change to anything related to OS or applications that MT rely on.

Setting debug mode of 4 shows (only the first few lines of a very long log shown) below. The only error seems to point to a hash array (odd number of elements) but have no idea what this points at ..... any help appreciated.

# Request completed in 1.427 seconds.
# QUERY: SELECT config_id FROM mt_config at lib/MT/ObjectDriver/Driver/DBI.pm line 32.
# QUERY: SELECT config_id, config_data FROM mt_config WHERE (config_id IN (?)) at lib/MT/ObjectDriver/Driver/DBI.pm line 32.
# Odd number of elements in hash assignment at lib/MT.pm line 96.
# QUERY: SELECT field_id FROM mt_field at lib/MT/ObjectDriver/Driver/DBI.pm line 32.
# QUERY: SELECT field_id, field_basename, field_blog_id, field_default, field_description, field_name, field_obj_type, field_options, field_required, field_tag, field_type FROM mt_field WHERE (field_id IN (?,?,?,?)) at lib/MT/ObjectDriver/Driver/DBI.pm line 32.
# QUERY: SELECT author_id FROM mt_author WHERE (author_auth_type = ?) AND (author_name = ?) AND (author_type = ?) at lib/MT/ObjectDriver/Driver/DBI.pm line 32.
# QUERY: SELECT author_id, author_api_password, author_auth_type, author_basename, author_can_create_blog, author_can_view_log, author_created_by, author_created_on, author_email, author_entry_prefs, author_external_id, author_hint, author_is_superuser, author_modified_by, author_modified_on, author_name, author_nickname, author_password, author_preferred_language, author_public_key, author_remote_auth_token, author_remote_auth_username, author_status, author_text_format, author_type, author_url, author_userpic_asset_id FROM mt_author WHERE (author_id IN (?)) at lib/MT/ObjectDriver/Driver/DBI.pm line 32.
# QUERY: SELECT session_id FROM mt_session WHERE (session_kind = ?) AND (session_id = ?) LIMIT 1 at lib/MT/ObjectDriver/Driver/DBI.pm line 32.

Reported on Movable Type 4.261

4 Replies

| Add a Reply
  • I'm getting the same issue in MT 5.01. I get the error anytime I try to save a Page that has assets associated with it. I was able to save Pages with assets with no problems previously, but this problem started on its own -- I made no changes to my configuration.

    Does anyone have any suggestions?

  • There are 2 possible problems:
    1. Run the following SQL. If either returns rows then there are orphaned mt_placement records you should delete
    SELECT * FROM mt_placement left outer join mt_category on placement_category_id = category_id where category_id IS NULL
    SELECT * FROM mt_placement left outer join mt_entry on placement_entry_id = entry_id where entry_id IS NULL

    2. Try to publish each of the index templates individually to identify which one fails. Once you identify the failing one, look in the template for widgets that refer to for any tags which have a "category" attribute. For each tag found which specifies a "category" attribute, ensure that the category name(s) specified in the "category" attribute" exactly matches the name of a category displayed on the Manage > Categories page in Movable Type (including case).

  • I just upgraded an installation from MT 4.23 to MT 4.32 and experienced the same error on a custom index template. I got around it but don't know why the original code didn't work the same.

    I am displaying a series of entry groups based on category/subcategory. Here's the original code:

    <MTEntries category="Board/Directors" sort_by="field:board_member_last_name" sort_order="ascend">
    

    Perfectly valid according to the documentation for MTEntries. I removed the top level category like so ...

    <pre><code>
    &lt;MTEntries category="Directors" sort_by="field:board_member_last_name" sort_order="ascend"&gt;
    </code></pre>
    

    ... and the error went away.

    Now, there is a warning about using sort_by="field:basename" as of MT 2.61 and applying the suggested work-around made no difference. I changed the category selector as a simple test and it worked.

    I'd like to hear from one of the moderators about this.

  • I see Chris' reply above just a few minutes before mine. My category names were correct so I'll check for the orphaned data base record.

    Thanks

Add a Reply

If you need to share template code, replace all the "<" signs with "&lt;" or use this utility.

Forum Groups

1773 6162

Last Topic: Excluding categories from blog by kholechek on Feb 9, 2012

86 302

Last Topic: website entries by masoud on Oct 26, 2011

1429 5077

Last Topic: What apocalypse hit this community in the middle of 2011? by 75th on Feb 10, 2012

695 2910

Last Topic: Insert Image / File Fails by Russ Miller on Feb 10, 2012

84 291

Last Topic: How to have some other characters in entry basename automatically written by Afshin Haghighatnia on Dec 22, 2011

173 737

Last Topic: About the MT version stated in HTML source by Alex E. Schneider on Feb 7, 2012

190 567

Last Topic: Analytics Reporting by michael webster on Feb 5, 2012

48 210

Last Topic: An idea and also a request by Afshin Haghighatnia on Jun 29, 2011

64 246

Last Topic: jQuery in MT 5.1 still at 1.4 - why? by perlmonkey on May 25, 2011

code.sixapart.com

137 478

Last Topic: Getting a thumbnail with xpath by Peter on Mar 13, 2011

222 720

Last Topic: Custom Field for Asset Not Appearing by android on Feb 9, 2012