Error / Shield 1.0.3 + Ci 4.5.1 |
Hi everyone,
I followed the documentation proceeding to the installation running the composer command and the php spark setup. I can see the expected files and routes have been added to my application, but when I access /register or /login, I get this error: Code: Call to undefined function CodeIgniter\Shield\Authentication\Authenticators\setting() Am I missing something? or running into a bug? @kenjis I know you are working actively on this, thanks I don't want to immediately raise an issue if that's not one, but rather a dumb thing on my end, but let me know if I should
I don't know why you get the error,
but do step 2 in Manual Setup: https://shield.codeigniter.com/getting_s...nual-setup The error message is "Call to undefined function", that means you call undefined function. So all you need to do is load the function before calling.
Thanks, that was it. For some reason the autoload file was not updated during the installation while all the other ones were.
I could understand the message, just not what to do to load it. Did not think of looking at the helpers. Should i try to reproduce it? My understanding is that the automatic installation was suppose to also take care of the autoload file. I saw no error in the installation logs. But i am happy to explore the “why” this happened.
Yes, the setup command should add the helpers to the configuration file
or raise an error if it fails to add. (04-27-2024, 01:46 AM)kenjis Wrote: Yes, the setup command should add the helpers to the configuration file So I saw in my install logs that the message for the autoload update was "Autoload Setup: Everything is fine." rather than "Updated: APPPATH/Config/Autoload.php". I can reproduce the behaviour easily: I had already some helpers loaded in my autoload file. Code: # if autoload.php has no helper loaded, no problem during install, setting and auth are added Looks like an unexpected behaviour?
I've confirmed the bug, and sent a PR to fix it. https://github.com/codeigniter4/shield/pull/1110
|
Welcome Guest, Not a member yet? Register Sign In |