Closed (won't fix)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
30 Jul 2012 at 18:57 UTC
Updated:
8 Feb 2013 at 14:53 UTC
This module integrate ALCAR Adhoc-EDI Version 2.7 API with Drupal 6 and Ubercart 2. ALCAR is one of the biggest european producer of alloy wheels, I don't find any similar module on drupal.org. Adhoc-EDI is a popular web service for get products info.
Alcar module provide block with the select Your car forms and list of products from Ubercart store, using SKU number comparison. List of products have also feature to present wheels on selected car and fivestar widget.
Alcar sandbox - https://drupal.org/sandbox/henk/1549782
Git - git clone --branch master git.drupal.org:sandbox/henk/1549782.git alcar
Comments
Comment #1
patrickd commentedPlease read
Workflow
How to apply
What to expect
Checklist for applicants
Comment #2
henk commentedThanks, so I changed status to needs review.
Comment #3
marshmn commentedHi,
I tried to clone the code with:
git clone http://git.drupal.org/sandbox/henk/1549782.git alcarbut it failed with:
Please ensure that there is a working git repository for us to be able to review this.
Thanks
Matt
Comment #4
marshmn commentedAh, I realised that I was actually doing:
git clone http://drupalcode.org/sandbox/henk/1549782.git alcarNote that the above is using drupalcode.org and NOT drupal.org - this was because in the information in this issue you give a Git location of drupalcode.org - please correct this and provide the full git clone command, e.g:
git clone http://git.drupal.org/sandbox/henk/1549782.git alcarThanks,
Matt
Comment #5
henk commentedOK, I changed that info. Git should working.
Thanks,
Comment #6
marshmn commentedAn automated review of your module throws up a large number of issues, both with the layout of your files and with the style of your code. Take a look at the output here: http://ventral.org/pareview/httpgitdrupalorgsandboxhenk1549782git
I would suggest fixing as many of those issues as possible.
From a manual review:
The README.txt seems unfinished as it has statments like "more info soon" and some blank sections which should either have content added or be removed.
You seem to be working from a master branch - you should move your code to a version branch. See: http://drupal.org/node/1127732
Your info file contains a version line - this should be removed as it will be added by the Drupal packager when required.
alcar.module:
In hook_menu() you should NOT be putting strings within t() - these should be untranslated strings. See: http://api.drupal.org/api/drupal/developer!hooks!core.php/function/hook_...
In several places there appears to be commented out lines of code, in some cases whole functions - some of which looks to be debugging information. These should be removed. E.g. line 485:
//print_r($result->data);In alcar_get_list_args() you are outputting a lot of HTML - perhaps this would be better in a theme function or template file so that themers can adjust the output?
alcar.install:
You have some functions with no code in them - they should be removed if there is no need for them.
In your hook_uninstall() you should remove any variables which the module sets, e.g. those which are set in the admin pages.
filter_wheels.js:
All the code in this file appears to be commented out so I don't see the point in having it there?
alcar.admin.inc:
You are using a textfield for the admin to select HTTP or HTTPS - wouldn't this be better as either a drop down selector or radio buttons?
You are using a textfield for the admin to enter a password - wouldn't this be better to use a password field so that the text is hidden?
Generally, I think this module still needs a fair bit of work to make it ready for review - therefore setting to 'needs work'.
Comment #7
henk commentedOk, thanks for answer and list to do. I will fix this and change the status when all will be done.
Comment #8
henk commentedBugs was removed, branch is renamed, most of suggestions was implemented. Needs review. Thanks.
Comment #9
klausiWe are currently quite busy with all the project applications and I can only review projects with a review bonus. Please help me reviewing and I'll take a look at your project right away :-)
Comment #10
tr commentedStill haven't addressed a number of issues raised above, specifically in #1 and #6.
Your repository contains the following branches: 6.x-1.x-dev, 6.x-1-0-beta1, 6.x-2.x-dev, master
NONE of these are valid branch names, with the exception of master, and as noted in #6 you shouldn't be using master anyway. Please read the checklist linked in #1 for a guide to naming branches. Likewise, I don't see any reason to have multiple branches at all because the code in 1.x is the same as in 1-0-beta1 and 2.x.
You have context mentioned twice in the dependencies in your .info file, and you have Views as a dependency which doesn't seem to be needed as you haven't implemented any Views hooks. You also shouldn't have shadowbox hardwired as a dependency - what if I want to use lightbox or colorbox instead? Likewise for fivestar - this should NOT be required. Site developers should have the option to include or not to include fivestar, this is not something you should force on them.
The visual appearance should be easily customizable, not hardwired. As mentioned in #6, you're coding a lot of the HTML generation explicitly when you should be using theme functions. Some of your HTML is just wrong too - for example:
and
You also shouldn't be reusing the "taxonomy" class for your own purpose.
"unique" is spelled wrong all throughout, and while spelling is not a requirement for approval, this may cause problems for developers trying to use your functions.
I'm not sure what the purpose of alcar.features.inc is - it's not doing anything.
Permission names by convention should be all lower case. I'm not sure if this is officially spelled out anywhere.
You still haven't implemented hook_uninstall() as requested in #6.
It looks like your blocks will be empty of content if the user doesn't have the correct permissions. A better way to do this is to set up your blocks to appear only if the user has the correct permissions, or perhaps you could display an informative message like "log in to search for wheels for your vehicle" in the block instead of just leaving it blank.
This function is wrong:
The reason is that there is not a 1-1 correspondence between nid and sku, so this query can and will in general return multiple results so db_result() should not be used here. You're also not guaranteed that there will be only one nid with that sku, so if this is important to you you're going to have to add code here to enforce that condition and return an error if it's not true.
'alcar_sheme' ? Do you mean 'alcar_scheme' ?
You're relying on https, which isn't guaranteed on a Drupal site. You should implement hook_requirements() to check to see if https is available as a condition for installing your module.
You do still have a few coding standards issues. http://ventral.org/pareview/httpgitdrupalorgsandboxhenk1549782git
I didn't even get around to the functional tests yet - there's still too much that needs to be fixed at this point.
Comment #11
henk commentedOk, thanks for opinion. I will try to fix this.
Comment #12
klausiClosing due to lack of activity. Feel free to reopen if you are still working on this application.
If you reopen this please keep in mind that we are currently quite busy with all the project applications and I can only review projects with a review bonus. Please help me reviewing and I'll take a look at your project right away :-)
Comment #13
henk commentedCurrently I have a lot of work, but I will add this bug fixes in couple of days. I am thinking also about 7.x version of module because 6.x version will be not supported in near future, if sombody need it?
Thanks for Your time!
Comment #13.0
henk commentedChange git repository info to git clone --branch master git.drupal.org:sandbox/henk/1549782.git alcar