View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006286 | OXID eShop (all versions) | 4.09. SEO, SEO URL | public | 2015-12-11 15:59 | 2024-02-29 07:28 |
Reporter | avalue | Assigned To | |||
Priority | normal | Severity | tweak | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Product Version | 4.9.5 / 5.2.5 | ||||
Summary | 0006286: _prepareMetaDescription: Parameter sMeta never used | ||||
Description | I 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 Information | GitHub Commit: https://github.com/OXID-eSales/oxideshop_ce/commit/a5a80313132288646d1a2815f1b3bb53fd1f2d8c | ||||
Tags | SEO Rewrite | ||||
Theme | Not defined | ||||
Browser | Not defined | ||||
PHP Version | Not defined | ||||
Database Version | Not defined | ||||
|
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). |
|
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. |