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

Error when visiting /cp on Windows 11 #1066

Open
the-goodies opened this issue Apr 26, 2024 · 5 comments
Open

Error when visiting /cp on Windows 11 #1066

the-goodies opened this issue Apr 26, 2024 · 5 comments

Comments

@the-goodies
Copy link

Description

I'm on Windows 11 and I get this error when I visit http://artisan-bakery.test/cp which was created from Simple Commerce starter kit: https://flareapp.io/share/B5ZvoYg5

Steps to reproduce

Visit newly created http://artisan-bakery.test/cp
See error: https://flareapp.io/share/B5ZvoYg5

Environment

Environment
Application Name: Statamic
Laravel Version: 10.48.8
PHP Version: 8.3.6
Composer Version: 2.7.4
Environment: local
Debug Mode: ENABLED
URL: artisan-bakery.test
Maintenance Mode: OFF

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: statamic
Database: mysql
Logs: stack / single
Mail: smtp
Queue: sync
Session: file

Simple Commerce
Currencies: GBP
Gateways: Dummy
Repository: Customer: DuncanMcClean\SimpleCommerce\Customers\EntryCustomerRepository
Repository: Order: DuncanMcClean\SimpleCommerce\Orders\EntryOrderRepository
Repository: Product: DuncanMcClean\SimpleCommerce\Products\EntryProductRepository
Shipping Methods: Free Shipping
Tax Engine: DuncanMcClean\SimpleCommerce\Tax\BasicTaxEngine

Statamic
Addons: 1
Antlers: runtime
Sites: 1
Stache Watcher: Enabled
Static Caching: Disabled
Version: 4.57.2 PRO

Statamic Addons
duncanmcclean/simple-commerce: 6.2.0

@duncanmcclean
Copy link
Owner

Unfortunately, I'm not a Windows user so I can't reproduce this myself.

There was a similar issue in Statamic Core a few months ago, which got fixed in statamic/cms#9537. I'm not quite sure why that fix hasn't fixed the issue for SC, since orders live in the Stache. I'll need to have a think 🤔

@the-goodies
Copy link
Author

statamic new simple
cd simple
composer require duncanmcclean/simple-commerce
php please sc:install

Visit simple.test/cp and it works. But since I can't create a new website from a starter kit (another issue: statamic/cms#9967 ) can't test if issue still exists :)

@the-goodies
Copy link
Author

the-goodies commented Apr 27, 2024

Interesting, when I visit directly to: http://artisan-bakery.test/cp/collections/products it WORKS, but if I visit http://artisan-bakery.test/cp/ it redirects to http://artisan-bakery.test/cp/dashboard and I get this error.

@duncanmcclean
Copy link
Owner

Try removing any of the Simple Commerce widgets configured in config/simple-commerce.php.

@the-goodies
Copy link
Author

config/statamic/cp.php:

    'widgets' => [
        // [
        //     'type' => 'orders_chart',
        //     'width' => 100,
        // ],
        // [
        //     'type' => 'recent_orders',
        //     'limit' => 5,
        //     'width' => 50,
        // ],
        [
            'type' => 'top_customers',
            'limit' => 5,
            'width' => 50,
        ],
        [
            'type' => 'low_stock_products',
            'limit' => 5,
            'width' => 50,
        ],
    ],

Now dashboard works, if I uncomment any of commented orders_chart or recent_orders, I get that error.

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

No branches or pull requests

2 participants