Sometimes during the development of a site, you need a value of a field, node title, or taxonomy term name to be unique and we had to add custom validations.
This module allows you to require that the content supplied for entity fields, node titles or taxonomy terms names will unique if so configured in each field or title/name of the entity, allowing the administrator to set a validation message in case the filled-in value already exists.
Project link
https://www.drupal.org/project/unique_content_field_validation
Git instructions
git clone --branch 1.0.x https://git.drupalcode.org/project/unique_content_field_validation.git
PAReview checklist
http://pareview.net/r/346
Comments
Comment #2
fabiansierra5191 commentedComment #3
avpadernoComment #4
avpadernoComment #5
drupal-ramesh commentedHi
Kindly fix the below errors
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------
259 | WARNING | Only string literals should be passed to t() where possible
285 | WARNING | Only string literals should be passed to t() where possible
Comment #6
avpadernoComment #7
avpadernoI changed the issue priority as described on Review process for security advisory coverage: What to expect / Application Review Timelines.
Comment #8
vipin.mittal18Comment #9
vipin.mittal18Hello Fabian Sierra,
I have resolved the issue of literal strings and attached the patch over here. I have also installed the module and verified after code fixes.
Kindly have a look and implement the patch. We have pipeline in project which is getting affected due to this issue. So please apply patch ASAP as per your convenience.
Thanks
Vipin Mittal
Comment #10
poorva commentedRTBC +1
Comment #11
avpadernoComment #12
avpadernoActually, until the user who applied doesn't change the project files as reported, the status is still Needs work. The task of reviewers isn't providing patches, but reporting what needs to be changed.
Comment #13
avpadernoComment #14
avpadernoPassing a variable as first argument of
t()is considered a possible security issue.Comment #15
vipin.mittal18Hello Fabian,
Could you please apply the patch of https://www.drupal.org/project/unique_content_field_validation/issues/32... to resolve the issue and make it security coverage of your module.
Thanks
Vipin
Comment #16
fabiansierra5191 commentedHi guys,
Thanks for your feedback and help, I launched a new version 1.0.3 to fix the possible security issue.
Thanks!
Comment #17
vipin.mittal18Added PAReview checklist in the issue description.
Comment #18
avpadernoWhen a validator constraint plugin needs to use dependencies, it needs to implement
ContainerInjectionInterface, similarly to the following Drupal core plugin.A string that only contains a placeholder cannot be translated, as a placeholder is the same for every language. A string that only contains two or more placeholders could be translated, as in that case the translation could at least change the placeholders order.
Comment #19
fabiansierra5191 commentedthanks Alberto for all your comments, I haven't seen the errors with translations, and I thought that patch in the bug ticket #3223100 fixed that but unfortunately it did not, and instead create a new bug.
After a small research, I found that errors reported in comment #5 are not necessarily errors that need to be fixed, the message says where is possible, and in this case to keep the translation is not fixable.
I have undone this and fix the dependency injection items that need, it's not in the last release, for now, it is only on the branch 1.0.x
Comment #20
fabiansierra5191 commentedComment #21
avpadernoThank you for your contribution! I am going to update your account.
These are some recommended readings to help with excellent maintainership:
You can find more contributors chatting on the IRC #drupal-contribute channel. 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.
I thank all the dedicated reviewers as well.
Comment #22
avpaderno