Ticket #329 (closed defect: fixed)

Opened 19 months ago

Last modified 12 months ago

Update of assets returns stack trace and errors

Reported by: Michiel.Schok Owned by: Robert
Priority: major Milestone: MediaMosa 2.3
Component: Core Version:
Keywords: Cc:
MoSCoW: Should Have Estimated time after impact analysis:
Related to project: none Tested: no
Accepted: no Estimated Hours: 0

Description

Don't know why it's going wrong, but we observed the following VP-Core response during the migration run on july 1st.

Me thinks the stacktrace and error message "PDOException caught; SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 1" should never return to a EGA.

</header><header>
    <item_count>0</item_count>
    <item_count_total>0</item_count_total>
    <item_offset>0</item_offset>
    <request_class>mediamosa_rest_call_asset_metadata_create</request_class>
    <request_matched_method>POST</request_matched_method>
    <request_matched_uri>/asset/$asset_id/metadata</request_matched_uri>
    <request_process_time>0.0944</request_process_time>
    <request_result>error</request_result>
    <request_result_description>PDOException caught; SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 1,
trace; #0 /var/opt/www/vpcore/htdocs/includes/database/database.inc(1984): PDOStatement->execute(Array)
#1 /var/opt/www/vpcore/htdocs/includes/database/database.inc(588): DatabaseStatementBase->execute(Array, Array)
#2 /var/opt/www/vpcore/htdocs/includes/database/mysql/query.inc(37): DatabaseConnection->query('INSERT  INTO {m...', Array, Array)
#3 /var/opt/www/vpcore/htdocs/sites/all/modules/mediamosa/core/asset/metadata/mediamosa_asset_metadata.inc(218): InsertQuery_mysql->execute()
#4 /var/opt/www/vpcore/htdocs/sites/all/modules/mediamosa/modules/asset/metadata/mediamosa_asset_metadata.rest.inc(257): mediamosa_asset_metadata::metadata_create('1FEJ4GKmItrEP0S...', Array, Array, 'update')
#5 /var/opt/www/vpcore/htdocs/sites/all/modules/mediamosa/rest/mediamosa_rest_call.inc(290): mediamosa_rest_call_asset_metadata_create->do_call()
#6 /var/opt/www/vpcore/htdocs/sites/all/modules/mediamosa/rest/mediamosa_rest.inc(314): mediamosa_rest_call->process_call()
#7 /var/opt/www/vpcore/htdocs/sites/all/modules/mediamosa/response/mediamosa_response.inc(130): mediamosa_rest->process_call(Array)
#8 /var/opt/www/vpcore/htdocs/sites/all/modules/mediamosa/mediamosa.module(122): mediamosa_response->process_rest()
#9 [internal function]: mediamosa_init()
#10 /var/opt/www/vpcore/htdocs/includes/module.inc(709): call_user_func_array('mediamosa_init', Array)
#11 /var/opt/www/vpcore/htdocs/includes/common.inc(4331): module_invoke_all('init')
#12 /var/opt/www/vpcore/htdocs/includes/bootstrap.inc(1812): _drupal_bootstrap_full()
#13 /var/opt/www/vpcore/htdocs/index.php(21): drupal_bootstrap(7)
#14 {main},
Query string; INSERT  INTO {mediamosa_asset_metadata} (asset_id, prop_id, created, changed, val_char, val_char_lft, val_char_rght) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4_0_Name, :db_insert_placeholder_4_0_Count, :db_insert_placeholder_4_1_Name, :db_insert_placeholder_4_1_Count, :db_insert_placeholder_5, :db_insert_placeholder_6),
Args; Array
(
    [:db_insert_placeholder_0] => 1FEJ4GKmItrEP0SS68jPuWvw
    [:db_insert_placeholder_1] => 105
    [:db_insert_placeholder_2] => 2010-06-30 11:44:18
    [:db_insert_placeholder_3] => 2010-06-30 11:44:18
    [:db_insert_placeholder_5] => Array
    [:db_insert_placeholder_6] => yarrA
    [:db_insert_placeholder_4_0_Name] => talent
    [:db_insert_placeholder_4_0_Count] => 1
    [:db_insert_placeholder_4_1_Name] => xpose
    [:db_insert_placeholder_4_1_Count] => 1
)
</request_result_description>
    <request_result_id>500</request_result_id>
    <request_uri>[POST] asset/1FEJ4GKmItrEP0SS68jPuWvw/metadata?creator=Kennisnet+en+SURFnet&date=1999-11-30+00:00:00&description=Promotiefilm+voor+de+Expose+Your+Talent+videowedstrijdhttp://www.exposeyourtalent.nl&tags[Tag][0][Name]=talent&tags[Tag][0][Count]=1&tags[Tag][1][Name]=xpose&tags[Tag][1][Count]=1&type=video&title=Expose+Your+Talent+promo&active=&user_id=SURFgroepen.svpuser&action=update&app_id=5</request_uri>
    <version>2.1.4.638:f67c790a0a28</version>
    <errors>
      <error>Notice: Array to string conversion, mediamosa_asset_metadata::metadata_create()() in file /var/opt/www/vpcore/htdocs/sites/all/modules/mediamosa/core/asset/metadata/mediamosa_asset_metadata.inc on line 183.</error>
      <error>Notice: Array to string conversion, mediamosa_unicode::substr()() in file /var/opt/www/vpcore/htdocs/sites/all/modules/mediamosa/lib/mediamosa_unicode.inc on line 71.</error>
      <error>Notice: Array to string conversion, mediamosa_unicode::substr()() in file /var/opt/www/vpcore/htdocs/sites/all/modules/mediamosa/lib/mediamosa_unicode.inc on line 71.</error>
    </errors>
  </header><header>
    <item_count>0</item_count>

Change History

Changed 19 months ago by robert

Hi Michiel,

can you tell me what you mean with migration? Is this REST call in own code? I see the app_id=5 in your url and that surprises me.

That you see this error in your EGA output is a matter of debate. This message is in the header because DB queries that fail are part of the PDO exception and those are ranked as high as possible and always shown so we can fix them asap. Just because of your paste of the header I already know what happened, so will speedup my bug fix.

I want to know if is this call is something special or part of your website application? So in other words, is this something you also did on 1.7.x or just now in 2.x?

Changed 19 months ago by Michiel.Schok

Robert,

It was during the preparation of SURFmedia-migration where about 20% of our users changed username. In that process we performed for all assets that had an owner of 'SURFgroepen.*':

[post] /asset?owner_id={new_owner}&user_id={old_owner}&is_app_admin=true

and a call
[post] /asset/metadata with all the (unchanged) metadata fields of the assets.

That last call was not necessary (no changed metadata), but since we used the main SURFmedia code such a call is posted on every asset-change. (changing ownership is very rare).

We got the error-message on JUne 30, so Core was running 2.1.

This sequence of calls can be triggered anytime a user wants to transfer ownership of a video, or update metadata on a video. I don't think it happened very often when updating the assets (20k+), so maybe it was 'the kind of metadata' that was in the assets that's causing the trouble.

Changed 14 months ago by Frans

  • owner set to Robert
  • status changed from new to assigned

Changed 12 months ago by Frans

  • status changed from assigned to closed
  • resolution set to fixed
  • milestone changed from MediaMosa X.X to MediaMosa 2.3

Fixed already in 2.2

Note: See TracTickets for help on using tickets.