file_entity_7104() fails with an exception "Invalid merge query: no conditions"

Pre-conditions: media module disabled.

CommentFileSizeAuthor
#5 2142687.patch416 bytesvalthebald

Comments

Anonymous’s picture

Title: 17 db updates from file_entity since drupal 7.24 upgrade? - unable to update db » 7210 - Merge MIME types into the {file_type} table. invalid merge query no conditions 17 db updates from file_entity since drupal 7.24 upgrade? - unable to update db
Category: Support request » Bug report
Issue summary: View changes
Priority: Normal » Critical

7210 - Merge MIME types into the {file_type} table. invalid merge query no conditions 17 db updates from file_entity since drupal 7.24 upgrade? - unable to update db

Anonymous’s picture

Title: 7210 - Merge MIME types into the {file_type} table. invalid merge query no conditions 17 db updates from file_entity since drupal 7.24 upgrade? - unable to update db » 7210 - Merge MIME types into the {file_type} table. FAILS -> invalid merge query: no conditions causing 17 db update failures from file_entity since drupal 7.24 upgrade? - unable to update db
seshi’s picture

Subscribing.!

On Running update.php on Drupal version 7.24

file_entity module
Update #7104

Failed: InvalidMergeQueryException: Invalid merge query: no conditions in MergeQuery->execute() (line 1612 of /var/www/html/includes/database/query.inc).

dave reid’s picture

Status: Active » Postponed (maintainer needs more info)

I'll need help debugging this. I'm not sure where the merge query is coming from because neither file_entity_update_7210() nor file_type_save() runs any merge queries.

@seshi Please file a new issue because file_entity_update_7104() is not the same function that is being reported here with an issue, even if it's the same message.

valthebald’s picture

Title: 7210 - Merge MIME types into the {file_type} table. FAILS -> invalid merge query: no conditions causing 17 db update failures from file_entity since drupal 7.24 upgrade? - unable to update db » 7104 - Merge MIME types into the {file_type} table. FAILS -> invalid merge query: no conditions causing 17 db update failures from file_entity since drupal 7.24 upgrade? - unable to update db
Version: 7.x-2.0-alpha3 » 7.x-2.x-dev
Issue summary: View changes
Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new416 bytes

I confirm this happens when upgrading from file_entity 1.3 to 2.0-alpha3, with media module switched off (that's important).

db_merge() (called from file_entity.install line 372) throws InvalidMergeQueryException when there is no condition set.

Attached patch solves the problem

Anonymous’s picture

I can confirm that this happens also with Drupal-7.25. Trying to install file_entity without the media module throws the same error:

Failed: InvalidMergeQueryException: Invalid merge query: no conditions in MergeQuery->execute() (line 1612 of /var/www/html/includes/database/query.inc).

froboy’s picture

Applied the patch and it works for me.

matthieu_collet’s picture

The patch works for me too, thanks !

dgastudio’s picture

Status: Needs review » Reviewed & tested by the community

same problem, same fix

jrabeemer’s picture

#5 works for me!

  • aaron committed 29b04ed on 7.x-2.x
    Issue #2142687 by valthebald: 7104 - Merge MIME types into the {...
aaron’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.