View Issue Details

IDProjectCategoryView StatusLast Update
0007236OXID eShop (all versions)1.01. Products (product, categories, manufacturer, promotions etc.)public2021-10-21 14:13
ReporterAlex Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status acknowledgedResolutionopen 
Product Version6.3.0 
Summary0007236: Fatal error if getMasterPicturePath returns false due to missing image
DescriptionThe method

OxidEsales\EshopCommunity\Core\Config::getMasterPicturePath

returns false if no image was found on the server. This occurs if there is a path in the database, but the file is not present in the filesystem anymore.

In template productmain.tpl it can lead to an fatal error and therefore the eShop displays the maintenance mode. This is due to the modifier "|@getimagesize", which only accepts strings and can not handle any boolean value.

See: https://github.com/OXID-eSales/wave-theme/blob/016ec6ff743bda9439ed0bda9477c80afc126853/tpl/page/details/inc/productmain.tpl#L71

The exception getting thrown looks like this:
 
[2021-04-28 17:37:10] OXID Logger.ERROR: Path cannot be empty ["[object] (ValueError(code: 0): Path cannot be empty at /app/source/tmp/smarty/f401dafc00d4fdf2d49e1d46f6f6d09e^%%5E^5E9^5E9B9D5B%%productmain.tpl.php:100)\n[stacktrace]\n#0 /app/source/tmp/smarty/f401dafc00d4fdf2d49e1d46f6f6d09e^%%5E^5E9^5E9B9D5B%%productmain.tpl.php(100): getimagesize('')\n#1 /app/vendor/smarty/smarty/libs/Smarty.class.php(1876): include('/app/source/tmp...')\n#2 /app/source/tmp/smarty/f401dafc00d4fdf2d49e1d46f6f6d09e^%%A5^A59^A595DDB8%%fullproductinfo.tpl.php(7): Smarty->_smarty_include(Array)\n#3 /app/vendor/smarty/smarty/libs/Smarty.class.php(1876): include('/app/source/tmp...')\n#4 /app/source/tmp/smarty/f401dafc00d4fdf2d49e1d46f6f6d09e^%%08^08A^08ABD53A%%details.tpl.php(69): Smarty->_smarty_include(Array)\n#5 /app/vendor/smarty/smarty/libs/Smarty.class.php(1876): include('/app/source/tmp...')\n#6 /app/source/tmp/smarty/f401dafc00d4fdf2d49e1d46f6f6d09e^%%79^790^7907FF72%%details.tpl.php(6): Smarty->_smarty_include(Array)\n#7 /app/vendor/smarty/smarty/libs/Smarty.class.php(1270): include('/app/source/tmp...')\n#8 /app/vendor/oxid-esales/oxideshop-ce/source/Internal/Framework/Smarty/Legacy/LegacySmartyEngine.php(66): Smarty->fetch('widget/product/...', 'ox|http://ottof...')\n#9 /app/vendor/oxid-esales/oxideshop-ce/source/Internal/Framework/Templating/TemplateRenderer.php(35): OxidEsales\\EshopCommunity\\Internal\\Framework\\Smarty\\Legacy\\LegacySmartyEngine->render('widget/product/...', Array)\n#10 /app/vendor/oxid-esales/oxideshop-ce/source/Core/ShopControl.php(509): OxidEsales\\EshopCommunity\\Internal\\Framework\\Templating\\TemplateRenderer->renderTemplate('widget/product/...', Array)\n#11 /app/vendor/oxid-esales/oxideshop-ee/Core/ShopControl.php(209): OxidEsales\\EshopCommunity\\Core\\ShopControl->_render(Object(OxidEsales\\Eshop\\Application\\Component\\Widget\\ArticleDetails))\n#12 /app/vendor/oxid-esales/oxideshop-ce/source/Core/ShopControl.php(359): OxidEsales\\EshopEnterprise\\Core\\ShopControl->_render(Object(OxidEsales\\Eshop\\Application\\Component\\Widget\\ArticleDetails))\n#13 /app/vendor/oxid-esales/oxideshop-ee/Core/ShopControl.php(98): OxidEsales\\EshopCommunity\\Core\\ShopControl->formOutput(Object(OxidEsales\\Eshop\\Application\\Component\\Widget\\ArticleDetails))\n#14 /app/vendor/oxid-esales/oxideshop-ce/source/Core/ShopControl.php(282): OxidEsales\\EshopEnterprise\\Core\\ShopControl->formOutput(Object(OxidEsales\\Eshop\\Application\\Component\\Widget\\ArticleDetails))\n#15 /app/vendor/oxid-esales/oxideshop-ce/source/Core/ShopControl.php(142): OxidEsales\\EshopCommunity\\Core\\ShopControl->_process('OxidEsales\\\\Esho...', NULL, Array, Array)\n#16 /app/vendor/oxid-esales/oxideshop-ce/source/Core/WidgetControl.php(65): OxidEsales\\EshopCommunity\\Core\\ShopControl->start('oxwarticledetai...', NULL, Array, Array)\n#17 /app/vendor/oxid-esales/oxideshop-ce/source/Core/Smarty/Plugin/function.oxid_include_widget.php(32): OxidEsales\\EshopCommunity\\Core\\WidgetControl->start('oxwarticledetai...', NULL, Array, Array)\n#18 /app/source/tmp/smarty/f401dafc00d4fdf2d49e1d46f6f6d09e^%%08^08A^08ABD53A%%details.tpl.php(10): smarty_function_oxid_include_widget(Array, Object(Smarty))\n#19 /app/vendor/smarty/smarty/libs/Smarty.class.php(1270): include('/app/source/tmp...')\n#20 /app/vendor/oxid-esales/oxideshop-ce/source/Internal/Framework/Smarty/Legacy/LegacySmartyEngine.php(66): Smarty->fetch('page/details/de...', 'ox|http://ottof...')\n#21 /app/vendor/oxid-esales/oxideshop-ce/source/Internal/Framework/Templating/TemplateRenderer.php(35): OxidEsales\\EshopCommunity\\Internal\\Framework\\Smarty\\Legacy\\LegacySmartyEngine->render('page/details/de...', Array)\n#22 /app/vendor/oxid-esales/oxideshop-ce/source/Core/ShopControl.php(509): OxidEsales\\EshopCommunity\\Internal\\Framework\\Templating\\TemplateRenderer->renderTemplate('page/details/de...', Array)\n#23 /app/vendor/oxid-esales/oxideshop-ee/Core/ShopControl.php(209): OxidEsales\\EshopCommunity\\Core\\ShopControl->_render(Object(OxidEsales\\Eshop\\Application\\Controller\\ArticleDetailsController))\n#24 /app/vendor/oxid-esales/oxideshop-ce/source/Core/ShopControl.php(359): OxidEsales\\EshopEnterprise\\Core\\ShopControl->_render(Object(OxidEsales\\Eshop\\Application\\Controller\\ArticleDetailsController))\n#25 /app/vendor/oxid-esales/oxideshop-ee/Core/ShopControl.php(98): OxidEsales\\EshopCommunity\\Core\\ShopControl->formOutput(Object(OxidEsales\\Eshop\\Application\\Controller\\ArticleDetailsController))\n#26 /app/vendor/oxid-esales/oxideshop-ce/source/Core/ShopControl.php(282): OxidEsales\\EshopEnterprise\\Core\\ShopControl->formOutput(Object(OxidEsales\\Eshop\\Application\\Controller\\ArticleDetailsController))\n#27 /app/vendor/oxid-esales/oxideshop-ce/source/Core/ShopControl.php(142): OxidEsales\\EshopCommunity\\Core\\ShopControl->_process('OxidEsales\\\\Esho...', NULL, NULL, NULL)\n#28 /app/source/modules/orcamultimedia/orcamultimedia_cxmlpunchout/Core/ShopControl.php(28): OxidEsales\\EshopCommunity\\Core\\ShopControl->start()\n#29 /app/source/modules/orcamultimedia/orcamultimedia_oci/Core/ShopControl.php(28): Orcamultimedia\\Cxmlpunchout\\Core\\ShopControl->start()\n#30 /app/vendor/oxid-esales/oxideshop-ce/source/Core/Oxid.php(27): Orcamultimedia\\Ocipunchout\\Core\\ShopControl->start()\n#31 /app/source/index.php(16): OxidEsales\\EshopCommunity\\Core\\Oxid::run()\n#32 /app/source/oxseo.php(29): require('/app/source/ind...')\n#33 {main}\n"] []
Steps To Reproduce- Search or create a product with at least two images.
- Afterwards delete the images on the filesystem in corresponding master / generated directories.
- Open the frontend and navigate to the product.
- Maintenance mode will be displayed and exception is thrown.
Additional Information- Error only occurs with eShop 6.3.0 + PHP 8.0.
- Error occurs in Wave and Flow theme.
TagsNo tags attached.
ThemeAll
BrowserAll
PHP VersionOther
Database VersionMySQL 5.7

Relationships

related to 0007281 resolvedvilma_liorensaityte morepics.tpl & altimageurl 

Activities

QA

2021-04-29 15:21

administrator   ~0013432

Thanks for your report. The issue was reproducable with PHP 8.0. It was not reproducable with PHP 7.4. If you've gotten other results, please provide it to us.

Two other things I have to tell:
- The Bugtracker is english only. Therefore, please provide the information in english next time. This time we translated it.
- Please do not copy&paste any information from Support e-mails into the public Bugtracker. We deleted the ticket contents.

[sp]

Alex

2021-04-29 15:24

reporter   ~0013433

Thanks for the information.

This is correct - the error just appeared after upgrading from php7.4 to 8.0.3