I had to revert back to 6.x-1.24 because I did not find Custom URL anywhere. Am I missing something?

Comments

nextmola’s picture

Yes, I can't find it? Will it return?

Could really use it for my own videos using the FLV player.

alex ua’s picture

Status: Active » Closed (works as designed)

Nothing happened to it, it's right where it always was:

http://drupalcode.org/viewvc/drupal/contributions/modules/emfield/contri...

benclark’s picture

Status: Closed (works as designed) » Active

Video Custom URLs are not working on my install. I have media_youtube installed, and my YouTube embeds are working fine, but custom URLs are nowhere to be found in the admin. This was an upgrade from the 1.x branch. Any help would be greatly appreciated!

alex ua’s picture

Category: feature » support
Status: Active » Postponed (maintainer needs more info)
Issue tags: -custom URL

Please try clearing all of your caches, run update.php, and make sure that the custom url provider is enabled both at:
yoursite.com/admin/content/emfield/emvideo
& the field settings for your content
To get to those settings:
- go to yoursite.com/admin/content/types/
- click on manage fields, which will take you to admin/content/node-type/%yourcontenttype%/fields
- click on "configure" next to the emvideo field

benclark’s picture

Status: Postponed (maintainer needs more info) » Active

I cleared my caches (and just did it again to be certain), ran update.php when I installed the module (no errors). I've also tried disabling+uninstalling emfield, re-enabling it (no change).

The custom url provider doesn't appear as an option at mysite/admin/content/emfield/emvideo. All I see is the "YouTube configuration" fieldgroup (provided by media_youtube). Same story over at field settings, custom url doesn't appear as an option anywhere.

benclark’s picture

Looks to me like these three lines of code in emfield.module, line 560:

function emfield_system_list($module, $provider = NULL, $options = array()) {
  $files = $override_files = module_invoke_all('emfield_providers', $module, $provider);
//   $files = drupal_system_listing("$provider\.inc$", drupal_get_path('module', $module) ."/providers", 'name', 0);
//   $files = array_merge($files, $override_files);

Not sure why the "$provider\.inc$" line is commented out, since that's what would load zzz_custom_url.inc (unless I'm misunderstanding). When I alter the code to look like this, the custom URL functionality returns:

function emfield_system_list($module, $provider = NULL, $options = array()) {
  $override_files = module_invoke_all('emfield_providers', $module, $provider);
  $files = drupal_system_listing("$provider\.inc$", drupal_get_path('module', $module) ."/providers", 'name', 0);
  $files = array_merge($files, $override_files);

Of course, this might break other things so obviously it's worth reviewing, but it appears to work on my end. Just thought I'd try to help out!

nextmola’s picture

Yes, removing these make it available. Is this a safe way to do it? and why are they commented out?

Also, I use the FLV player for my own videos and it works except for one thing. It seems to include the player every post (Also the once that do not have Custom URL video.)

Ex. working as it should:
http://welove.nextmola.com/we-love-smell-napalm-morning

Ex. not working correctly and loading unnecessary player at top of post:
http://welove.nextmola.com/we-love-reach

Can anybody help with this problem?

nextmola’s picture

Found out how to do it!

ehikr’s picture

Just confirming, custom url is not working in the latest release (6.x 2.1).

benclark, thanks for tracking down those commented lines of code. It works fine when un-commented.

ch_masson’s picture

StatusFileSize
new48.44 KB

@ benclark and ehikr, I also confirm that when un-commenting these 2 lines of code in emfield.module 6.x-2.1, it works as fine as it did with emfield 6.x-2.x-dev.

I was running emfield 6.x-2.x when cron told me that there was a security issue with this version of the module and that I had to update to the recommended 6.x-2.1

After running update.php, I got the following message (see attached image)

Now the question is WHY did they comment these lines out? And more importantly are these 2 lines of code THE security issue?

Christian

jaydub’s picture

Well clearly the issue is that with the move to shift all media provider code into their own modules, emfield.module is -only- relying on media provider modules that implement the hook_emfield_providers() hook to build its list of providers. The custom URL provider bundled with emfield is not itself a module and so it now no longer shows given that only providers exposed by the hook show up. Reverting the code as mentioned above results in custom URLs showing up now. As mentioned, one of the maintainers should indicate if the commenting out of the code that would pull the custom URL provider was part of the security fix or not. If providers should only be obtained via module hooks then emfield module should at the very least either make the custom URL provider a submodule or implement the providers hook.

Until we get more clarification from the maintainers, I've posted a patch to address this (mostly so I can include it in my drush make makefiles) for now.

jaydub’s picture

Version: 6.x-2.0 » 6.x-2.1
Status: Active » Needs review
StatusFileSize
new1.06 KB

patch as promised

alex ua’s picture

Assigned: Unassigned » aaron

This was not part of the security upgrade, it was made here:
http://drupalcode.org/viewvc/drupal/contributions/modules/emfield/emfiel...

I'm assigning to Aaron to take a look- my first thought is that we should just go ahead and create a Media: Custom Video module and remove these last provider files...

brightbold’s picture

Thanks - I too was confused by the disappearance of custom video. Glad to know I'm not crazy. It would be great to have them in their own module (or in Emfield core, if that makes more sense.)

faqing’s picture

Thanks, one needs to remove the "comment outs" (lines 562 and 563).

The custom video provider is IMPORTANT for me, all my flv files are not from the third party, but my own server.

Anonymous’s picture

#12 is good for me.
I use custom url for images taken from feed and i need it.
Please, commit

aaron’s picture

note, we are NOT going to revert to #12, sorry. it belongs in its own module.

aaron’s picture

be aware that anyone using the patch in #12 does so at their own risk: it will break the site, IF you are upgrading from DRUPAL-6--1.x, and did not use cvs -dP.

alex ua’s picture

Status: Needs review » Fixed

I added this to http://drupal.org/project/media_video_flotsam for now. Please use that version instead of hacking the module (which will keep other media_ modules from working).

brightbold’s picture

Thanks for taking care of this Alex - this is an important feature!

kirie’s picture

Status: Fixed » Active

#Alex UA, maybe I misunderstood, but the original issue states (through the 'componoent' field) that the issue is about images, not videos? Am I missing something here?

alex ua’s picture

Status: Active » Fixed

I added the two remaining custom url providers to media_image_flotsam and media_audio_flotsam, rolled a full 1.0 release for each, and removed them from the emfield 2.x branch.

kirie’s picture

Thank you!

Status: Fixed » Closed (fixed)

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

shift31’s picture

Version: 6.x-2.1 » 6.x-2.3
Component: Embedded Image Field » Providers
Status: Closed (fixed) » Needs work

The custom URL provider is not appearing in 6.x-2.3, and the emfield.module.917686.patch only appears to work with 6.x-2.1. Is there a separate custom URL module that works for all fields (audio, video, images)?

shift31’s picture

Status: Needs work » Closed (fixed)

Sorry, looks like I need to try the Media: * Flotsam modules...

gurubhai’s picture

http://drupal.org/project/media_video_flotsam

After installing this module with latest 6.x-2.4, the custom upload setting appears in Embedded Media Settings, but still gets error when placing local link in the url field. Also When tried to create new field, it does not give an option for custom url.

brightbold’s picture

@gurubhai -

If you post to a closed issue, the maintainers are unlikely to see it. So you need to reopen if it's genuinely the same issue, or create a new issue if it's different. Creating a new issue seems appropriate in this case, since the original issue was that there was no Custom Upload option wasn't appearing, and now it is.