Coder Social home page Coder Social logo

statamic-popular's People

Contributors

arthurperton avatar

Watchers

 avatar

statamic-popular's Issues

Date Ranges?

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!

statamic 4 compatibility

Hello Arthur,
will the addon also be compatible for statamic 4 in the near future?
Thanks and best regards

Update Badge is indicating an update when Popular Installed (but no update is shown)

Bug description

When installed, the "Popular" add-on the "updates" in the Control Panel appear with a badge indicating an update, however no update is available.

How to Reproduce

  1. Install the "Popular" add-on via composer.
  2. Login to the CP
  3. A new badge will appear indicating "1" update.
  4. When clicked in the "Update" no add-on or system update is shown.

Expected behavior

Extra Detail

Screenshot 2023-10-04 at 11 17 43 Screenshot 2023-10-04 at 11 17 31

Environment

Screenshot 2023-10-04 at 11 19 05

Statamic version: 4.24.0

PHP version: 8.2.9

Addon version: 1.1.0

Install method for Statamic (choose one):

  • Fresh install from statamic/statamic
  • Starter kit (Peak)

unserialize(): Error at offset 4948 of 4958 bytes

Bug description

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

[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}
"} 

How to Reproduce

Site has been running fine without issue, then suddenly this issue has occurred.

Expected behavior

A clear and concise description of what you expected to happen.

Extra Detail

If applicable, add screenshots, error messages etcetera to help explain your problem.

Environment

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.