View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0007662 | OXID eShop (all versions) | 4.09. SEO, SEO URL | public | 2024-06-06 01:38 | 2024-08-15 12:51 |
Reporter | suabo | Assigned To | |||
Priority | normal | Severity | major | Reproducibility | always |
Status | acknowledged | Resolution | open | ||
Platform | Desktop | OS | Ubuntu | OS Version | 22.04 |
Product Version | 6.5.4 | ||||
Summary | 0007662: SEO URLs of oxseohistory ignore oxtype | ||||
Description | In _decodeOldUrl() there is searched for old seo urls via ident. But if there is more items in the shop with the same ids and different oxtypes there is a problem, because oxseohistory don't holds the oxtype and there is only the object id and language which is used to get the new one. So you will maybe end up with a old content URL which is redirecting to a category or something else. I experienced this problem while using my own SEO objects and values in oxtype, having multiple views on the same db object with different models and SEO URLs. Wondering why the old URL of View B is redirected to View A. I think this Bug is there till the beginning of time but never have been discovered? | ||||
Steps To Reproduce | Have the same ids for multiple class objects like category and content. Be sure SEO-URLs are generated. Check which of the SEO URLs is returned first if you make a query on db to determinate which on to change to show the bug. Use Query from _getSeoUrl "select oxseourl, oxtype from oxseo where oxobjectid = :oxobjectid and oxlang = :oxlang and oxshopid = :oxshopid order by oxparams limit 1" Change SEO-URL of the object which is not returned in the query. Example: Category ID: 1 SEO: /Catagory-URL/ Content ID: 1 SEO: /Content-URL/ Query returns oxseourl="/Catagory-URL/" Change URL of content to /New-Content-URL/ If you now try to reach /Content-URL/ you will get redirected to /Category-URL/ instead of /New-Category-URL/ because of the lag of checking for oxtype. | ||||
Additional Information | You should add the oxtype to oxseohistory and also in _decodeOldUrl and _getSeoUrl() method to avoid this problem. | ||||
Tags | SEO Rewrite | ||||
Theme | Not defined | ||||
Browser | Not defined | ||||
PHP Version | Not defined | ||||
Database Version | Not defined | ||||
|
Had the same problem yesterday. A old category seo url was redirecting to an oxmanufacturer page because the id was the same. |
|
Reproduced. EE 7.1.0, demodata installed. Steps to reproduce: 1. Admin -> Customer Info -> CMS Pages -> active: yes, Title: "Blumentopf", Category: yes. 2. Frontend -> Click on the freshly created CMS page Blumentopf. 3. Admin -> Customer Info -> CMS Pages -> Blumentopf -> Change title to "Blumentopf-CMS". 4. Frontend -> Click on the CMS page Blumentopf-CMS. 5. Admin -> Administer Products -> Categories -> active: yes, Title: "Blumentopf" and add a product to the category (to see clearly wether you view a CMS page or category in the frontend). 6. Frontend -> Click on the category Blumentopf. You will redirected to the CMS page Blumentopf-CMS. 7. execute ./vendor/bin/oe-console o:c:c 8. Frontend-> Click on the category Blumentopf. You will see the category. But the main problem still exists: Sooner or later there are two SEO URLs in the oxseohistory table with the title "Blumentopf" and it won't be clear, which should be called: the category or the CMS page. -MK |