Closed JeanLucEsser closed 2 years ago
I found a similar issue/error when using the Total Views fieldtype in Craft 4 you cannot create new elements either from the dashboard or FE. I get a similar error to yours.
error: "doublesecretagency\\viewcount\\services\\Query::total(): Argument #1 ($elementId) must be of type int, null given, called in /srv/users/serverpilot/apps/staging-craft4-web-app/vendor/doublesecretagency/craft-viewcount/src/fields/TotalViews.php on line 118"
This is fixed in v1.1.1. Thanks for reporting it! 👍
@tom-byrom That one is also fixed, as noted in #24.
When using the plugin in its simplest form, I came across this issue with Craft 4.
A page with
{% do craft.viewCount.increment(entry.id) %}
returns the following error: