sethjohnson1 / conflist5

Conflist cakePHP5
1 stars 0 forks source link

fix curator cookie #9

Closed nilesjohnson closed 2 months ago

nilesjohnson commented 2 months ago

I made a simple controller and view, following these instructions but it's very broken :/

sethjohnson1 commented 2 months ago

Not sure if you already figured this out, but if you debug on the Controller then it interferes with the Request/Response objects, and the cookie won't write.

nilesjohnson commented 2 months ago

Lol, no I didn't know about the debug issue. After more fiddling, I figured out that the problem was the 'domain' entry, pulled from config. Removing that made the cookie work. Could be it failed silently because the domains didn't match; whatever, leaving that out is fine.

There are two remaining issues, both of which could be optional.

  1. I can redirect to index upon success, but the flash message doesn't show up; maybe that is separate? (maybe just css, or some configuration?)
  2. I can't access the function from [domain]/conferences/curator_cookie; it just redirects to the index. But if I go to [domain]/conferences/curator_cookie/anyargument, then that works. Maybe this is some conflict with the tags? As a lame workaround, I could just tell people to use a url with some extra item, like [domain]/conferences/curator_cookie/set or something. I guess this could go in a separate controller but, is that worth the trouble?
sethjohnson1 commented 2 months ago
  1. Yes, I noticed that, opened #12 for Flash messages
  2. Did you pull recent changes in? This works fine for me: https://test.mathmeetings.net/conferences/curator_cookie You might need to clear your cache? Redirects can be very persistent
nilesjohnson commented 2 months ago

Ok, I think we can call this one good enough!

I don't know why I had url problems before, but it's working fine for me now too.