-
Notifications
You must be signed in to change notification settings - Fork 5
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
Product causes error when opening order page #228
Comments
Probably again something with the dimensions of the products. This is/was a problem in the 1.7 module for a long time. |
Hi @rockincent, thanks for reporting this, after a quick look it appears this occurs when a product does not have a name, which should be impossible, so it's probably a product that can't be found. I'm curious to see what products are inside the order that triggers this error. I checked if this was caused by having a deleted product inside an order but that didn't cause an error in my environment. If you could share the logs that would be great. The logs are in I'll push an update shortly that should fix this error, but as I don't know exactly what caused it I can't be sure. Also @venditdevs, that's not possible as every line of code from the old module was replaced. This is basically an entirely new module. Hence the closing of all other bugs :) |
I've just opened a PR for this. If you're willing to try the fix to see if it solves your issue you can download the new version through the "⚙️ On pull request" run on the PR. (You'll need to unpack the downloaded archive first as it contains both the NL and the BE version.) |
Error is explainable. @EdieLemoine you were spot on. In the staging area I deleted products to test another sync module. But forget to delete the orders. So all orders had none existing products. Deleted the orders and made a new one. No error! But if I ever remove a product from the catalog which is in an order this error will show. |
@rockincent I tried the same thing but this error did not occur, maybe when I delete the product from the database entirely. If you're willing to install the version from the PR to test if it works that would be great. I've changed the logic so we check if products actually exist before proceeding to use them. |
@EdieLemoine Tried to install release-2.0.0-beta.1-229.zip but an error occurs. "Installation of module failed. This file does not seem to be a valid module zip" Should I FTP it manually? |
@rockincent did you unpack it first? It contains both the MyParcelNL and SendMyParcel versions. |
@EdieLemoine |
@rockincent amazing, thanks for testing it. Our tester @CherMyParcel is currently doing a quick test to see if this doesn't break anything. If that goes well the PR will be merged. I've just spammed dozens of issues with a link to beta.1 though, so we'll wait for a few more fixes to release the next beta version. You can safely keep using the version you have installed now. :) |
## [2.0.0-beta.2](v2.0.0-beta.1...v2.0.0-beta.2) (2024-03-20) ### 🐛 Bug Fixes * **migration:** fix type error in product settings migration ([a7a32b2](a7a32b2)), closes [#235](#235) * **products:** improve handling of nonexistent products ([#229](#229)) ([efd8483](efd8483)), closes [#228](#228) ### ✨ New Features * **deps:** upgrade @myparcel-pdk/* ([2c88f49](2c88f49)) * **deps:** upgrade myparcelnl/pdk to v2.33.2 ([1bd9d5d](1bd9d5d)) * support prestashop 1.7 ([#239](#239)) ([b16926c](b16926c)), closes [#232](#232) * upgrade to delivery options v6.x ([35d2b05](35d2b05))
🎉 This issue has been resolved in version 2.0.0-beta.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
## [4.0.0](v3.10.0...v4.0.0) (2024-10-16) ### ⚠ BREAKING CHANGES * implement pdk ### 🐛 Bug Fixes * **account:** fix carrier mapping constraint error on account update ([21eb32f](21eb32f)) * **admin:** fix all inputs appearing as required ([142f9f9](142f9f9)) * **admin:** fix broken import ([0c1c1ad](0c1c1ad)) * **admin:** fix error on pages without bulk actions ([9960cee](9960cee)) * **admin:** fix scripts ([9c4ef00](9c4ef00)) * **admin:** improve product settings appearance ([5682b73](5682b73)) * **admin:** improve product settings form ([84714ce](84714ce)) * **admin:** improve tri state input appearance ([d8186c7](d8186c7)) * **admin:** remove required indicators from inputs ([3e5bff7](3e5bff7)) * **admin:** update components ([8e73009](8e73009)) * **carriers:** add carrier migration and improve logic ([7e08891](7e08891)) * **carrier:** set human as name instead of identifier ([c040806](c040806)) * **carriers:** fix carriers and payment methods not being linked ([2228f71](2228f71)) * **carriers:** update carrier creation logic ([dee2d3f](dee2d3f)) * **carriers:** update default values ([63d3077](63d3077)) * **cart:** use correct value for country ([#263](#263)) ([7fb25cc](7fb25cc)) * **checkout:** do not load delivery options script if it's disabled ([713f566](713f566)) * **checkout:** fix delivery options not loading in ps 1.7 ([#270](#270)) ([11c6a46](11c6a46)) * **checkout:** fix incorrect shipping price being used in checkout ([#272](#272)) ([eebdfd5](eebdfd5)) * **checkout:** fix saving delivery options to cart ([64e9e86](64e9e86)) * **checkout:** improve delivery options logic ([6d3fa93](6d3fa93)) * **checkout:** remove missing style.css error ([a382771](a382771)) * **checkout:** retain specific configs when switching carriers ([3d3c223](3d3c223)) * **checkout:** update checkout ([7714efd](7714efd)) * **checkout:** update checkout hooks ([0297ce0](0297ce0)) * **core:** improve core module error handling ([b15ed15](b15ed15)) * **database:** allow creating index to fail if sql functionality is not supported ([6550654](6550654)) * **database:** fix creating indexes on certain db drivers ([fbbc611](fbbc611)) * **database:** fix database indexes and keys ([5ddb09d](5ddb09d)) * **database:** only create indexes if they do not exist ([33b89fd](33b89fd)) * **deps:** upgrade myparcelnl/pdk to v2.30.3 ([26c6bc5](26c6bc5)) * **deps:** upgrade myparcelnl/pdk to v2.30.4 ([217c239](217c239)) * **deps:** upgrade myparcelnl/pdk to v2.31.2 ([2309ea4](2309ea4)) * **entity:** update entities ([5d415e8](5d415e8)) * fix di container in production mode ([49874fc](49874fc)) * fix error when exception has no previous exception ([#260](#260)) ([68f051f](68f051f)) * fix error when loading webhook subscriptions ([7fab71c](7fab71c)) * fix namespace error when installing module ([#246](#246)) ([cf3c9e4](cf3c9e4)), closes [#242](#242) * fix path to log directory ([0bef829](0bef829)) * fix php errors ([8ab2f49](8ab2f49)) * **fulfilment:** add order notes ([e14fa32](e14fa32)) * improve entities ([275265e](275265e)) * improve entities and carrier logic ([b61d197](b61d197)) * improve installation logging ([056aca4](056aca4)) * improve stability of installation flow ([8db8654](8db8654)) * include state code in address for ups ([#276](#276)) ([e89a2f5](e89a2f5)) * increase max ps version to 8.2 ([ffb2732](ffb2732)) * install module tab correctly ([19d3b33](19d3b33)) * **installer:** clear sf2 cache on install ([533cda0](533cda0)) * **installer:** fix prestashop context error on install ([003ca3b](003ca3b)) * **installer:** prepare the ps entity manager before starting ([016c9ee](016c9ee)) * **installer:** properly delete account on uninstall ([bdf1d3a](bdf1d3a)) * **installer:** save the installed version to database ([3f067f0](3f067f0)) * **install:** fix upgrading from older versions ([#245](#245)) ([ae3b626](ae3b626)), closes [#243](#243) * **logger:** fix logger ([3ef0b51](3ef0b51)) * **logging:** improve logging ([0caa9ef](0caa9ef)) * **logging:** include context in logs ([fc0723e](fc0723e)) * **logging:** update log format ([e015767](e015767)) * **migration:** fix db constraint errors in migrations ([7ebc855](7ebc855)) * **migration:** fix errors when invalid db data is returned ([#252](#252)) ([00bc56e](00bc56e)) * **migration:** fix type error ([12f4fad](12f4fad)) * **migration:** fix type error in product settings migration ([a7a32b2](a7a32b2)), closes [#235](#235) * **migration:** fix type error when input is not an array ([#262](#262)) ([d40d6df](d40d6df)) * **migration:** harden error handling ([b75d277](b75d277)) * **migration:** improve order shipments migration ([f6f3b5e](f6f3b5e)) * **migration:** improve settings migration ([cc9e21c](cc9e21c)) * **migration:** improve settings migration ([2aa8da9](2aa8da9)) * **migration:** migrate migrations ([0263e9f](0263e9f)) * **migration:** prevent $row must be array but bool supplied during installation ([#241](#241)) ([b655806](b655806)) * **migration:** run migrations when upgrading ([7534da7](7534da7)) * **migrations:** improve migrations ([148fceb](148fceb)) * **migration:** update and test shipments migration ([f0f33ca](f0f33ca)) * **module:** move settings to dedicated page ([138ed5c](138ed5c)) * **order:** fix errors caused by missing dates ([54bfc96](54bfc96)) * **order:** fix saving data to orders ([cb3dbd9](cb3dbd9)) * **orders:** fix error when weight is a string ([#261](#261)) ([9e844a2](9e844a2)), closes [#256](#256) * **orders:** move order note logic to order note repository ([9b83b32](9b83b32)) * **orders:** prevent order id type error ([e59ab3c](e59ab3c)) * **orders:** reset index on collection ([5e92f23](5e92f23)) * **orders:** throw error on getting nonexistent order ([f0921ee](f0921ee)) * **orders:** trim whitespace in person field ([2ab31a4](2ab31a4)) * pass dev mode to bootstrapper ([ca5d58b](ca5d58b)) * prevent integrity constraint violation for notes column ([#259](#259)) ([53c5eab](53c5eab)) * **products:** fix product settings logic and migration ([96734a1](96734a1)) * **products:** fix saving product settings ([b6e3c89](b6e3c89)) * **products:** improve handling of nonexistent products ([#229](#229)) ([efd8483](efd8483)), closes [#228](#228) * remove deprecation warning ([ade1951](ade1951)) * **scripts:** improve script loading logic ([878403a](878403a)) * **settings:** improve saving settings ([b313793](b313793)) * **settings:** remove settings that aren't available ([d413ff1](d413ff1)) * **upgrade:** fix reference to facade class ([b580ffb](b580ffb)) * **webhooks:** fix webhooks ([dad3abc](dad3abc)) ### ✨ New Features * **admin:** improve admin component appearance ([e97ccc3](e97ccc3)) * **admin:** improve look of components ([2df8009](2df8009)) * **carriers:** add carrier logos ([1ae56e6](1ae56e6)) * **carriers:** allow changing name and delivery speed texts ([ea19255](ea19255)) * **checkout:** calculate shipping costs per carrier ([e03a380](e03a380)) * **deps:** upgrade @myparcel-pdk/* ([781600d](781600d)) * **deps:** upgrade @myparcel-pdk/* ([687ecb3](687ecb3)) * **deps:** upgrade @myparcel-pdk/* ([86a1c1c](86a1c1c)) * **deps:** upgrade @myparcel-pdk/* ([2c88f49](2c88f49)) * **deps:** upgrade @myparcel-pdk/* ([36cdc62](36cdc62)) * **deps:** upgrade myparcelnl/pdk to v2.30.2 ([885ead1](885ead1)) * **deps:** upgrade myparcelnl/pdk to v2.31.0 ([f830d7b](f830d7b)) * **deps:** upgrade myparcelnl/pdk to v2.33.2 ([1bd9d5d](1bd9d5d)) * **deps:** upgrade myparcelnl/pdk to v2.36.2 ([a1a9a57](a1a9a57)) * **deps:** upgrade myparcelnl/pdk to v2.42.0 ([d3f1a78](d3f1a78)) * **deps:** upgrade myparcelnl/pdk to v2.43.5 ([f9b206d](f9b206d)) * **frontend:** allow html in form descriptions ([#257](#257)) ([1251164](1251164)) * **fulfilment:** add order notes ([ae98602](ae98602)) * implement pdk ([c497eb8](c497eb8)) * **logging:** improve logging output ([861e713](861e713)) * **order-grid:** add bulk order actions ([53b2a63](53b2a63)) * **order:** implement updating order notes ([935955d](935955d)) * **orders:** implement automatic order status updates ([9af8725](9af8725)) * **settings:** enable/disable carriers based on settings ([7f558a4](7f558a4)) * **settings:** implement shipping method repository ([045a668](045a668)) * support prestashop 1.7 ([#239](#239)) ([b16926c](b16926c)), closes [#232](#232) * update to latest delivery options ([#240](#240)) ([82064fa](82064fa)) * upgrade to delivery options v6.x ([35d2b05](35d2b05))
🎉 This issue has been resolved in version 4.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Version check
PrestaShop version
8.1.2
PHP version
8.1
What went wrong?
Opening order page results in error:
MyParcelNL\PrestaShop\Pdk\Product\Repository\PsPdkProductRepository::MyParcelNL\PrestaShop\Pdk\Product\Repository{closure}(): Argument #1 ($strings) must be of type array, null given, called in /home/u7566p5159/domains/vangeleuken.nl/public_html/staging1/modules/myparcelnl/src/Pdk/Product/Repository/PsPdkProductRepository.php on line 56
Reproduction steps
Relevant log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: