Git Info

git clone --branch 8.x-1.x https://git.drupal.org/project/follow_unfollow.git

cd follow_unfollow

-- Overview --

Added follow and unfollow feature to node, taxonomy and user page so that they
track the statistics of user following particular content.

This module provide configuration for setting particular node, taxonomy and user
so that follow and unfollow feature get enable for them.

This module also provide email template configuration for sending mail for
following and unfollowing content.

This module also provide views integration.

Comments

ajayNimbolkar created an issue. See original summary.

mnsh1416’s picture

Hi Ajay,
Manual Review:

You shouldn't use \Drupal::config('follow_unfollow.admin.settings') everytime to get form values in module file. Created an object of \Drupal::config('follow_unfollow.admin.settings' of this and use it everywhere.

ajaynimbolkar’s picture

Hi mnsh,

Thanks for you replay.

Could you provide me example how to used it.

Thanks,
Ajay

PA robot’s picture

Multiple Applications
It appears that there have been multiple project applications opened under your username:

Project 1: https://www.drupal.org/node/2877881

Project 2: https://www.drupal.org/node/2858073

As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).

If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.

I'm a robot and this is an automated message from Project Applications Scraper.

PA robot’s picture

Status: Needs review » Needs work

There are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpsgitdrupalorgprojectfollow_unfollowgit

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.

ajaynimbolkar’s picture

Hi mnsh,

I have created object and used.

Thanks,
Ajay

ajaynimbolkar’s picture

Status: Needs work » Needs review
ajaynimbolkar’s picture

Priority: Normal » Major
ishwar’s picture

Hi

I have done manual review for this module.Please check.

1. For this file BlockVisibilityAccessCheck.php in checkAccess() method for $pathArgument[0] and $pathArgument[1] you have to check using isset() method to avoid warnings and notices.

2. For FollowUnfollowBlock.php file there is a build() method in FollowUnfollowBlock CLASS.
In line no 86 code should be like this.

         if(isset($path) && !empty($path)) {
         $access = $this->blockVisibility->checkAccess($path);
         }
ajaynimbolkar’s picture

Hi iswar,

Thanks for replay.

I have done all changes suggested by you.

Thanks,
Ajay

shylajaphp’s picture

Hi AjayNimbolkar,

Automated Review of the 8.x-1.x branch (commit 2e1d3cb):
README.md or README.txt is missing, see the guidelines for in-project documentation.
Coder Sniffer has found some issues with your code (please check the Drupal coding standards).
FILE: ...os/pareviewsh/pareview_temp/src/plugin/Block/FollowUnfollowBlock.php
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
86 | ERROR | [x] Expected 1 space after IF keyword; 0 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------

Time: 150ms; Memory: 8Mb

DrupalPractice has found some issues with your code, but could be false positives.
FILE: /root/repos/pareviewsh/pareview_temp/src/Form/FollowUnfollowForm.php
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 9 WARNINGS AFFECTING 9 LINES
--------------------------------------------------------------------------
242 | WARNING | \Drupal calls should be avoided in classes, use
| | dependency injection instead
246 | WARNING | \Drupal calls should be avoided in classes, use
| | dependency injection instead
250 | WARNING | \Drupal calls should be avoided in classes, use
| | dependency injection instead
254 | WARNING | \Drupal calls should be avoided in classes, use
| | dependency injection instead
260 | WARNING | \Drupal calls should be avoided in classes, use
| | dependency injection instead
281 | WARNING | \Drupal calls should be avoided in classes, use
| | dependency injection instead
301 | WARNING | \Drupal calls should be avoided in classes, use
| | dependency injection instead
326 | WARNING | \Drupal calls should be avoided in classes, use
| | dependency injection instead
330 | WARNING | \Drupal calls should be avoided in classes, use
| | dependency injection instead
--------------------------------------------------------------------------

ajaynimbolkar’s picture

HI shylajaphp,

I have done changes suggested by pareview.sh.

But in ajax callback we have to write \Drupal calls. If you have any solution then let me know.

Thanks,
Ajay

hiramanpatil’s picture

@shylajaphp...

Please do not copy & paste the error from pareview.sh page. Its just increases the length of this page. Instead, just mention the https://pareview.sh/ URL of the particular module.

Thanks,

mnsh1416’s picture

@Ajay,

I am getting this error "It's forbidden to download drupal core into an existing core." when try to enable this module using drush.

It's because of the dependencies mentioned in info.yml file.
- drupal:core/jquery
- drupal:core/drupal.ajax
- drupal:core/drupal
- drupal:core/drupalSettings
- drupal:core/jquery.once

ajaynimbolkar’s picture

@mnsh,

Thanks for replay,

I have removed dependencies from info file.

Thanks,
Ajay

shylajaphp’s picture

Hi AjayNimbolkar,
Please rename the file follow_unfollow.permission.yml to follow_unfollow.permissions.yml so that permissions will be displayed in admin/people/permissions.

In the file "FollowUnfollowForm.php " line no 243 you can replace drupal call with this code.
$data = $this->entityManager->getStorage('node')->load($nid), because you have already added node dependency.

Please add dependency in Create and Constructor of the form so that we can avoid the below drupal call
$service = \Drupal::service('follow_unfollow.statistics');

Please rename 'plugin' to 'Plugin' so that your plugin block will be displayed on admin/structure/blocks.

When i enabled the plugin block i am getting following error. Please fix it.

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42000]: Syntax error or access violation: 1055 'd8.2.2.fs.nid' isn't in GROUP BY: SELECT fs.nid AS nid, COUNT(fs.nid) AS ncount FROM {follow_unfollow_statistics} fs WHERE (uid = :db_condition_placeholder_0) AND (author_uid = :db_condition_placeholder_1) AND (status = :db_condition_placeholder_2) GROUP BY fs.uid; Array ( [:db_condition_placeholder_0] => 1 [:db_condition_placeholder_1] => 1 [:db_condition_placeholder_2] => 1 ) in Drupal\follow_unfollow\FollowUnfollowStastistics->statistics() (line 74 of modules/custom/follow_unfollow/src/FollowUnfollowStastistics.php).

ajaynimbolkar’s picture

Hi shylajaphp,

I have done permission file changes.

I have used this "$data = $this->entityManager->getStorage('node')->load($nid)," but giving error in ajax. thats way i have written drupal call.

Thanks,
Ajay

shylajaphp’s picture

Hi AjayNimbolkar,
I have installed and configured your module but it is not showing follow me link or button in node view page. Also tell me where i can see the ajax error so that i can also debug it for removing drupal call warning.

shylajaphp’s picture

Manual Review

Individual user account
[Yes: Follows]
No duplication
[Yes: No duplicate modules]
Master Branch
[No: No Master Branch] the guidelines for master branch.
Licensing
[Yes: Follows]
README.txt/README.md
[No: Does not follow] . Missing Maintainers section & Troubleshooting section. the guidelines for in-project documentation and/or the README Template.
Code long/complex enough for review
[Yes: Code is good enough to review]
Secure code
[Yes: Meets the security requirements
ajaynimbolkar’s picture

Hi shylajaphp,

You need to add block in right side bar region.

Thanks,
Ajay Nimbolkar

shylajaphp’s picture

Hi AjayNimbolkar,

I am getting error when i enabled that block please resolve it. Please check comment no
https://www.drupal.org/node/2877881#comment-12089920

ajaynimbolkar’s picture

Hi shylajaphp,

I have done plugin folder rename.

I have uninstall module and again installed but i was not getting any error.

You need to check configuration page of follow and unfollow.

Thanks,
Ajay

ajaynimbolkar’s picture

Priority: Major » Critical
ajaynimbolkar’s picture

Status: Needs review » Closed (works as designed)
avpaderno’s picture

Category: Feature request » Task
Priority: Critical » Normal
Status: Closed (works as designed) » Closed (won't fix)