View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002827 | OXID eShop (all versions) | 4.09. SEO, SEO URL | public | 2011-05-04 10:19 | 2012-12-10 13:34 |
Reporter | tjungcl | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | no change required | ||
Product Version | 4.5.0 revision 34568 | ||||
Fixed in Version | 4.5.3 revision 39087 | ||||
Summary | 0002827: oxseodecoder->decodeUrl accepts and decodes expired urls without notice | ||||
Description | connected to, but NOT duplicate of 0002783 - oxseodecoder->decodeUrl is called exactly once: in oxseodecoder->processSeoCall - if the given url is expired, decodeUrl decodes it anyway without doing anything special => on the first call of an expired url, no redirect happens. - now the product stores its new url into the oxseo table and moves the expired url to history. => on all following calls of the expired url, the redirect happens correctly. So in the long term it works all fine, but expired urls work fine and are still valid for one call of the expired url, although you would expect it to be invalid. As consequence search robots like the google crawler a informed about url-changes one scan later, which in many cases makes a difference of several days! | ||||
Steps To Reproduce | - Open /Gear/Fashion/For-Her/Jeans/Kuyichi-Jeans-ANNA.html - Open admin, rename ANNA to ANNA2 - Open /Gear/Fashion/For-Her/Jeans/Kuyichi-Jeans-ANNA.html again => it still works, but the url is NOT redirected to ...ANNA2.html - Open /Gear/Fashion/For-Her/Jeans/Kuyichi-Jeans-ANNA.html again => it still works, and now the url is correctly redirected to ...ANNA2.html | ||||
Additional Information | to fix, you could handle expired urls similar to oldurls in proccessUrl: - decodeUrl decodes no expired url, so returns false - next a new function _decodeExpiredUrl is called, which identifies the expired url, calcutates a new one and returns it - next the _decodeOldUrl function is called as it is now also, you could change public decodeUrl to protected _decodeUrl | ||||
Tags | No tags attached. | ||||
Theme | |||||
Browser | All | ||||
PHP Version | any | ||||
Database Version | any | ||||
related to | 0002783 | resolved | arvydas_vapsva | SEO decoder decodes history-url into expired-url |
|
to clarify what my suggestion would look like: The part i mean now is: // in case SEO url is actual if ( is_array( $aGet = $this->decodeUrl( $sParams ) ) ) { $_GET = array_merge( $aGet, $_GET ); oxLang::getInstance()->resetBaseLanguage(); } elseif ( ( $sRedirectUrl = $this->_decodeOldUrl( $sParams ) ) ) { // in case SEO url was changed - redirecting to new location oxUtils::getInstance()->redirect( $this->getConfig()->getShopURL().$sRedirectUrl, false ); It could instead be: // in case SEO url is actual (this time REALLY actual) if ( is_array( $aGet = $this->decodeUrl( $sParams ) ) ) { $_GET = array_merge( $aGet, $_GET ); oxLang::getInstance()->resetBaseLanguage(); } elseif ( ( $sRedirectUrl = $this->_decodeExpiredUrl( $sParams ) ) ) { // in case SEO url is expired - calculating and redirecting to new location oxUtils::getInstance()->redirect( $this->getConfig()->getShopURL().$sRedirectUrl, false ); } elseif ( ( $sRedirectUrl = $this->_decodeOldUrl( $sParams ) ) ) { // in case SEO url was changed - redirecting to new location oxUtils::getInstance()->redirect( $this->getConfig()->getShopURL().$sRedirectUrl, false ); |
|
are you familiar with '<link rel="canonical" href="...">' we use in shop? This solves such cases like this, as it always has actual SEO urls, even in such cases like you mention. So why should we add additional processing here - detecting object type, loading it etc?... |
|
yes i am, but didnt think of it that way. When calling an expired url, i expected (from a visitors point of view) to be redirected to the new url, which doesnt happen on the first visit. but i guess you are right on relying on the canonical url. |