View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003240 | OXID eShop (all versions) | 1.05. Users | public | 2011-09-12 12:29 | 2012-11-16 10:57 |
Reporter | gpayer | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | no change required | ||
Product Version | 4.5.2 revision 38481 | ||||
Summary | 0003240: Logging in via Account view from details page results in a blank page | ||||
Description | This only happens if you have a "Login"-Link somewhere which leads to the account page. If you login there the navigation parameters included in the link to Account are used to redirect back to the page one came from. The bug is in the Details view, it doesn't override getNavigationParams to include the mandatory "anid" parameter. Therefore the Details view bails out but can't redirect to the start page, because "redirected" is already 1, as the Account view already did a redirect. | ||||
Steps To Reproduce | * Go to a details page * Click "Login" in header * login => blank page | ||||
Tags | No tags attached. | ||||
Theme | Both | ||||
Browser | All | ||||
PHP Version | any | ||||
Database Version | any | ||||
|
Reminder sent to: gpayer Hi, We can not to reproduce this issue. Maybe do you have installed some Modules? Could you please try to reproduce this on our demo shops? http://demoshop.oxid-esales.com/community-edition/ http://demoshop.oxid-esales.com/enterprise-edition/ http://demoshop.oxid-esales.com/professional-edition/ |
|
Hi, you can't reproduce really that in the demo shop, because the source code kind of pretends to offer that feature while logged in (the link around your name, next to "hello" and "logout"), but somehow the html code produced does not add any navigation parameters. Consider having this: [{ oxgetseourl ident=$oViewConf->getSelfLink()|cat:"cl=account" params="sourcecl="|cat:$oViewConf->getActiveClassName()|cat:$oViewConf->getNavUrlParams()} It sends you to a login page and after logging in you are sent back to the page you came from. Using "sourcecl" and getNavUrlParams ensures that. The bug is that in class Details getNavigationParams "anid" is NOT added to the list of navigation params! Therefor it doesn't work with the details page. And this is a bug in and off itself, it doesn't matter that it's not used in the demo shop this way. Logging in this way is done in many shops, we have two now where this bug occurs. Fortunately for us I have a bugfix. |
|
oxViewConfig::getNavUrlParams() purpose is to pass active category,/manufacturer/list type/search parameters or so, it has no relation to product information. Login/logout usually uses forms and issue does not appear due to checks: [{if $oView->getArticleId()}] <input type="hidden" name="aid" value="[{$oView->getArticleId()}]"> [{/if}] [{if $oView->getProduct()}] [{assign var="product" value=$oView->getProduct() }] <input type="hidden" name="anid" value="[{ $product->oxarticles__oxnid->value }]"> [{/if}] So in your custom case please add required parameters according given example. |
|
I solved this problem by overriding oxDetails::getNavigationParams(), this way the template code snippet I presented in note 5206 works everywhere. In my opinion expanding getNavigationParams to return a reasonable subset of the state of a view is a nice and useful feature. |
|
reporter fix his problem. the main idea of fix: how to add parameters to form or link for proper functionality in comments. |