Closed (fixed)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
31 May 2013 at 09:58 UTC
Updated:
21 Oct 2013 at 10:31 UTC
This module helps the administrator to remove duplicate nodes according to node titles or CCK fields.
There is a similar sandbox project here : "Deduplicate nodes" : hxxps:\\drupal.org\sandbox\dman\1422586
But :
Link to project page : https://drupal.org/sandbox/virtuoworks/2005296
Link to git repository : http://drupalcode.org/sandbox/virtuoworks/2005296.git
Comments
Comment #1
cybernetikz commentedUsed check_plain on static messages, no need to do that.
Comment #2
sami radi commentedcheck_plain removed on static messages
Comment #3
PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://ventral.org/pareview/httpgitdrupalorgsandboxdman1422586git
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
sami radi commentedThe robot checked the WRONG project. That's the problem with robots, they're not very smart... (that's why I changed the link to the old D6 project in application form, hoping that the robot won't recognize it)
Comment #5
labor b commentedHi, thanks for your contribution. I just reviewed your project:
First of all, you should define a correct git clone command. Took me some time to figure out which project to clone:
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/virtuoworks/2005296.gitLine 172ff: No need to cast types on php variables.
UI suggestions:
* On the "Remove duplicates" form there should be a big message saying "Be careful, you might be losing data! I recommend doing a backup before using this module."
* Also there is no safety line, like a checkbox or a confirmation I have to click. Given the fact, that there are default values for all fields. If a user access the form and accidentaly hits enter, some of his nodes might be gone.
* Leading to the next issue: The module isn't really clear, which nodes will be deleted. Also it doesn't tell me what has been deleted afterwards.
Comment #6
labor b commentedI somehow posted this twice...
Comment #7
sami radi commentedThe git clone command is updated.
Line 172ff: Casts removed
UI suggestions:
* Warning message added
* Confirmation page added
* Preview of the nodes which will be deleted on the confirmation page added.
Comment #8
hatuhay commentedVerify that suggestions on #6 were done.
Couple of lines that cannot be translated on following function, description and title:
From users experience point of view I have a three suggestions:
I will also suggest to use the watchdog function to leave registration of action.
Finnally, I suggest to evaluate using flags, views and VBO to reduce code on nodes handling.
Comment #9
ayesh commentedHello,
I tested the module and it works, but here are some points that I believe needs work.
First, it's not very clear "which duplicates" this module can remove. It could be comments, taxonomy terms, users, and other entities as well.
- Do not call
theme_item_listfunction directly. Usetheme('item_list', $variables)pattern.-
isset($form_state['storage']['confirm']) && $form_state['storage']['confirm']can be replaced withempty($form_state['storage']['confirm'])- I think it would better if we replace "cancel" buttons with a simple link.
- Consider replacing raw database calls to fetch nodes matching a specific field with EntityFieldQuery (doc)
I wish you all the best, and thank you for your hard work on this useful module!
Comment #10
sami radi commentedHi,
@hatuhay
Review :
Irrelevant, Titles and Descriptions should no longer be wrapped in t(), See : https://drupal.org/node/140311
Done.
Done. Added a tableselect layout.
Done. Added a table layout.
Done at multiple levels.
Not convinced :
@Ayesh
Review :
I changed titles and descriptions to replace the word "contents" with the word nodes. That should make it.
Done.
Done. Replaced isset($var) && $var with !empty($var). cf. PHP.net : empty() is essentially the concise equivalent to !isset($var) || $var == false.
Done.
EntityFieldQuery does not support GROUP BY nor DISTINCT. See : https://drupal.org/node/1565708. Using raw database calls instead.
Comment #11
sami radi commentedComment #12
kscheirerAll user accounts are for individuals. Accounts created for more than one user or those using anonymous mail services will be blocked when discovered (see Get a Drupal.org account).
Can you confirm that the virtuoworks account is a single user? Please change your account information and enter your realname.
If you prefer, we can also promote this sandbox to a full project without granting you "git vetted user" status.
----
Top Shelf Modules - Crafted, Curated, Contributed.
Comment #13
sami radi commentedHi,
It's a single user account. I changed my username (virtuoworks) to my real name to prove it.
Best regards.
Comment #14
kscheirerarray(), WATCHDOG_INFO, NULL- those are the defaults anyway.administer remove_duplicatesbut I don't see a matching hook_permission() declaration.Most of the code seems sane though. Needs work for the missing permission.
----
Top Shelf Modules - Crafted, Curated, Contributed.
Comment #15
sami radi commentedHi,
I was trying to prevent the user from being overflowed with to many messages. I removed the message clearing.
Indeed, I wanted to be sure that I wouldn't get a KO because I didn't wrap the text in the t() function as it happened on review #8... Whatever I removed the unnecessary comments.
The default is WATCHDOG_NOTICE. I removed the last parameter (i.e NULL) from my watchdog function calls.
Right ! I forgot to put the matching hook, thanks. That's done.
What do you mean ? Are there to much comments or are the functions too long ? However it's true that I had a lot of work on the UI as required from previous reviews and that the layout functions are massive...
Thanks for the review.
Comment #16
kscheirerYou don't need to list PHP >= 5.2.0, Drupal 7 already requires PHP 5.2.5.
Good project page.
Since this is a D7 module, you can probably remove the references to CCK fields.
Thanks for the updates, this looks good to me!
----
Top Shelf Modules - Crafted, Curated, Contributed.
Comment #17
sami radi commentedHi,
I updated the project page, readme.txt and module comments according to your review.
Thanks,
Comment #18
kscheirerIt's been a month without any problems reported, so I'm promoting this myself as per https://drupal.org/node/1125818.
Thanks for your contribution, Sami Radi!
I updated your account to let you promote this to a full project and also create new projects as either a sandbox or a "full" project.
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 get involved!
Thanks, 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 to the dedicated reviewer(s) as well.
----
Top Shelf Modules - Crafted, Curated, Contributed.
Comment #19
sami radi commented@kscheirer & @reviewers :
The full project is at :
https://drupal.org/project/remove_duplicates
Comment #19.0
sami radi commentedChanged the link to the old D6 project to avoid drupal robot wrong project check