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

[PS8] HTTP 500 errors #217

Closed
AaronTajriba opened this issue Mar 13, 2023 · 8 comments
Closed

[PS8] HTTP 500 errors #217

AaronTajriba opened this issue Mar 13, 2023 · 8 comments
Assignees
Labels
bug Something isn't working next major This is present in the next major version of the module

Comments

@AaronTajriba
Copy link

AaronTajriba commented Mar 13, 2023

Module version

1.8.2

PrestaShop version

8.0.1

PHP version

8.1.16

What went wrong?

When you go and try to make an order via frontoffice you get an fatal error:

Fatal error: Uncaught TypeError: method_exists(): Argument #1 ($object_or_class) must be of type object|string, int given in /home/tajribadev/domains/tajriba.dev/public_html/[environment]/modules/myparcelnl/vendor/myparcelnl/sdk/src/Support/Collection.php:1735 Stack trace: #0 /home/tajribadev/domains/tajriba.dev/public_html/[environment]/modules/myparcelnl/vendor/myparcelnl/sdk/src/Support/Collection.php(1735): method_exists() #1 [internal function]: MyParcelNL\Sdk\src\Support\Collection::MyParcelNL\Sdk\src\Support\{closure}() #2 /home/tajribadev/domains/tajriba.dev/public_html/[environment]/modules/myparcelnl/vendor/myparcelnl/sdk/src/Support/Collection.php(1745): array_map() #3 /home/tajribadev/domains/tajriba.dev/public_html/[environment]/modules/myparcelnl/src/DeliveryOptions/DeliveryOptionsMerger.php(30): MyParcelNL\Sdk\src\Support\Collection->toArrayWithoutNull() #4 [internal function]: Gett\MyparcelNL\DeliveryOptions\DeliveryOptionsMerger::Gett\MyparcelNL\DeliveryOptions\{closure}() #5 /home/tajribadev/domains/tajriba.dev/public_html/[environment]/modules/myparcelnl/vendor/myparcelnl/sdk/src/Support/Collection.php(937): array_map() #6 /home/tajribadev/domains/tajriba.dev/public_html/[environment]/modules/myparcelnl/src/DeliveryOptions/DeliveryOptionsMerger.php(31): MyParcelNL\Sdk\src\Support\Collection->map() #7 /home/tajribadev/domains/tajriba.dev/public_html/[environment]/modules/myparcelnl/src/Module/Hooks/OrderHooks.php(51): Gett\MyparcelNL\DeliveryOptions\DeliveryOptionsMerger::create() #8 /home/tajribadev/domains/tajriba.dev/public_html/[environment]/classes/Hook.php(968): MyParcelNL->hookActionValidateOrder() #9 /home/tajribadev/domains/tajriba.dev/public_html/[environment]/classes/Hook.php(407): HookCore::coreCallHook() #10 /home/tajribadev/domains/tajriba.dev/public_html/[environment]/classes/Hook.php(903): HookCore::callHookOn() #11 /home/tajribadev/domains/tajriba.dev/public_html/[environment]/classes/PaymentModule.php(558): HookCore::exec() #12 /home/tajribadev/domains/tajriba.dev/public_html/[environment]/modules/ps_wirepayment/controllers/front/validation.php(63): PaymentModuleCore->validateOrder() #13 /home/tajribadev/domains/tajriba.dev/public_html/[environment]/classes/controller/Controller.php(308): Ps_WirepaymentValidationModuleFrontController->postProcess() #14 /home/tajribadev/domains/tajriba.dev/public_html/[environment]/classes/Dispatcher.php(510): ControllerCore->run() #15 /home/tajribadev/domains/tajriba.dev/public_html/[environment]/index.php(28): DispatcherCore->dispatch() #16 {main} thrown in /home/tajribadev/domains/tajriba.dev/public_html/[environment]/modules/myparcelnl/vendor/myparcelnl/sdk/src/Support/Collection.php on line 1735

You get also an error in the backoffice when you go to the orders overview page:
Non-static method Gett\MyparcelNL\Service\WeightService::convertToGrams() cannot be called statically

I've fixed these errors by calling them dynamically.

Reproduction steps

Go to the front office, place an order (with any paymentmethod) and you see an error appear

Go to the backoffict > orders > orders And you see an error appear.

Relevant log output

Frontoffice:
Fatal error: Uncaught TypeError: method_exists(): Argument #1 ($object_or_class) must be of type object|string, int given in /home/tajribadev/domains/tajriba.dev/public_html/[environment]/modules/myparcelnl/vendor/myparcelnl/sdk/src/Support/Collection.php:1735 Stack trace: #0 /home/tajribadev/domains/tajriba.dev/public_html/[environment]/modules/myparcelnl/vendor/myparcelnl/sdk/src/Support/Collection.php(1735): method_exists() #1 [internal function]: MyParcelNL\Sdk\src\Support\Collection::MyParcelNL\Sdk\src\Support\{closure}() #2 /home/tajribadev/domains/tajriba.dev/public_html/[environment]/modules/myparcelnl/vendor/myparcelnl/sdk/src/Support/Collection.php(1745): array_map() #3 /home/tajribadev/domains/tajriba.dev/public_html/[environment]/modules/myparcelnl/src/DeliveryOptions/DeliveryOptionsMerger.php(30): MyParcelNL\Sdk\src\Support\Collection->toArrayWithoutNull() #4 [internal function]: Gett\MyparcelNL\DeliveryOptions\DeliveryOptionsMerger::Gett\MyparcelNL\DeliveryOptions\{closure}() #5 /home/tajribadev/domains/tajriba.dev/public_html/[environment]/modules/myparcelnl/vendor/myparcelnl/sdk/src/Support/Collection.php(937): array_map() #6 /home/tajribadev/domains/tajriba.dev/public_html/[environment]/modules/myparcelnl/src/DeliveryOptions/DeliveryOptionsMerger.php(31): MyParcelNL\Sdk\src\Support\Collection->map() #7 /home/tajribadev/domains/tajriba.dev/public_html/[environment]/modules/myparcelnl/src/Module/Hooks/OrderHooks.php(51): Gett\MyparcelNL\DeliveryOptions\DeliveryOptionsMerger::create() #8 /home/tajribadev/domains/tajriba.dev/public_html/[environment]/classes/Hook.php(968): MyParcelNL->hookActionValidateOrder() #9 /home/tajribadev/domains/tajriba.dev/public_html/[environment]/classes/Hook.php(407): HookCore::coreCallHook() #10 /home/tajribadev/domains/tajriba.dev/public_html/[environment]/classes/Hook.php(903): HookCore::callHookOn() #11 /home/tajribadev/domains/tajriba.dev/public_html/[environment]/classes/PaymentModule.php(558): HookCore::exec() #12 /home/tajribadev/domains/tajriba.dev/public_html/[environment]/modules/ps_wirepayment/controllers/front/validation.php(63): PaymentModuleCore->validateOrder() #13 /home/tajribadev/domains/tajriba.dev/public_html/[environment]/classes/controller/Controller.php(308): Ps_WirepaymentValidationModuleFrontController->postProcess() #14 /home/tajribadev/domains/tajriba.dev/public_html/[environment]/classes/Dispatcher.php(510): ControllerCore->run() #15 /home/tajribadev/domains/tajriba.dev/public_html/[environment]/index.php(28): DispatcherCore->dispatch() #16 {main} thrown in /home/tajribadev/domains/tajriba.dev/public_html/[environment]/modules/myparcelnl/vendor/myparcelnl/sdk/src/Support/Collection.php on line 1735

BACKOFFICE
Non-static method Gett\MyparcelNL\Service\WeightService::convertToGrams() cannot be called statically

Additional context

No response

@AaronTajriba AaronTajriba added the bug Something isn't working label Mar 13, 2023
@AaronTajriba
Copy link
Author

i think this issue is related to #213 in witch it was stated "fixed" and also related to #214

@EdieLemoine EdieLemoine added this to the PrestaShop 8 support milestone Mar 13, 2023
@EdieLemoine
Copy link
Contributor

Hi @AaronTajriba, we don't support PrestaShop 8 yet. We likely will within the next few months, but I can't give you a date yet.

@AaronTajriba
Copy link
Author

Hi @EdieLemoine Is there any estimation of when ps 8 is gonna be supported, There are multiple bugs witch are an major deal breakers for our customers.

@EdieLemoine
Copy link
Contributor

Hi @AaronTajriba, we're working on it in the alpha branch, but it's going to be a huge update so it will take a while. What we have right now is nowhere near being usable. Sadly, it's not something we can fix easily in the current version of the plugin.

@damienpeerbolte
Copy link

Hi, any updates on this?

@AaronTajriba
Copy link
Author

@EdieLemoine is there any information on the update? This is taking way to long? We're waiting for this since March thats more than 7 months! The module is not working for a lot of webshops with PS8.

@EdieLemoine
Copy link
Contributor

@AaronTajriba @damienpeerbolte We're currently working hard on getting the next update ready and expect to release a beta version within the next few weeks. I'm sorry it's taking so long, but it's a big project and we want to do this right.

We've rewritten the plugin from scratch using our Plugin Development Kit, which allows us to have one shared codebase for all functionality that's common across the plugins we have for several e-commerce platforms. The new module (v2.0.0) supports PrestaShop 8, PHP 7.4 to 8.2 and is a vast improvement over the current version. We intend on being able to close all existing issues with this update. The shared codebase is going to make it a lot easier for us to fix bugs and add features in the future as everything we change affects each of our e-commerce platform plugins/modules.

You can track our progress on the beta branch of this repository if you like.

We would be very grateful if you or your clients are willing to help us test the initial release(s).

To try to improve communication on this, I've created a Project for the v2.0.0 release.

@EdieLemoine EdieLemoine added the next major This is present in the next major version of the module label Oct 24, 2023
@EdieLemoine EdieLemoine self-assigned this Oct 24, 2023
@EdieLemoine EdieLemoine changed the title Multipe 500 Errors [PS8] HTTP 500 errors Oct 24, 2023
@EdieLemoine EdieLemoine pinned this issue Oct 24, 2023
@EdieLemoine
Copy link
Contributor

@AaronTajriba @damienpeerbolte the first beta version is out now, which has been tested internally only. There are some open bugs in the shared codebase, but as the module now appears in the same state as our WooCommerce plug-in, we've decided to release it.

Please read this issue for more information and how to report bugs in the new version.

@EdieLemoine EdieLemoine unpinned this issue Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working next major This is present in the next major version of the module
Development

No branches or pull requests

3 participants