jrgrafisk Posted November 8, 2021 Share Posted November 8, 2021 This is the message i get after enabling debug. I haven't done much work on this shop for some time, so I really can't tell if someone else has been doing something that I do not know about Any of you have an idea as to what i should try? Reverted to php 7.4. That sometimes helps. Deleted .htaccess to force a regeneration of it. Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, Shop given in /customers/0/8/2/nettotruck.dk/httpd.www/src/Adapter/EntityMapper.php:99 Stack trace: #0 /customers/0/8/2/nettotruck.dk/httpd.www/src/Adapter/EntityMapper.php(99): array_key_exists('id_shop', Object(Shop)) #1 /customers/0/8/2/nettotruck.dk/httpd.www/classes/ObjectModel.php(264): PrestaShop\PrestaShop\Adapter\EntityMapper->load('1', NULL, Object(Shop), Array, NULL, true) #2 /customers/0/8/2/nettotruck.dk/httpd.www/classes/shop/Shop.php(128): ObjectModelCore->__construct('1', NULL, NULL) #3 /customers/0/8/2/nettotruck.dk/httpd.www/classes/shop/Shop.php(411): ShopCore->__construct('1') #4 /customers/0/8/2/nettotruck.dk/httpd.www/config/config.inc.php(118): ShopCore::initialize() #5 /customers/0/8/2/nettotruck.dk/httpd.www/admin848u84cdu/index.php(40): require('/customers/0/8/...') #6 {main} thrown in /customers/0/8/2/nettotruck.dk/httpd.www/src/Adapter/EntityMapper.php on line 99 Link to comment Share on other sites More sharing options...
pandorrah Posted November 8, 2021 Share Posted November 8, 2021 This just now happened at my webstore: Error 500: Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, Shop given in /customers/a/b/0/website/httpd.www/src/Adapter/EntityMapper.php:99 Stack trace: #0 /customers/a/b/0/website/httpd.www/src/Adapter/EntityMapper.php(99): array_key_exists('id_shop', Object(Shop)) #1 /customers/a/b/0/website/httpd.www/classes/ObjectModel.php(264): PrestaShop\PrestaShop\Adapter\EntityMapper->load('1', NULL, Object(Shop), Array, NULL, true) #2 /customers/a/b/0/website/httpd.www/classes/shop/Shop.php(128): ObjectModelCore->__construct('1', NULL, NULL) #3 /customers/a/b/0/website/httpd.www/classes/shop/Shop.php(414): ShopCore->__construct('1') #4 /customers/a/b/0/website/httpd.www/config/config.inc.php(118): ShopCore::initialize() #5 /customers/a/b/0/website/httpd.www/index.php(27): require('/customers/a/b/...') #6 {main} thrown in /customers/a/b/0/website/httpd.www/src/Adapter/EntityMapper.php on line 99 Link to comment Share on other sites More sharing options...
jrgrafisk Posted November 8, 2021 Author Share Posted November 8, 2021 1 minute ago, pandorrah said: This just now happened at my webstore: Error 500: Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, Shop given in /customers/a/b/0/website/httpd.www/src/Adapter/EntityMapper.php:99 Stack trace: #0 /customers/a/b/0/website/httpd.www/src/Adapter/EntityMapper.php(99): array_key_exists('id_shop', Object(Shop)) #1 /customers/a/b/0/website/httpd.www/classes/ObjectModel.php(264): PrestaShop\PrestaShop\Adapter\EntityMapper->load('1', NULL, Object(Shop), Array, NULL, true) #2 /customers/a/b/0/website/httpd.www/classes/shop/Shop.php(128): ObjectModelCore->__construct('1', NULL, NULL) #3 /customers/a/b/0/website/httpd.www/classes/shop/Shop.php(414): ShopCore->__construct('1') #4 /customers/a/b/0/website/httpd.www/config/config.inc.php(118): ShopCore::initialize() #5 /customers/a/b/0/website/httpd.www/index.php(27): require('/customers/a/b/...') #6 {main} thrown in /customers/a/b/0/website/httpd.www/src/Adapter/EntityMapper.php on line 99 So, this seems to be some kind of update to a module that triggers it? I will just try to disable all non-core modules Link to comment Share on other sites More sharing options...
pandorrah Posted November 8, 2021 Share Posted November 8, 2021 Also reverted back to PHP 7.4, but no effect. The error remains. I will check all modules and folders about any updates and report back here. Link to comment Share on other sites More sharing options...
pandorrah Posted November 8, 2021 Share Posted November 8, 2021 @jrgrafisk is the website hosted at one.com? Link to comment Share on other sites More sharing options...
jrgrafisk Posted November 8, 2021 Author Share Posted November 8, 2021 2 minutes ago, pandorrah said: @jrgrafisk is the website hosted at one.com? It is Link to comment Share on other sites More sharing options...
pandorrah Posted November 8, 2021 Share Posted November 8, 2021 Then i guess the problem lies with them as i am hosted there aswell. I will contact them and let you know their answer. Site was working perfectly this morning. Link to comment Share on other sites More sharing options...
jrgrafisk Posted November 8, 2021 Author Share Posted November 8, 2021 1 minute ago, pandorrah said: Then i guess the problem lies with them as i am hosted there aswell. I will contact them and let you know their answer. Site was working perfectly this morning. I appreciate it. This naturally happens on my day off - on top of a cold. Life is great Link to comment Share on other sites More sharing options...
pandorrah Posted November 8, 2021 Share Posted November 8, 2021 No problem, we're in this together. I am first in line to get help, so we have to wait a few minutes. Link to comment Share on other sites More sharing options...
pandorrah Posted November 8, 2021 Share Posted November 8, 2021 Still on hold, but in line... 1 Link to comment Share on other sites More sharing options...
pandorrah Posted November 8, 2021 Share Posted November 8, 2021 one.com advises to revert to php 7.4 and wait 30 mins for it to have effect. i have done that, but i think the problem will remain... analyzing the error we both have, i have downloaded Prestashop 1.7.8.0 and copied the file > Src > Adapter > EntityMapper.php It seems that the array_key_exists() is deprecated and the new file from 1.7.8.0 has other syntaxis. I will wait and are online with one.com support.... Link to comment Share on other sites More sharing options...
pandorrah Posted November 8, 2021 Share Posted November 8, 2021 They are telling me they are doing security upgrades this morning on the servers, that could explain it. Link to comment Share on other sites More sharing options...
jrgrafisk Posted November 8, 2021 Author Share Posted November 8, 2021 We want no security, we want stability! Well, I hope they are on it then. I tried 7.4 too, and i'm currently digging thru the entitymapper as well Link to comment Share on other sites More sharing options...
pandorrah Posted November 8, 2021 Share Posted November 8, 2021 Reverting back to PHP 7.4 and waiting for at least 30 minutes does the job. Your website whould be working then again. It works for me. I am operational again. On a sidenote: i have upgraded last month from Prestashop 1.7.7.8 to 1.7.8.0, but there were some errors that couln'd be fixed then. So i reverted back to 1.7.7.8 and it is working as it should be. On the PHP side: a lot of big changes have been made in the new version, since 7.4. There are significant changes. I recommend to copy your site and make an upgrade offline from that copy (e.g. WAMP, XAMPP). Link to comment Share on other sites More sharing options...
pandorrah Posted November 8, 2021 Share Posted November 8, 2021 Did it work for you? Link to comment Share on other sites More sharing options...
jrgrafisk Posted November 8, 2021 Author Share Posted November 8, 2021 I'm partly done. I can access www.nettotruck.dk but nothing works on the site. I will try to enable modules one at a time... Link to comment Share on other sites More sharing options...
jrgrafisk Posted November 8, 2021 Author Share Posted November 8, 2021 A bit of messing about and things work again. Do I dare switch to php 8.0 again? Not right now Link to comment Share on other sites More sharing options...
pandorrah Posted November 8, 2021 Share Posted November 8, 2021 Same here. I wait for the bugs to be fixed in a while and then progress to the next stage with PS 1.7.8.0 and PHP 8.x Link to comment Share on other sites More sharing options...
JBW Posted November 8, 2021 Share Posted November 8, 2021 Prestashop is not compatible with PHP8 yet, stay on 7.4! After any PHP version change delete the cache by renaming /var/cache folder on FTP to /var/cache_old - it will regenerate automatically with next page call Link to comment Share on other sites More sharing options...
shresthabros Posted November 16, 2023 Share Posted November 16, 2023 I had same issue Entity Mapper issue was because of using PHP 8 if we downgrade to PHP7.3 Below then it will solve all that issue. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now