Recently Browsing 0 members
No registered users viewing this page.
addHookBefore('Session::redirect', ...) not working if template-settings-based PW redirects are usedBy theoretic
Hi guys and ladies! And thanks for Processwire!
It appears i've got an interesting issue concerning the template-settings-based PW redirects dealing with access control. Any PW template has some access control options i.e. "Login redirect URL or page ID to render". If this option is used for a page having a template with this option filled, a redirect will occur if user is not logged in and/or has insufficient access rights.
I like to hook PW events. In one of my current projects i decided to write an addHookBefore('Session::redirect', ...) which should store the page we are being redirected from. With "regular" redirects like $session->redirect('/somewhere/') this hook works like a charm. But it was strange to see that it doesn't work with the template-settings-based redirect.
I'm too dumb to dive deep inside PW and to examine the whole PW session mechanism. But it could be rather logical if ANY redirect ( no matter template-settings-based or using $session->redirect() ) could be hooked in the same manner.
Okay okay i can forget about template-settings-based redirect and write my own. Just a couple of lines of code, and it works. But it's less elegant than hooking the template-settings-based redirects.
So am i missing something? It this behavior a bug, or is it intended by PW team? Thanks in advance for any comment!
Iam working on a new Admin Theme, based on AdminThemeReno, which I would like to release for the public soon.
Now I want to style the login page to fit the look and feel of the backend.
After some research, I found out that I have to set the "$config->defaultAdminTheme = 'AdminThemeName' " inside my site config.php file to load all the styles from my admin theme on the login page instead of the default ones.
Is it possible to set this via api from my Admin Theme settings, without the need of editing the config file?
Hi. I'm currently stuck at the login page in my project. Once I enter my admin username and my password and press login, nothing happens. The page just reloads. However, the URL changes from http://myipaddress/processwire to http://myipaddress/processwire/?login=1. I've checked all of my server settings, and to my knowledge, all seems to be fine there. I don't know where to go from here.. Thanks in advance!
I have a client who is reporting that in the last couple of days they can no longer login to their site with their normal browser (Chrome). Using another browser or an incognito window works.
I've tried logging into the site using the same login details in my usual browser (Firefox) and have had no problems.
The site is a membership site and today other members are reporting the same problem.
The site is running 3.0.148 and has the session handler DB and login throttle modules installed. It was recently upgraded to 3.x from 2.x. But no changes have been made to the site between the time when they were able to login OK and when the problem started happening.
The Minimal Site works fine, but if I try to login as admin, I have no idea what the credentials are.
I did not do the "install" process myself. The OVA came with everything set up, but there's no mention of the PW admin credentials being set to some initial value.
Wondering if anyone else has tried the Bitnami OVA and if there's a simple answer.