Find Text provides an administrative view of content, terms and menu items that contain a user submitted string of text. The scope of this module is limited to search and is intended to help the process of finding content when regex would be difficult.
Project Page: https://www.drupal.org/sandbox/themarkahrens/2719743
Git Clone: git clone --branch 7.x-1.x https://git.drupal.org/sandbox/themarkahrens/2719743.git find_text
I have been doing Drupal development for years but this is my first module submitted for public consumption.
Comments
Comment #2
greatmatter CreditAttribution: greatmatter commentedI'd recommend using http://pareview.sh to do an automated test of this project; there were quite a few warnings & errors. EDIT: removed long pareview.sh dump.
Comment #3
mytungsten CreditAttribution: mytungsten at The University of Iowa commentedI have made the changes for the issues found running it through http://pareview.sh/.
Comment #4
bneil CreditAttribution: bneil at The University of Iowa commentedSetting status per https://www.drupal.org/node/532400
Comment #5
froboyMark,
You should check out the guidelines on https://www.drupal.org/node/997024 and add some of the items to your description here. Also, check out https://www.drupal.org/project/scanner. You'll probably want to have some good comparison of why your module is different enough from that.
Comment #6
PA robot CreditAttribution: PA robot commentedFixed the git clone URL in the issue summary for non-maintainer users.
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 #7
bazaalt.organ CreditAttribution: bazaalt.organ commentedHi themarkahrens,
It seems in this line the apostrophe is missing for entity_id:
sites/all/modules/find_text/find_text.module, line 186:
In this case now it is an undefined constant, so it doesn't do that what you expect.
Comment #8
mytungsten CreditAttribution: mytungsten at The University of Iowa commentedPatch supplied by genjohnson resolved the issue, which was noted at https://www.drupal.org/node/2727905.
Comment #9
tomvv CreditAttribution: tomvv commentedHello there, nice one. I installed it and it is really fast and handy.
Pareview.sh finds some minor stuff, quite easy to fix for you.
FILE: /var/www/drupal-7-pareview/pareview_temp/find_text.module
---------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
---------------------------------------------------------------------------
105 | WARNING | Only string literals should be passed to t() where
| | possible
236 | WARNING | Only string literals should be passed to t() where
| | possible
---------------------------------------------------------------------------
I also did some manual testing/thinking on your module.
Comment #10
namit.garg CreditAttribution: namit.garg as a volunteer and commentedAutomated Review
FILE: /var/www/drupal-7-pareview/pareview_temp/find_text.module
---------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
---------------------------------------------------------------------------
105 | WARNING | Only string literals should be passed to t() where
| | possible
236 | WARNING | Only string literals should be passed to t() where
| | possible
You can Replace the line 105
($title->title ? l(t($title->title), "node/$title->nid") : t('Missing data for node @nid', array('@nid' => $title->nid))),
with
($title->title ? l(t("@title",array('@title' => $title->title)), "node/$title->nid") : t('Missing data for node @nid', array('@nid' => $title->nid))),
Manual Review
Rename README.md to README.txt also you Read Me.txt does not follow Template for README.txt https://www.drupal.org/node/2181737
Comment #11
klausit($item->link_title)
is an XSS vulnerability. User provided text must be sanitized with placeholders in t(). Make sure to read https://www.drupal.org/node/28984 again. It also looks like you are printing vocabulary names and other user provided data unsanitized in your HTML tables, make sure to sanitize those as well. And please don't remove the security tag, we keep that for statistics and to show examples of security problems.Comment #12
harish b CreditAttribution: harish b as a volunteer commentedHi,
I had downloaded module, good work on searching string.
Some issues with the module, as Follows :
1. Please provide more description for module. what is the use case of this module? What problem does it solve? See also https://www.drupal.org/node/997024
2. hook_help(), a module can make documentation available to the user for the module as a whole, or for specific paths. Help for developers should usually be provided via function header comments in the code.
3. Use db_like() in db_select query condition. @99, 138, 191, 230
$title_query->condition('title', '%' . db_like($search) . '%', 'LIKE'); Use if statement before using foreach looping@102.194, Leftjoin instead of Addjoin. Addjoin method is used in db_query .
4. Please optimises the complete code, Use child functions for clean & clear understanding of code.Before going into functional testing and negative testing, See also Coding standards Work on the module coding.
5. See also https://api.drupal.org/api/drupal/includes!database!database.inc/function/db_select/7.x
Comment #13
klausiplease don't remove the security tag, we keep that for statistics and to show examples of security problems.
Comment #14
harish b CreditAttribution: harish b as a volunteer commentedOkay klausi, by mistake i removed it. I won't do it again.
Comment #15
PA robot CreditAttribution: 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 #16
sachintyagi99 CreditAttribution: sachintyagi99 commentedHi Mark Ahrens,
If you need any help complete this project then please let me know. I will help you complete your project.
Thanks
Comment #17
mytungsten CreditAttribution: mytungsten at The University of Iowa commentedUpdated the module with the security fixes and the hook_help text. Resetting to Needs Review
Comment #18
sachintyagi99 CreditAttribution: sachintyagi99 commentedHi,
I have checked your module on http://pareview.sh/ and found below errors:
FILE: /var/www/drupal-7-pareview/pareview_temp/find_text.module
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
116 | ERROR | [x] Expected one space after the comma, 0 found
246 | ERROR | [x] Expected one space after the comma, 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------
You need to use t() for below text lists:
Body Fields
Link Fields
Menu Items
Taxonomy Terms
Comment #19
sachintyagi99 CreditAttribution: sachintyagi99 commentedComment #20
klausiminor coding standard errors are not application blockers, please do a real manual review. Anything else that you found or should this be RTBC instead?
Comment #21
Hardik_Patel_12 CreditAttribution: Hardik_Patel_12 commentedhi @themarkahrens
Instead of checking textfield empty or not in submit hook , you can use validate hook for this.
check (if (isset($form_state['values']['search-string']) && $form_state['values']['search-string'] != '') ) this condition in validate hook.
Thankyou
Comment #22
Hardik_Patel_12 CreditAttribution: Hardik_Patel_12 commentedhi @themarkahrens,
1) In menu hook there is no need of mention file as null .you can remove it from there.
2) In find_text_form hook else can condition can be written as elseif. because in else condition you have only if condition.
3)In comments you have mention "Module file for the Bongo module" , so what is Bongo module? No clear idea. i guess it is just copy paste problem
Thankyou
Comment #23
Hardik_Patel_12 CreditAttribution: Hardik_Patel_12 commentedComment #24
PA robot CreditAttribution: 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 #25
bneil CreditAttribution: bneil at The University of Iowa commentedSeems like the latest comments revolve around minor coding standards, which shouldn't block the application review.
Comment #26
klausiLet's keep this closed until we hear back from the applicant.
Comment #27
mytungsten CreditAttribution: mytungsten at The University of Iowa commentedI agree with the comment from bneil
Comment #28
khurrami CreditAttribution: khurrami commentedFILE: find_text.module
Found 2 errors
line#116:- Expected one space after the comma,
line#246:- Expected one space after the comma,
Comment #29
visabhishek CreditAttribution: visabhishek as a volunteer and at Azri Solutions commented@khurrami : Looks like you forgot to change the status. Is this now RTBC after your review or are there application blockers left and this should be "needs work"?
Comment #30
mytungsten CreditAttribution: mytungsten at The University of Iowa commentedThe errors found in #28 are now resolved, there are now no errors from pareview.sh.
Comment #31
klausiplease don't remove the security tag, we keep that for statistics and to show examples of security problems.
Comment #32
bneil CreditAttribution: bneil at The University of Iowa commentedSecurity issues were resolved, as well as all the minor coding standard issues. Setting to RTBC as there have been several reviews without major issue. On a side note, I'm using this module on a client site without issue.
Comment #33
apadernoThank you for your contribution!
I will update your account so you can opt into security advisory coverage. See Goodbye Project Applications, Hello Security Advisory Opt-in to understand what that means, and what is different from the previous project application purpose.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!
Thank you, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks go the dedicated reviewer(s) as well.
Comment #34
klausiAssigning credits.