Welcome Guest, Not a member yet? Register   Sign In
Upgrade from CI3 to CI4 - By Running them together
#4

After running CI3 and CI4 by changing constants and renaming functions for almost 3 weeks on productions below are the issues I faced so far.
1. In CI3, CSRF token is cookie based only where as in CI4 it has option of session / cookie. If CSRF token is turned on in both CI3 and CI4, it will fail as tokens are verified and changed before the request is passed on the controller from where I was calling CI4, so CI4 will invalidate the request.
The solution I came up with was to validate the CSRF token in CI3 and set a session variable, if the session variable is set the CI4 will skip validating CSRF token.
2. CI4 is setting _ci_previous_url in session, this is not available is CI3, so if some pages are loaded from CI3 and some from CI4, this value will be wrong.
The solution is to set _ci_previous_url in CI3 also
3. Session path and cache path different in CI3 and CI4.
If you need to access to same session then make the path same (both are configurable so should not be hard)
Reply


Messages In This Thread
RE: Upgrade from CI3 to CI4 - By Running them together - by mkganesh - 02-25-2024, 05:38 AM



Theme © iAndrew 2016 - Forum software by © MyBB