Open ediewoelfle opened 5 years ago
Have you found a fix for this yet?
I think all the query stuff in your output is ok. FinePrint is loading the user Account (id 6), then finding the privacy and terms contracts, then looking for signatures for those contracts for user 6. Then it probably isn't finding signatures which is why it 302 redirects to the new signature page.
The broken web page is probably from the last GET request is returning a 401 status (unauthorized). That in turn is likely due to this line from your fine print config:
config.authenticate_user_proc = lambda { |user| !user.nil? || head(:unauthorized) }
user
is likely nil
, which will give a 401 head response. (You could also change the head(:unauthorized)
to do something like redirect_to my_special_path
.) The user
field should be coming from this other line in your fine print config:
config.current_user_proc = lambda { current_user }
i.e. from current_user
. I'd recommend putting a debugger breakpoint in these lambdas to see if the value of current_user
and later user
are valid, and if not, then you can move in the direction of figuring out why they are not. You can also poke around in the console in the middle of this flow to see if there are signatures in the database.
When I create a new account (using devise), I am greeted with a broken webpage and the following error.
If I attempt to login in another account, I am able to see my contracts, however, when I accept them, it reminds me that I have already agreed and won't let me proceed. The only thing that gets me through is clearing my cache.
FinePrint is being used for my Privacy Policy and Terms. I require users to have "signed" these prior to entering into the dashboard:
dashboard_controller.rb
fine_print.rb
Here are my two contracts on my local:
Is anyone else getting this issue or have a work-around?