arthurperton / statamic-popular Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
Hi Arthur, just saw this new Addon and it looks really cool!
One question--is it possible to scope the view counts to a time window? For example, to show the list of the most popular stories over the past week, or month (vs. just all time, which is what it appears is the case now)?
A related question--can the count be scoped to a specific collection? For example, what are the top stories in "Recipes" as opposed to "Tips"?
TIA, really love this Addon, great work!
Hello Arthur,
will the addon also be compatible for statamic 4 in the near future?
Thanks and best regards
When installed, the "Popular" add-on the "updates" in the Control Panel appear with a badge indicating an update, however no update is available.
Statamic version: 4.24.0
PHP version: 8.2.9
Addon version: 1.1.0
Install method for Statamic (choose one):
statamic/statamic
production.ERROR: unserialize(): Error at offset 4948 of 4958 bytes {"exception":"[object] (ErrorException(code: 0): unserialize(): Error at offset 4948 of 4958 bytes at /home/forge/site/vendor/arthurperton/popular/src/Pageviews/LockingFile.php:98)
[2023-11-20 17:36:02] production.ERROR: unserialize(): Error at offset 4948 of 4958 bytes {"exception":"[object] (ErrorException(code: 0): unserialize(): Error at offset 4948 of 4958 bytes at /home/forge/site/vendor/arthurperton/popular/src/Pageviews/LockingFile.php:98)
[stacktrace]
#0 /home/forge/site/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(254): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError()
#1 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->Illuminate\\Foundation\\Bootstrap\\{closure}()
#2 /home/forge/site/vendor/arthurperton/popular/src/Pageviews/LockingFile.php(98): unserialize()
#3 /home/forge/site/vendor/arthurperton/popular/src/Pageviews/LockingFile.php(57): ArthurPerton\\Popular\\Pageviews\\LockingFile->readDataFromStream()
#4 /home/forge/site/vendor/arthurperton/popular/src/Pageviews/Repository.php(55): ArthurPerton\\Popular\\Pageviews\\LockingFile->modify()
#5 /home/forge/site/vendor/arthurperton/popular/src/Pageviews/Repository.php(30): ArthurPerton\\Popular\\Pageviews\\Repository->update()
#6 /home/forge/site/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(353): ArthurPerton\\Popular\\Pageviews\\Repository->addMultiple()
#7 /home/forge/site/vendor/arthurperton/popular/src/Pageviews/Aggregator.php(19): Illuminate\\Support\\Facades\\Facade::__callStatic()
#8 /home/forge/site/vendor/arthurperton/popular/src/Console/Commands/Aggregate.php(41): ArthurPerton\\Popular\\Pageviews\\Aggregator->aggregate()
#9 /home/forge/site/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): ArthurPerton\\Popular\\Console\\Commands\\Aggregate->handle()
#10 /home/forge/site/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#11 /home/forge/site/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure()
#12 /home/forge/site/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod()
#13 /home/forge/site/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\\Container\\BoundMethod::call()
#14 /home/forge/site/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\\Container\\Container->call()
#15 /home/forge/site/vendor/symfony/console/Command/Command.php(326): Illuminate\\Console\\Command->execute()
#16 /home/forge/site/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\\Component\\Console\\Command\\Command->run()
#17 /home/forge/site/vendor/symfony/console/Application.php(1081): Illuminate\\Console\\Command->run()
#18 /home/forge/site/vendor/symfony/console/Application.php(320): Symfony\\Component\\Console\\Application->doRunCommand()
#19 /home/forge/site/vendor/symfony/console/Application.php(174): Symfony\\Component\\Console\\Application->doRun()
#20 /home/forge/site/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(201): Symfony\\Component\\Console\\Application->run()
#21 /home/forge/site/artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle()
#22 {main}
"}
Site has been running fine without issue, then suddenly this issue has occurred.
A clear and concise description of what you expected to happen.
If applicable, add screenshots, error messages etcetera to help explain your problem.
Environment
Application Name: Statamic
Laravel Version: 10.32.1
PHP Version: 8.2.11
Composer Version: 2.6.5
Environment: production
Debug Mode: OFF
URL: site.com
Maintenance Mode: OFF
Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED
Drivers
Broadcasting: log
Cache: redis
Database: mysql
Logs: stack / single
Mail: smtp
Queue: redis
Session: file
Statamic
Addons: 3
Antlers: runtime
Stache Watcher: Enabled
Static Caching: half
Version: 4.35.0 PRO
Statamic Addons
arthurperton/popular: 1.1.0
pecotamic/sitemap: 1.4.6
statamic/ssg: 2.2.0
Install method for Statamic (choose one):
Fresh install from statamic/statamic
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.