As noted in #741826: Enabling Media_Archive project causes duplicate declaration php error, a duplicate function error occurs when enabling media_archive alongside the 6.x.1.x version of Embedded video field. The error:

Cannot redeclare emvideo_archive_info()

This is because emvideo already provides an archive video.

Other Media group modules, e.g., Media: Youtube, can limit themselves to the 6.x.2.x version of emfield, but this doesn't work for archive because media_archive provides both video and audio embeds and, while the video one is packaged with emfield in the 6.x.1.x branch, the audio one is not.

Proposed solution (luckily, quick and easy):

1. Create a DRUPAL-6--1 branch of media_archive. Remove providers/emvideo/archive.inc from that branch.
2. Switch the existing 6.x.1.x-dev release to use the DRUPAL-6--1 branch.
3. Create a 6.x.2.x-dev release using HEAD. (Alternately, first create a DRUPAL-6--2 branch and use that.)
4. Update the project page, noting that the 1.x version must be used for emfield 1.x and the 2.x for emfield 2.x.

Comments

winston’s picture

Category: task » bug
Status: Active » Postponed (maintainer needs more info)

I'm aware of this issue, but my understanding is that this is supposed to work with emfield as is. Are you sure the problem is mine to solve in media_archive?

Also, I'm a little uncomfortable creating one release with the video module and one without. Won't one of those end up being the "preferred"? And what happens when status update now suggests that people download the latest (which promptly results in the aforementioned php error).

The above emfield issue is what has been preventing me from releasing this. Is there a way for me to tie a 6--1 branch only to a specific version of emfield (so status update suggests that one), and have a 6--2 branch tied only to a later version of emfield which no longer has the video provider? I'm not experienced enough with CVS to know what is the right thing here.

nedjo’s picture

Priority: Normal » Critical

Good questions.

It does appear that aaron hopes at some point to address the issue of duplicate function names. Meantime, however, we have the critical problem that anyone with working older installs who upgrades to the latest recommended 6.x.1.x emfield release will get a fatal error that breaks their site.

And even if and when that issue is addressed, there's probably not a strong need to have the video handler present and independently maintained in both media_archive and emfield for the 6.x.1.x branch. Removing it reduces duplication for this branch without losing functionality.

For now there is no stable release for the 2.x branch of emfield, much less a recommendation to use the 2.x release, so anyone using that branch can be expected to know that they need to take some care about versions and compatibility. Ensuring your releases and project page include compatibility notes should be enough.

Drupal 7 will include fuller control over specific version dependencies, but that's not present for D6. However, the following should work:

If you follow the steps I suggested above and issue a stable release for both the 6.x.1.x and 6.x.2.x branches, tie your recommended release to the branch recommended for emfield. That is, for now, make the 6.x.1.x release the recommended one. Only switch to the 2.x branch if and when that's the recommended branch for emfield.

These steps should provide stable functionality for those using recommended releases and at the same time enable full 2.x support for early adopters.

winston’s picture

OK, that makes sense. Will see about delving into the netherworld of CVS this weekend.

winston’s picture

Status: Postponed (maintainer needs more info) » Needs review

@nedjo

I believe I've executed on your suggestion. It will take some hours for the 2.x-dev release to show up. Didn't create a 2.x-1.0 release yet as I think I need to modify the default video output slightly.

Does it look right to you?

winston’s picture

Status: Needs review » Fixed

Releases are available. Tested that behavior with status update is as expected (if 6.x-1.x version is installed it doesn't prompt user to upgrade to 2.x, but only lists it as "available").

Thanks @nedjo for good suggestion.

Status: Fixed » Closed (fixed)

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