View Issue Details

IDProjectCategoryView StatusLast Update
0006286OXID eShop (all versions)4.09. SEO, SEO URLpublic2024-02-29 07:28
Reporteravalue Assigned To 
PrioritynormalSeveritytweakReproducibilityalways
Status closedResolutionno change required 
Product Version4.9.5 / 5.2.5 
Summary0006286: _prepareMetaDescription: Parameter sMeta never used
DescriptionI am writing a custom SEO module. The method "_prepareMetaDescription" in Class "aList" overwrites the base method defined in "oxUBase".

In aList it has the sMeta Parameter as first parameter but does nothing with it. So it is impossible to set a custom meta description and use the _prepareMetaDescription function for it. In oxUBase it's correct.

Also in oxUBase function "getMetaDescription" the function _prepareMetaDescription is actually called with an argument $sDescription – but this will never work, as described above.

I changed the function in my fork of OXID eShop on Github, so you better understand the problem. The code is tested in EE 5.2.5 and allows custom meta description as well as the usual behaviour:

https://github.com/OXID-eSales/oxideshop_ce/commit/a5a80313132288646d1a2815f1b3bb53fd1f2d8c
Additional InformationGitHub Commit: https://github.com/OXID-eSales/oxideshop_ce/commit/a5a80313132288646d1a2815f1b3bb53fd1f2d8c
TagsSEO Rewrite
ThemeNot defined
BrowserNot defined
PHP VersionNot defined
Database VersionNot defined

Activities

michael_keiluweit

2015-12-14 09:45

administrator   ~0011374

The reporter is right.
But since the method aList::_prepareMetaDescription is never used, I assume that it can be removed anyway. The class aList uses each time the method _prepareMetaDescription from the class oxUBase, because the callings are made with they keyword parent (parent::_prepareMetaDescription).

SvenBrunk

2024-02-29 07:28

administrator   ~0016327

While the classes are now designated source/Application/Controller/ArticleListController.php and source/Application/Controller/FrontendController.php the assumptions in the ticket are still invalid:

The parameter $sMeta needs to be in ArticleListController because it is a subclass of FrontendController. So you can't just change the signature of the method.

The rest of the code is intentional and can always be overridden by you. If you want, you can override it by just replacing it by the original method.
We will have a look at this code in the SEO Rewrite anyway and see if the intentions still hold, but until then it works as designed.