View Issue Details

IDProjectCategoryView StatusLast Update
0007662OXID eShop (all versions)4.09. SEO, SEO URLpublic2024-10-15 11:35
Reportersuabo Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status acknowledgedResolutionopen 
PlatformDesktopOSUbuntuOS Version22.04
Product Version6.5.4 
Summary0007662: SEO URLs of oxseohistory ignore oxtype
DescriptionIn _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 ReproduceHave 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 InformationYou should add the oxtype to oxseohistory and also in _decodeOldUrl and _getSeoUrl() method to avoid this problem.
TagsSEO Rewrite
ThemeNot defined
BrowserNot defined
PHP VersionNot defined
Database VersionNot defined

Relationships

related to 0006895 confirmedHR Column OXTYPE missing in oxobject2group and misleading MySql comment 

Activities

bYemma

2024-06-06 11:13

reporter   ~0016969

Had the same problem yesterday. A old category seo url was redirecting to an oxmanufacturer page because the id was the same.

QA

2024-06-18 13:58

administrator   ~0017063

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