View Issue Details

IDProjectCategoryView StatusLast Update
0007065OXID eShop (all versions)2.4. Administer productspublic2023-11-15 15:41
Reportermf Assigned To 
PrioritylowSeverityfeatureReproducibilityalways
Status closedResolutionno change required 
Summary0007065: redirect if smarty code in article description and empty meta description
DescriptionIf you have maintained attributes for the product item and additionally include them in the longdesc via the attribute template, an error will occur if you have not set a "description text for meta tags" in the tab.

Longdesc:
[{include file="page/details/inc/attributes.tpl"}]

-> reported bei o.ramm (web-grips) who was not able to place a bug entry here as for too rigid spam protection options


Error message:

[2019-12-17 14:03:43] OXID Logger.ERROR: Function 'getAttributes' does not exist or is not accessible! (OxidEsales\Eshop\Application\Controller\FrontendController)
 ["[object] (OxidEsales\\Eshop\\Core\\Exception\\SystemComponentException(code: 0): Function 'getAttributes' does not exist or is not accessible! (OxidEsales\\Eshop\\Application\\Controller\\FrontendController)\n at /home/[user]/webseiten/shop/vendor/oxid-esales/oxideshop-ce/source/Core/Base.php:76)\n[stacktrace]\n#0 /home/[user]/webseiten/shop/source/tmp/smarty/741a9a249c1bbdcc3d505852ec274b13^%%05^050^05096B0C%%attributes.tpl.php(4): OxidEsales\\EshopCommunity\\Core\\Base->__call('getAttributes', Array)\n#1 /home/[user]/webseiten/shop/vendor/smarty/smarty/libs/Smarty.class.php(1876): include('/home/[user]/...')\n#2 /home/[user]/webseiten/shop/source/tmp/smarty/741a9a249c1bbdcc3d505852ec274b13^%%9E^9E8^9E87ACF6%%ox%3A073c1257cd78c5387e326476fde7b47500.php(29): Smarty->_smarty_include(Array)\n#3 /home/[user]/webseiten/shop/vendor/smarty/smarty/libs/Smarty.class.php(1270): include('/home/[user]/...')\n#4 /home/[user]/webseiten/shop/vendor/oxid-esales/oxideshop-ce/source/Core/UtilsView.php(250): Smarty->fetch('ox:073c1257cd78...')\n#5 /home/[user]/webseiten/shop/vendor/oxid-esales/oxideshop-ce/source/Application/Model/Article.php(2545): OxidEsales\\EshopCommunity\\Core\\UtilsView->parseThroughSmarty('<h2><span style...', '073c1257cd78c53...', Object(OxidEsales\\Eshop\\Application\\Controller\\FrontendController), true)\n#6 /home/[user]/webseiten/shop/vendor/oxid-esales/oxideshop-ce/source/Application/Controller/ArticleDetailsController.php(327): OxidEsales\\EshopCommunity\\Application\\Model\\Article->getLongDesc()\n#7 /home/[user]/webseiten/shop/vendor/oxid-esales/oxideshop-ce/source/Application/Controller/FrontendController.php(1097): OxidEsales\\EshopCommunity\\Application\\Controller\\ArticleDetailsController->_prepareMetaDescription(false)\n#8 /home/[user]/webseiten/shop/source/modules/oe/oetags/controllers/oetagsArticleDetailsController.php(237): OxidEsales\\EshopCommunity\\Application\\Controller\\FrontendController->getMetaDescription()\n#9 /home/[user]/webseiten/shop/source/tmp/smarty/741a9a249c1bbdcc3d505852ec274b13^%%90^90B^90B7B94A%%base.tpl.php(6): oetagsArticleDetailsController->getMetaDescription()\n#10 /home/[user]/webseiten/shop/vendor/smarty/smarty/libs/Smarty.class.php(1876): include('/home/[user]/...')\n#11 /home/[user]/webseiten/shop/source/tmp/smarty/741a9a249c1bbdcc3d505852ec274b13^%%36^366^366ECF91%%page.tpl.php(125): Smarty->_smarty_include(Array)\n#12 /home/[user]/webseiten/shop/vendor/smarty/smarty/libs/Smarty.class.php(1876): include('/home/[user]/...')\n#13 /home/[user]/webseiten/shop/source/tmp/smarty/741a9a249c1bbdcc3d505852ec274b13^%%08^08A^08ABD53A%%details.tpl.php(14): Smarty->_smarty_include(Array)\n#14 /home/[user]/webseiten/shop/vendor/smarty/smarty/libs/Smarty.class.php(1270): include('/home/[user]/...')\n#15 /home/[user]/webseiten/shop/vendor/oxid-esales/oxideshop-ce/source/Core/ShopControl.php(488): Smarty->fetch('page/details/de...', 'ox|0|0|0|0|ssl|...')\n#16 /home/[user]/webseiten/shop/vendor/oxid-esales/oxideshop-ce/source/Core/ShopControl.php(344): OxidEsales\\EshopCommunity\\Core\\ShopControl->_render(Object(oetagsArticleDetailsController))\n#17 /home/[user]/webseiten/shop/vendor/oxid-esales/oxideshop-ce/source/Core/ShopControl.php(276): OxidEsales\\EshopCommunity\\Core\\ShopControl->formOutput(Object(oetagsArticleDetailsController))\n#18 /home/[user]/webseiten/shop/vendor/oxid-esales/oxideshop-ce/source/Core/ShopControl.php(137): OxidEsales\\EshopCommunity\\Core\\ShopControl->_process('OxidEsales\\\\Esho...', NULL, NULL, NULL)\n#19 /home/[user]/webseiten/shop/vendor/oxid-esales/oxideshop-ce/source/Core/Oxid.php(26): OxidEsales\\EshopCommunity\\Core\\ShopControl->start()\n#20 /home/[user]/webseiten/shop/source/index.php(15): OxidEsales\\EshopCommunity\\Core\\Oxid::run()\n#21 /home/[user]/webseiten/shop/source/oxseo.php(28): require('/home/[user]/...')\n#22 {main}\n"] []
Steps To Reproduce1. Activate Smarty code interpretation in article description under performance settings
2. Add smarty code in an article (without meta data in SEO Tab) description: [{include file="page/details/inc/attributes.tpl"}]
3. open article in frontend leads to redirect
TagsNo tags attached.
ThemeNot defined
BrowserNot defined
PHP VersionNot defined
Database VersionNot defined

Activities

QA

2019-12-20 17:56

administrator   ~0013078

The reason for the redirect is, that the shop automatically fills an empty meta description field with the article description. It also interprets the smarty. But the FrontendController, which is responsible for filling the meta data, does not have the method to get the attribute data.

Possible solutions:
1. Fill meta data with content if attribute smarty code should be used in article description.
2. Add the smarty code into a template file instead inside article description like source/Application/views/flow/tpl/page/details/inc/fullproductinfo.tpl
3. Extend the FrontendController with a getAttributes method
4. Change the following method to change the behavior of auto filling empty meta data: \OxidEsales\EshopCommunity\Application\Controller\FrontendController::_getMetaFromContent

-MF