Closed (won't fix)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Minor
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
21 May 2020 at 08:58 UTC
Updated:
31 Jan 2021 at 15:41 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
swetha_bapanah commentedHi Team,
Request you to review this module.
Thanks,
Swetha
Comment #3
gaurav_drupalSwetha_Bapanah Thanks for your contribution.
Can you please check this code at line 39 of modules/contrib/optgroup_taxonomy_select/src/Plugin/Field/FieldWidget/OptgroupTermSelectWidget.php
$result[$parent][$item->tid] = $item->name;It looks like the $parent variable is undefined. You might want to initialize it.
Comment #4
elavarasan r commented@Swetha_Bapanah,
Thanks for your contribution.
Use dependency injection instead of calling directly
\Drupal::entityTypeManager()in the class file.Use "entity_type.manager" service and inject this service into OptionsWidgetBase class.
Comment #5
avpadernoComment #6
swetha_bapanah commentedHi Team,
Have made all the changes as per the review comments, please review. Have created the new tag 8.x-1.2.
Thanks,
Swetha
Comment #7
elavarasan r commentedThanks for the update.
Some variables are useless in the construct section
Instead, Please add the below code
and same issue on create function also, please update with the below,
and remove unnecessary classes from the use section.
Once committed the code into branch, Please check for any coding standard issues by Pareview url.
Don't create a new tag for each update. Please use the same branch and push the code into same branch.
Reviewer will refer the code from the current default branch. In your case the branch is 8.x-1.x. Once it is stable, then create new tag.
Comment #8
rohitrajputsahab commented@Swetha_Bapanah
I'm not able to add value. Can you please check this and i have attached screenshot for your reference.
Comment #9
avpadernoThe following code is correct.
It's calling the parent constructor method, which is expecting those values.
Comment #10
elavarasan r commented@kiamlaluno, You are correct.
@Swetha_Bapanah
You don't need to implement the code that i have mentioned above.
Comment #11
swetha_bapanah commentedHi @rohit-rajput-sahab,
Looks like there are no terms added in the vocabulary you selected for the particular field and now I have updated with the empty label option. The latest code is pushed to 8.1.x branch, please review and confirm. If no issues, I will create the tag later.
Thanks,
Swetha
Comment #12
shaktikHi @Swetha_Bapanah,
Kindly check below errors.
2/2 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
------ -----------------------------------------------------------------------
Line src/Plugin/Field/FieldWidget/OptgroupTermSelectWidget.php
------ -----------------------------------------------------------------------
87 Access to an undefined property
Drupal\optgroup_taxonomy_select\Plugin\Field\FieldWidget\OptgroupTerm
SelectWidget::$multiple.
87 Access to an undefined property
Drupal\optgroup_taxonomy_select\Plugin\Field\FieldWidget\OptgroupTerm
SelectWidget::$options.
96 Access to an undefined property
Drupal\optgroup_taxonomy_select\Plugin\Field\FieldWidget\OptgroupTerm
SelectWidget::$multiple.
96 Method
Drupal\optgroup_taxonomy_select\Plugin\Field\FieldWidget\OptgroupTerm
SelectWidget::getEmptyLabel() should return string|null but return
statement is missing.
98 Access to an undefined property
Drupal\optgroup_taxonomy_select\Plugin\Field\FieldWidget\OptgroupTerm
SelectWidget::$required.
106 Access to an undefined property
Drupal\optgroup_taxonomy_select\Plugin\Field\FieldWidget\OptgroupTerm
SelectWidget::$required.
109 Access to an undefined property
Drupal\optgroup_taxonomy_select\Plugin\Field\FieldWidget\OptgroupTerm
SelectWidget::$has_value.
------ -----------------------------------------------------------------------
[ERROR] Found 7 errors
Comment #13
rohitrajputsahab commentedHi @Swetha_Bapanah,
In my vocabulary, there are around 300 terms. Please see screenshot.
Comment #14
rohitrajputsahab commentedComment #15
avpadernoComment #16
avpadernoI am closing this application due to lack of replies.