This script connects to my online database and randomly gathers links to be displayed on a Drupal based Web site.
The database is full of links to ham radio operator's Web sites. You can see the hamdomains table in action at these locations:
Each time you refresh the page, a new set of links will pop up in the table.
Project page:
https://drupal.org/sandbox/fatkinson/2137861
Sandbox git:
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/fatkinson/2137861.git hamdomains
There is an error popping up on the hamdomains.module file on line 360. The variable '$fields' is an array. But you can see on line 355 that the variable hint is included in the ¶ms comment line.
The error is: 378 | ERROR | Type hint "array" missing for $field
If you can tell me how to recode it to eliminate this error, I'm all ears.
Comments
Comment #1
fatkinson commentedThis script connects to my online database and randomly gathers links to be displayed on a Drupal based Web site.
The database is full of links to ham radio operators Web sites.
Project page:
https://drupal.org/sandbox/fatkinson/2137861
Sandbox git:
git clone --branch 7.x-1.x http://drupalcode.org/sandbox/fatkinson/2137861.git hamdomains
Let me know if you need anything else.
Comment #2
PA robot commentedProject 1: https://drupal.org/node/2143623
Project 2: https://drupal.org/node/2184079
As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).
If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #3
PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxprabeengiri2175185git
We 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 #4
fatkinson commentedI made the changes needed.
Comment #5
fatkinson commentedI made the changes needed.
Comment #6
draenen commentedYour sandbox repository seems to be empty. See https://drupal.org/project/2137861/git-instructions.
Comment #7
fatkinson commentedI used get to post my files act 'hamdomains'. I have no idea why you can't find the files.
Any ideas?
I am going to be attending Drupal Camp Phoenix on February 28. I will be taking a seminar on module building and another one on Drupal Ladder.
Hopefully, they will give me some answers while I am there.
But if you can tell me what a I did wrong, that would help for now.
I will be glad to review some modules once I get the training.
Comment #8
fatkinson commentedI used get to post my files act 'hamdomains'. I have no idea why you can't find the files.
Any ideas?
I am going to be attending Drupal Camp Phoenix on February 28. I will be taking a seminar on module building and another one on Drupal Ladder.
Hopefully, they will give me some answers while I am there.
But if you can tell me what a I did wrong, that would help for now.
I will be glad to review some modules once I get the training.
Comment #9
draenen commentedI see that your code is attached as zip files on the sandbox project page. Drupal.org instead uses Git to manage all project code. If you are unfamiliar with version control using Git there is an excellent free ebook at http://git-scm.com/book.
Once you have created a git repository and committed your code you can upload (push) it to your sandbox by following the instructions under "Version Control" on your project page.
Comment #10
fatkinson commentedWell, I upload my SSH key and I followed the directions.
When I enter 'git push hamdomains master', I get a prompt asking me for my password.
Since I have an SSH key uploaded, it shouldn't ask me for my password, should it?
But I entered my Drupal site password and it gives 'error: src refspec master does not match any. error: failed to push refs to 'fatkinson@git.drupal.org:sandbox/fatkinson/2137361.git''.
I am so close. I want to get this module evaluated.
Can anyone tell me what is wrong and what to do about it?
Comment #11
fatkinson commentedOK, I finally got my files uploaded via Git.
It can be found at http://drupalcode.org/sandbox/fatkinson/2137861.git/tree .
Please review.
Comment #12
fatkinson commentedI had the files located in an incorrectly created branch.
I deleted that branch and then committed the files to 7.x-1.x.
They are now on display.
I would appreciate anyone who can giving it a review.
Comment #13
PA robot commentedGit clone command for the sandbox is missing in the issue summary, please add it.
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #14
fatkinson commentedComment #15
klausiGit clone command for the sandbox is still missing in the issue summary, please add it. Please follow https://drupal.org/node/1011698 to fill out your issue summary.
Comment #16
fatkinson commentedComment #17
fatkinson commentedComment #18
fatkinson commentedComment #19
klausiComment #20
mraichelson commentedNotice: Undefined index: name in system_sort_modules_by_info_name().Install, update and uninstall functions for the block_example module.Comment #21
ayesh commentedBased on the project description where you mention "...Please consider that I hold its copyright", I'm sorry but it seems if you are not willing to release the code under GPL, so Drupal.org admins won't approve this application. I see that you have put a lot of effort to this (as you have mentioned a freelancing developer as well), but all code hosted on drupal.org or drupalcode.org requires to be in GPL (you'll probably need to discuss with this with the developer also).
Some improvements/changes:
.install file
- No need of
hamdomains_uninstallhook implementation here. It's trying to drop the database defined in hook_schema, which, since Drupal 7 does automatically.- I'd not store a background color or anything related to styling that can be changes easily with CSS. Feel free to put CSS classes, even with a unique identifiers for the block, so module users can use CSS to style it as they exactly need.
.module file
As above comment mentioned,
hamdomains_permissionuses a common permission name which might conflict with other modules. In the front end, site admins will see permissions grouped by the module name. But in the code, there is no module-based separation in the permission name.If the validation functions are not widely used, consider putting your form validation logic in the form's validation function.
element_validateis generally for basic validations which can be used almost everywhere.In some database calls, why
uidis always 1 ? If not necessary, I'd remove that column from the table entirely.There are some insecure db_query function calls (line 287 in 1a23a695aeeab9c58dd602c29d25bf47d995489e commit for example)
Also, I think the current approach of allowing other users to access your MySQL database directly is a huge security issue for your own site. I'd develop some sort of API and access that as opposed to giving out database a username/password and even encouraging them to access the database directly.
Comment #22
fatkinson commentedI am more than willing to release it under GPL. I just retain my rights to it so no one can exploit it outside of GPL.
As far as the developer, I hired him to revise my script. I don't consider that she has any rights to it and never did.
Comment #23
PA robot commentedClosing due to lack of activity. Feel free to reopen if you are still working on this application (see also the project application workflow).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #24
fatkinson commentedComment #25
fatkinson commentedComment #26
fatkinson commentedComment #27
fatkinson commentedComment #28
fatkinson commentedComment #29
gisleThe variable hint goes in the function declaration, not in the docblock.
What you have in the docblock is documentation, not a PHP variable hint. Try:
I think the following statement at the end of README.txt is confusing;
You don't retain all rights (as in "all rights reserved") when you release software under GPL V2. You retains its copyright, and all the rights that isn't already licensed under GPL V2.
I suggest you replace those two sentences with the following:
Comment #30
fatkinson commentedComment #31
fatkinson commentedComment #32
gwprod commentedThe automated tests are referring to this
it should be
Comment #33
fatkinson commentedComment #34
fatkinson commentedgisle,
I changed the copyright text like you suggested and I've pushed it to the Repository. In a few minutes, I'm going to make new .zip and .tar.gz files to put on the Sandbox page. Thanks for the excellent suggestion.
If I put 'array' in front of $fields on that line, the module crashes when I try to run it.
If you have any other suggestions, I'll be glad to hear them.
Thanks,
Fred
Comment #35
gisleThere is no harm in that, but IMHO, it is waste of time. I can't imagine anyone here using anything but git to interact with your project repository.
Well, in front of the parameter is where the type hint should go. See http://php.net/manual/en/language.oop5.typehinting.php
However
NULLdoesn't look like a valid array. Try:Comment #36
fatkinson commentedComment #37
fatkinson commentedComment #38
fatkinson commentedI made your change in the code and it works.
I tried to push it to the repository. I'm getting an error 403 when I try. So far, I've been unable to resolve it. So I can't run pareview.sh on it.
Since you feel that the Zip and tar..gz files are unnecessary, I deleted them from the sandbox.
If you have any ideas on how to fix my put problem with git, I'd love to hear them.
Comment #39
gwprod commented@gisle Good catch, I totally missed the $field = null part.
Comment #40
heddnTry pushing again. Sometimes git throws that error.
Comment #41
fatkinson commentedHi, heddn. I've been trying for the last several hours.
As I have to go to work tomorrow, I need to call it a night..
Thanks for the help, folks!
Comment #42
fatkinson commentedFolks,
I created a new repository on my laptop and cloned the remote repository.
When I try to 'git push', I am still getting the error message 'The requested URL return error: 403'.
Can anyone tell me how to fix this?
Regards,
Fred
Comment #43
ethantHey @fatkinson. What does running this command, return:
git remote -v?Comment #44
fatkinson commentedEthanT,
It returns this:
origin http://git.drupal.org/sandbox/fatkinson/2137861.git (fetch)
origin http://git.drupal.org/sandbox/fatkinson/2137861.git (push)
Regard,
Fred
Comment #45
ethantYou can't push to the public repo - you need to add your personal as a remote. Do this:
git remote add personal fatkinson@git.drupal.org:sandbox/fatkinson/2137861.gitThen, add and commit files normally. When you are ready to push, run:
git push -u personal 7.x-1.xComment #46
fatkinson commentedEthanT,
It looks like that got it.
Thanks very much.
Regards,
Fred
Comment #47
David Witczak commentedHello fatkinson,
The error is: 378 | ERROR | Type hint "array" missing for $field :
function hamdomains_get_default_value(array $field = NULL, $uid = NULL)
Ref : PHP.net
Comment #48
fatkinson commentedAfter I finished making all the changes recommended by pareview.sh, the module stopped showing the domains table on the Web site it is installed on. Take a look at http://www.wb4aej.net.
The module shows up in the sidebar second field but it has no content.. There is some of the code you can see with 'View Source' that shows up.
I'm not figuring out what the issue is. Any suggestions?
Comment #49
nostop8 commentedAutomated Review
Manual Review
There're really too many conceptual module mistakes that needs to be fixed in order to make this module contributed.
echo "some html code";. This way Drupal TPL files are loosing their sense. They are TPLs because you need to write HTML code directly without any print, echo. Using print is permitted only if you want to output some PHP value, e.g.<div class="test"><span><?php print $column?></span></div>That's the worst things I've found. There're more, but first lets fix those above, otherwise I'm afraid module will never get approved.
Comment #50
k_zoltan commentedBased on the review of @nostop8 this module needs more work.
Also noticed there isn't activity lately in this issue.
If you are still working on this module please do the changes, otherwise if you have abandoned this module please close this issue to help the webmasters work.
https://www.drupal.org/node/894256#unsupported-module
Comment #51
PA robot commentedClosing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #52
fatkinson commentedI was recently contacted by someone who was interested in the status of development on this module.
I have pretty much given up on deployment. I spent a great deal of time trying to satisfy everyone towards getting this module ready. But every time I resolved all of the issues, I was saddled with more issues. It was a never ending endeavor and I didn't see that I was going to get it resolved.
So I have changed the status on this module from actively maintained to unsupported.
If someone out there would like to take over this project, contact me and we will make arrangements.
Comment #53
avpaderno