View Issue Details

IDProjectCategoryView StatusLast Update
0003240OXID eShop (all versions)1.05. Userspublic2012-11-16 10:57
Reportergpayer Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
Product Version4.5.2 revision 38481 
Summary0003240: Logging in via Account view from details page results in a blank page
DescriptionThis 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
TagsNo tags attached.
ThemeBoth
BrowserAll
PHP Versionany
Database Versionany

Activities

svetlana

2011-09-14 09:43

reporter   ~0005205

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/

gpayer

2011-09-14 10:19

reporter   ~0005206

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.

arvydas_vapsva

2011-09-14 12:52

reporter   ~0005207

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.

gpayer

2011-09-15 15:08

reporter   ~0005224

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.

Linas Kukulskis

2012-11-16 10:57

reporter   ~0007879

reporter fix his problem.
the main idea of fix: how to add parameters to form or link for proper functionality in comments.