Closed (won't fix)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
28 Oct 2015 at 13:18 UTC
Updated:
18 Aug 2016 at 20:22 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #2
patilvishalvs commentedComment #3
patilvishalvs commentedComment #4
PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxpatilvishalvs2603340git
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 #5
patilvishalvs commentedUpdated the module as per recommendations given at http://pareview.sh/pareview/httpgitdrupalorgsandboxpatilvishalvs2603340git
Comment #6
patilvishalvs commentedComment #7
patilvishalvs commentedComment #8
vpeltot commentedHi
Good idea.
But your implementation is so Drupal 7.
I think it would be better if you create a new field formatter plugin for image fields, and completely delete your .module file.
Your new plugin must extend the ImageFormatter Plugin to keep all properties.
It's the same as what you have implement before, but in Drupal 8.
Place your plugin file in src/Plugin/Field/FieldFormatter.
Your plugin should look like this:
Comment #9
patilvishalvs commented@vpeltot thanks for reviewing the module. Also thanks for Plugin suggestion, I will work on it.
Comment #10
patilvishalvs commentedComment #11
patilvishalvs commentedUpdated the module as ImageClassFormatter plugin.
Comment #12
patilvishalvs commentedComment #13
vpeltot commentedNice.
It's really better.
Everything is ok for me now.
Also, if you have time, my module needs to be reviewed :-)
Comment #14
vpeltot commentedManual Review
Comment #15
woprrr commentedGreat job @patilvishalvs :) Work fine for me.
Manual Review
Also, if you have time, my module needs to be reviewed too :-)
Comment #16
patilvishalvs commentedComment #17
joachim commentedHave you seen https://www.drupal.org/project/field_formatter_class?
Could you explain how your project provides different functionality?
Comment #18
patilvishalvs commented@joachim The field formatter class module allows to add a class to a field wrapper and Image Class 8 allow to add class to <img> tag.
Comment #19
shreepa.bss@gmail.com commentedhi,I installed https://www.drupal.org/project/field_formatter_class.I have a content type name:About us.In this content type I added an image field.I also created a view using this content type.in About us content type at image field I added a class named:image_circle but class is not added to my image filed.please give me any suggestion.I installed this version:8.x-1.x-dev tar.gz (7.95 KB) | zip (9.46 KB)
Comment #20
nishkris commentedThis is not working for me , i'm getting one error in reports
Comment #21
patilvishalvs commented@nishkris the issue is resolved. I have replaced ! with @ to resolve the issue.
Comment #22
sandeepguntaka commentedGood job @patilvishalvs :) its a good idea to create a module like this.
Automated Review
Has some warnings listed in pareview.sh
Manual Review
Individual user account
Yes: Follows the guidelines for individual user accounts.
No duplication
Yes: Does not cause module duplication and/or fragmentation.
Master Branch
Yes: Follows the guidelines for master branch.
README.txt/README.md
Yes: Follows the guidelines for in-project documentation and/or the README Template.
Code long/complex enough for review
Yes: Follows the guidelines for project length and complexity.
Secure code
Yes: Meets the security requirements.
Comment #23
patilvishalvs commented@sandeepreddyg thank you for the review. I have updated changes to remove warnings listed in pareview.sh.
Comment #24
jonreid commentedAutomated Review
No issues found on rerun.
Manual Review
The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.
The module doesn't technically meet the minimum length guidelines in terms of number of function calls or source code length. I wouldn't consider this a blocker but it may be that the project won't qualify for the "create full projects" permission. Still, the code looks complete to me. It tests fine. If you're up for it, a nice option to extend the module size and provide an improved experience would be to add form validation. Possibly something around disallowing problematic class names like those starting with a hyphen.
If added, please don't remove the security tag, we keep that for statistics and to show examples of security problems.
This review uses the Project Application Review Template.
Comment #25
Jing Qian commentedTested with https://simplytest.me/ and seems works fine :)
http://pareview.sh/pareview/httpgitdrupalorgsandboxpatilvishalvs2603340git looks ok
Comment #26
dman commentedGiven the reviews, I was about to double-check the code length and sign this off - but the module name/namespace stuck out at me terribly.
Why image_class_8? Well, because there is already Image Class which does exactly this same job in Drupal7. That is clear duplication, and it's clear you must have seen that earlier module when setting the module name.
Nobody else saw that in their "Duplication" review?
The initial code submission is very much the same shape as the image class module. Not an outright copy, but doing the same job, function-for-function.
There is even already a Drupal 8 module doing just this one, tiny job. Extra Image Field Classes With Code so similar to the same file in this module it is SCARY.
:-{
Every reviewer that claimed No duplication has been failing even a preliminary module search.
Sorry, (Although I respect it's a small, tidy module with some handy utility) - This is such a clear case of trivial module duplication, This has to go on hold.
Comment #27
dman commentedComment #28
klausiOh, this is sad.
@patilvishalvs: please do not copy other modules and present them as your own work. Your behavior violates 2 essential points of our code of conduct: be respectful and be collaborative https://www.drupal.org/dcoc
EDIT: removed warning.
Comment #29
manarth commentedI'd like to give @patilvishalvs the benefit of the doubt, and note that the first commit to the sandbox was in October 2015, which is when this Project Application was opened.
The earliest commit for Extra Image Field Classes was in February 2016, 4 months after this application began: https://www.drupal.org/node/2672714/commits
The similarity in code suggests very strongly that the code was copied, but without understanding more about the background and without seeing any other relevant commit history, it's difficult to recognise who copied who, or the genuine origin of the code.
I do agree though that where there is an older module for the same purpose - e.g. a D7 equivalent - people should initially try to collaborate with the maintainers of that module, rather than branch off and create their own D8 version. There's as much - if not more - kudos in being a co-maintainer of a module as there is in creating a new one.
Comment #30
dman commentedDespite the astonishing similarity, I was still OK with imagining it was parallel evolution. (my world is nicer if I imagine people are nice).
If you look up this thread, you'll see that all the actual code was given in full by vpeltot !!.
I didn't see that earlier, I just went checking for duplication when I saw how basic the job was.
I think this starts to show the conformity that Drupal8 plugins are bringing to the ecosystem. Given the trivial nature of this module, there are not really any more or less lines of code that would achieve this exact result! vpeltot earned all the points here.
The 'trivial' part also means that it would certainly fail with respect to being unique or complex enough, as it's a classroom exercise now - testing if you can read the d.o. documentation and regurgitate.
Comment #31
patilvishalvs commented@dman, thanks for reviewing the module. I would like to mention that the module is inspired from Image class module, but as there was no drupal 8 release available for it, I created a new module. Also first commit of Extra Image Field Classes was on February 21, 2016 17:03 and of Image class 8 was on October 28, 2015 18:17 and the code modifications mentioned by @vpeltot were committed on October 30, 2015 11:41. This means I have implemented the code before Extra Image Field Classes. I don't mind giving credits to @vpeltot for providing the nice code.
Comment #32
klausiOops, I apologize for my harsh comment in light of that.
Feel free to open a new project application when you have a new project to promote. And for all Drupal 8 ports of existing modules please contribute them to the existing projects instead by opening issues there. Thanks!