Hi,
I've found an issue with the media_wysiwyg_entity_delete() hook implementation, it seems like it tries to delete any file usage references if any entity is being deleted. But in case of a non-fieldable entity the entity ID can be non-numeric which causes the following error if the site is installed with postgres:
PDOException: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: "c" LINE 2: ... 'media') AND (type = 'codesnippets_config') AND (id = 'c') ^: DELETE FROM {file_usage} WHERE (module = :db_condition_placeholder_0) AND (type = :db_condition_placeholder_1) AND (id = :db_condition_placeholder_2) ; Array ( [:db_condition_placeholder_0] => media [:db_condition_placeholder_1] => codesnippets_config [:db_condition_placeholder_2] => c ) in media_wysiwyg_entity_delete() (line 151 of sites/all/modules/contrib/media/modules/media_wysiwyg/includes/media_wysiwyg.file_usage.inc).
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | media_wysiwyg-fix-file-usage-delete-2944638-1.patch | 1.17 KB | yce |
Comments
Comment #2
yce commentedI've created a patch for it.
Comment #3
joseph.olstadpatch looks good so far, would be nice to have another review.
Good work thanks
Comment #6
joseph.olstadThis is released into 7.x-4.0-alpha2 bleeding edge
commit is included in 7.x-3.x dev
needs review for 7.x-2.x
Thanks.
Comment #7
joseph.olstad2944638
Comment #8
joseph.olstadmy mouse is doing weird things
Comment #9
chris matthews commentedRecent versions of media have resolved most of peoples concerns and is compatible with entity translation, multilingual and various advanced configurations. Due to the high volume of inactive and most often irrelevant issues we are Closing this as (outdated). If for whatever reason this issue is important to you AND you still have issues after checking the media recipe documentation, then let us know and we will review your concerns.
Otherwise, see the recipe documentation for how to configure media and for troubleshooting tips OR refer to the media_dev distribution if you want to see a working media setup.
As mentioned, feel free to make some noise in this issue if you still feel it is important to you or someone else.
Thanks,
Media team