humhub-contrib / legal

2 stars 9 forks source link

back with browser button problem. #29

Closed tosintech-web closed 3 years ago

tosintech-web commented 3 years ago
  1. install legal tools module and enable it. Setting configuration of Terms and Conditions, Privacy policy.
  2. Go to login page ( https:// xxxxx.com/user/auth/login ). I can see my custom theme's login page.
  3. Go to see the link of Terms and conditions ( https:// xxxxx.com/legal/page/view?pageKey=terms ).
  4. "BACK" with browser back button.
  5. I can not see my custom theme's login page. It is humhub original page which is titled 'Join the network'.

It is strange. I think it should go back to custom theme's login page.

yurabakhtin commented 3 years ago

@luke- Yes, we have this issue because on first page loading by url https://xxxxx.com/user/auth/login we load it as normal page from user/views/auth/login.php, but when we press on the browser "BACK" button the page is loaded by AJAX from user/views/auth/login_modal.php.

The code is here https://github.com/humhub/humhub/blob/master/protected/humhub/modules/user/controllers/AuthController.php#L117-L121.

I have fixed this by prevent pjax for all footer links, probably it should be implemented separately for each link by pass some options param, but I don't find where the pages should be loaded by pajx, if you know please let me know.

Core PR https://github.com/humhub/humhub/pull/5063.

luke- commented 3 years ago

@yurabakhtin This should be sufficient. thank you.

Will be fixed with HumHub 1.8.3