Open laneigemud1990 opened 2 years ago
Hi @laneigemud1990, sorry you're having trouble with the plugin. We were already in the process of a code review and have decided to no longer publish this plugin to the Craft Plugin Store. We recommend https://plugins.craftcms.com/view-count as an alternative.
Hi all, We've discovered an issue where the SQL query fails if the siteid does not equal 1.
As you can see from the screenshot below, our site has been registered with an id of 2, (I assume that a multisite was started the subsequently removed) therefore the foreign key integrity check fails.
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails ('sitename'.'trendingposts', CONSTRAINT 'fk_ktriebowweqyiolpnvjmgaetkpvvopivaezb' FOREIGN KEY ('siteId') REFERENCES 'sites' ('id') ON DELETE CASCADE ON UPDATE CASCADE) in /srv/users/username/apps/sitename/vendor/yiisoft/yii2/db/Command.php:1302