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
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:
Perfectly valid according to the documentation for MTEntries. I removed the top level category like so ...
... 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