Closed (fixed)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
11 Jul 2014 at 12:26 UTC
Updated:
1 Sep 2019 at 14:05 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
PA robot commentedWe are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #2
guardiola86 commentedGetting some errors, see http://pareview.sh/pareview/httpgitdrupalorgsandboxbogdan19882176241git
Comment #3
David Witczak commentedHello dstorozhuk,
Please add git clone command :
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/Bogdan1988/2176241.git video_embed_aolI suggest using
require_once DRUPAL_ROOTrather thanmodule_load_include()video_embed_aol.module - line 10 :require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'video_embed_aol') . '/video_embed_aol.video_embed_field.inc';In the creation of a new field I obtain an error :
Undefined index: use_id in video_embed_aol_form_field_ui_field_edit_form_alter()- (line 35)For video_embed_aol.js, add semicolon lines 15, 28, 32, just for perfect.
Other than that, I think it looks okay.
Comment #4
dstorozhukAdd git clone command in description.
Comment #5
dstorozhukDavid Witczak, thank you for your review, I have fixed issues about
git clonecommand and semicolons.I can't reproduce issue with "Undefined index: use_id". Probably, you had have installed
Video Embedmodule, and cache wasn't reseted?Can you, please, explain the reasons of using
require_onceinstead ofmodule_load_include? Thanks.Comment #6
gwprod commentedA few issues:
Web service providers have a tendency to, ahem, change things. It might be a good idea to make
a setting that can be changed by the user.
I'm not sure that
is equivalent to
In
What error are you trying to suppress? Is it necessary?
In video_embed_aol_video_embed_handler_info
your array keys should use '', not "".
When you attach behaviors in your JavaScript, you should ensure that you are only attaching to new items, by using context.
I see no reason why module_load_include is a bad idea here. It provides consistency and is The Drupal Way ™
Comment #7
David Witczak commentedHello,
- for module_load_include, sorry for I thought that it was necessary to use it for include of another module.
- for issue with "Undefined index: use_id"
Comment #8
gwprod commentedYou may use module_load_include to load any include files, whether of this module, or of other modules, though if it is another module, it pays to verify the module is installed first.
Comment #9
dstorozhukgwprod, my opinion about ways to defining the AOL ON API endpoint was the next idea: when provider changing the endpoint, he usually also changing the whole API interface. In this case, most parts of module should be changed. So, I don't see any objective reasons to create admin interface to manage AOL ON API endpoint.
Since D7 requires 5.2.5 (minimum) and
E_WARNING(when URL parsing failed) was removed only in 5.3.3, I decided suppress possible errors for oldest PHP versions.Done:
Replaced
""with''.Process video boxes only once.
I didn't found any difference between
& drupal_staticand&drupal_staticbut, since in drupal core developers use&drupal_static, I have removed the space.Comment #10
dstorozhukDavid Witczak, Thanks, for steps to reproduce.
Comment #11
gwprod commented@dstorozhuk
I think all of that makes sense.
Comment #12
dstorozhukDavid Witczak, I see the error, thanks for a catch.
The issue with
Undefined index: use_id in video_embed_aol_form_field_ui_field_edit_form_alter()has been fixed.Comment #13
daniel.moberly commentedYou are using a variable called "$posible_video_id" in multiple places - nitpicky, but its spelled wrong - might want to change it to "$possible_video_id" for readability.
Line 110: this entire function could be simplified by simply returning FALSE after all the if statements - you don't need to have 3 "return FALSE" statements. The outer "if" statement can also be removed as "if (isset($parsed['path']))" performs the same check as "if ($parsed)"
Line 190: You might consider a regular expression to validate the URL rather than exploding the string and checking the parts. It also looks like you are only checking the "video" part of the URL - don't you want to check the "on.aol.com" part as well? Right now it looks like I could submit "http://www.youtube.com/video/testvideo" and have the URL accepted.
Comment #14
dstorozhukDaniel.Moberly, I agree with your first two comments and I have fixed them.
I disagree with the third one. Here is a few things why:
- video_embed_field module already has domaine validation.
- video_embed_field module has builtin support for youtube so it should accept youtube URL's
- I believe "explode" for small piece of text is much faster than regular expression
Thanks for your review.
Comment #15
dstorozhukComment #16
SolidOpinion commentedAutomated review
a lot of errors. Please see
http://pareview.sh/pareview/httpgitdrupalorgsandboxbogdan19882176241git
Manual view
$ git clone --branch 7.x-1.x http://git.drupal.org/sandbox/Bogdan1988/2176241.git video_embed_aol
Cloning into 'video_embed_aol'...
fatal: repository 'http://git.drupal.org/sandbox/Bogdan1988/2176241.git/' not found
Comment #17
mparker17Looks like this was already promoted to a full project: https://www.drupal.org/project/video_embed_aol
Comment #18
mparker17Comment #19
mparker17Comment #20
avpaderno