Skip to content
This repository has been archived by the owner on Feb 11, 2024. It is now read-only.

ErrorException - Undefined array key "option_fields" #133

Closed
wautersj opened this issue Nov 16, 2023 · 4 comments · Fixed by #134
Closed

ErrorException - Undefined array key "option_fields" #133

wautersj opened this issue Nov 16, 2023 · 4 comments · Fixed by #134
Labels
bug Something isn't working (only for confirmed bugs)

Comments

@wautersj
Copy link

wautersj commented Nov 16, 2023

Description

After installation of the addon, when trying to access the products overview in the CMS, it craches. It complains about "option_fields". Also getting this when accessing the shop pages in the front end.

At first sight the issue is produced from the AddFieldsToProductBlueprint.php file. (If i'm not mistaken)

Steps to reproduce

  1. Install the addon
  2. access the products overview in the cms
  3. OR access any front-end page with products on in in the shop

Environment

Environment
Application Name: DemoShop
Laravel Version: 10.30.1
PHP Version: 8.1.14
Composer Version: 2.5.4
Environment: local
Debug Mode: ENABLED
URL: statamic-simple-commerce-start.valet
Maintenance Mode: OFF

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

Drivers
Broadcasting: log
Cache: statamic
Database: mysql
Mail: smtp
Queue: sync
Session: file

Simple Commerce
Currencies: EUR, EUR
Gateways: Mollie
Repository: Customer: DoubleThreeDigital\SimpleCommerce\Customers\EloquentCustomerRepository
Repository: Order: DoubleThreeDigital\SimpleCommerce\Orders\EloquentOrderRepository
Repository: Product: DoubleThreeDigital\SimpleCommerce\Products\EntryProductRepository
Shipping Methods: Free Shipping
Tax Engine: DoubleThreeDigital\SimpleCommerce\Tax\Standard\TaxEngine

Livewire
Livewire: v3.1.0

Statamic
Addons: 6
Antlers: regex
Stache Watcher: Enabled
Static Caching: Disabled
Version: 4.30.0 PRO

Statamic Addons
digiti/statamic-crow: 1.1.2
doublethreedigital/duplicator: 4.0.1
doublethreedigital/runway: 5.4.1
doublethreedigital/sc-digital-products: 5.0.5
doublethreedigital/simple-commerce: 5.6.0
statamic/seo-pro: 5.2.2

@wautersj wautersj added the bug Something isn't working (only for confirmed bugs) label Nov 16, 2023
@wautersj
Copy link
Author

One of our developers in the office made the following remark (might be useful?):

"I think it should be '->configFieldItems()' instead of ''->config(), on line 32 of the AddFieldsToProductBlueprint.php file"

Hope it helps / gives any insight

Screenshot 2023-11-16 at 16 20 52

Copy link

Released as part of v5.0.6.

@duncanmcclean
Copy link
Owner

This should now be fixed in the latest version. Make sure to update both this addon & Simple Commerce.

@wautersj
Copy link
Author

Thanks for the rapid response @duncanmcclean !
Great work on SC and SC-DP!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working (only for confirmed bugs)
Projects
None yet
2 participants