Hi,
I have this message appearing on some media pages:
Use of undefined constant FILE_TYPE_NONE - assumed 'FILE_TYPE_NONE' in media_type_invalid_files_count()
I notice that since file_entity has moved outside the media module, these lines has been deleted from file_entity.file_api.inc:

/**
 * The {file_managed}.type value when the file type has not yet been determined.
 */
define('FILE_TYPE_NONE', 'undefined');

Just added these to this file_entity module and no error message anymore.
Is there a reason about this deletion?

Comments

sdk’s picture

Where did you add the code snippet in the file? I seem not to be able to get it to work...

camdarley’s picture

I add it to file_entity.file_api.inc in the file entity module. At the beginning of the code.

patty.fresonke’s picture

I'm getting this error too except in media_page_edit
Use of undefined constant FILE_TYPE_NONE - assumed 'FILE_TYPE_NONE' in media_page_edit()

So could this maybe be made into a patch to get added back in? Or was there a found reason for removing it in the first place?

dave reid’s picture

Status: Active » Postponed (maintainer needs more info)

There are absolutely no references to FILE_TYPE_NONE at all in the current versions of Media or File entity 7.x-2.x. So I'm not sure how this could be happening. Do we have the correct version assigned to this issue?

patty.fresonke’s picture

I'm using Media 7.x-1.2 and File entity 7.x-2.0-unstable6 and getting the error.

dave reid’s picture

You cannot mix branches of Media and File entity. If you are using Media 1.x, then you need to use the version of File entity that is included with the module, and not this separate project. If you are using Media 2.x, then you need to use is separate File entity project 2.x version.

Repeat: you cannot mix versions.

dave reid’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)
patty.fresonke’s picture

Ooops sorry, I was in the process of updating everything to 2.x and must have seen the error before finishing, my bad :)

dunechild’s picture

worked like a charm for me.