Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't follow Entries #9

Open
JMKelley opened this issue Sep 27, 2020 · 0 comments
Open

Can't follow Entries #9

JMKelley opened this issue Sep 27, 2020 · 0 comments

Comments

@JMKelley
Copy link

I can't seem to get the plugin to follow entries and display the user's saved entries. I'm trying to make it so that the user can save entries, then display all the entries relating to their saved entry.

follow.php

<?php

return [
   '*' => [
      'allowedElementClasses' => [
         'craft\elements\Entry'
      ]
   ]
];

Follow Button

{% if craft.follow.check(entry.id) %}
  <a class="btn btn-sm btn-light py-2 px-3 mr-2" rel="nofollow" href="{{ craft.follow.unfollowUrl(entry.id) }}"><span class="material-icons mr-2 md-18">favorite_border</span>Unfollow Brand</a>
{% else %}
  <a class="btn btn-sm btn-light py-2 px-3 mr-2" rel="nofollow" href="{{ craft.follow.followUrl(entry.id) }}"><span class="material-icons mr-2 md-18">favorite_border</span>Follow Brand</a>
{% endif %}

Error

Argument 1 passed to bymayo\follow\services\ElementService::check() must be of the type array, int given, called in /home/ubuntu/sites/vt-nitro/vendor/bymayo/follow/src/variables/FollowVariable.php on line 33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant