When contrib modules are brought via git submodules, and in the case of "entity_translation", this won't have a timestamp entry in its .info file, so the following warning will show on the status page:
Notice: Undefined index: datestamp in media_requirements() (line 142 of /app/sites/all/modules/contrib/media/media.install).

The code should check if the key is set before using it. I will attach a patch for it shortly.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fjgarlin created an issue. See original summary.

fjgarlin’s picture

Issue summary: View changes
fjgarlin’s picture

fjgarlin’s picture

Status: Active » Needs review
joseph.olstad’s picture

looks good, but I haven'T tested it yet.

GuyPaddock’s picture

Status: Needs review » Needs work

This should also handle similar logic for the file_entity module a few lines further up. Right now, even with this patch applied, I am still seeing this error:

- Notice: Undefined index: datestamp in media_requirements() (line 115 of media/media.install).
- Media 2.10 or newer requires File entity 2.0 or newer (2.4 or higher recommended). Please download the correct version and make sure you have deleted the file_entity folder inside the media module directory.

We're pulling file entity dev in via GIT.

joseph.olstad’s picture

entity_translation 1.0 has been out for a long time now, and 1.1 came out recently, it's been a long time since beta6, so I think we could just remove these entity_translation checks in the hook_requirements

submit me a new patch that removes ONLY the entity_translation checks in this hook_requirements, and I'll put it in.

otherwise, feel free to doctor up the latest patch and make the warning go away.
either way works for me.

fjgarlin’s picture

Status: Needs work » Needs review
FileSize
1.54 KB

This would be the new patch addressing #7.

For the issue also reported in #6, we cannot apply the same logic as there is no fallback value. We could regex compare on the version to see if the version is correct or allowed, but I'm not entirely sure of how the regex would look like as we want "7.x-2.0" and above but not "7.x-2.0-beta/alpha/...". I guess it'll be a fix between regex and number comparisons. As I'm not sure about how that would look like I'm just addressing #7.

fjgarlin’s picture

@GuyPaddock this is an attempt to check the (correct) version for "file_entity". It checks version and creates a made up value for the date so that it passes or fail the test under.

So it contains suggestions from #6 and #7.

@joseph.olstad #8 would only remove the "entity_translation" requirements. #9 would do that and also fix the "file_entity" warning.

joseph.olstad’s picture

Status: Needs review » Reviewed & tested by the community

ok thanks for this, looks good

joseph.olstad’s picture

Status: Reviewed & tested by the community » Fixed
GuyPaddock’s picture

Props to @fjgarlin for addressing #6, and props to @joseph.olstad for getting this in. Thank you both!

Status: Fixed » Closed (fixed)

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