Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: Auth Shield and multilanguage
Post: RE: Auth Shield and multilanguage

There were two points I was making: 1. To modify the session use the helper You did that: session()->set('locale', $this->request->getLocale()); However, because you initially wrote: $this->ses...
900 Views
6 Replies
Yesterday, 09:01 AM
grimpirate
    Thread: Codigniter 4.6.1 not loading config files based on environment
Post: RE: Codigniter 4.6.1 not loading config files base...

My CodeIgniter setup is as follows: Code: -- master/ app/ public/ .env spark writable/ vendor/ composer.json composer.lock -- To reproduce your scenario as easily as possible I create an...
4,520 Views
16 Replies
06-18-2025, 11:36 PM
grimpirate
    Thread: query builder updateBatch behavior on 4.6.x
Post: RE: query builder updateBatch behavior on 4.6.x

Had the same problem a while back (https://forum.codeigniter.com/showthread.php?tid=88851). It's apparently a feature.
469 Views
2 Replies
06-11-2025, 08:43 AM
grimpirate
    Thread: Auth Shield and multilanguage
Post: RE: Auth Shield and multilanguage

I'm seeing more questions about multilanguage and people using sessions to mess about with them. I want to point out that there is never a need to check if the session has been initialized. By calling...
900 Views
6 Replies
06-10-2025, 03:03 PM
grimpirate
    Thread: Call to a member function get() on null Error
Post: RE: Call to a member function get() on null Error

If what you want is a dropdown that shows values in the language you're using here is some sample code: PHP Code: --
976 Views
3 Replies
06-08-2025, 06:03 PM
grimpirate
    Thread: Call to a member function get() on null Error
Post: RE: Call to a member function get() on null Error

To quote the documentation Initializing a Session (https://codeigniter4.github.io/userguide/libraries/sessions.html#initializing-a-session): Quote: -- Sessions will typically run globally with eac...
976 Views
3 Replies
06-07-2025, 03:02 PM
grimpirate
    Thread: How to Integrate Bootstrap or Tailwind CSS with CodeIgniter
Post: RE: How to Integrate Bootstrap or Tailwind CSS wit...

From the docs: Asset Dependencies Example (https://codeigniter4.github.io/userguide/libraries/publisher.html#asset-dependencies-example).
1,519 Views
3 Replies
06-05-2025, 01:23 PM
grimpirate
    Thread: Codigniter 4.6.1 not loading config files based on environment
Post: RE: Codigniter 4.6.1 not loading config files base...

What you're describing sounds more and more like a combination of Running Multiple Applications with one CodeIgniter Installation (https://codeigniter.com/user_guide/general/managing_apps.html#running...
4,520 Views
16 Replies
06-04-2025, 12:02 PM
grimpirate
    Thread: external request for a file gives 404
Post: RE: external request for a file gives 404

Try the inline download (https://codeigniter4.github.io/userguide/outgoing/response.html#open-file-in-browser) method instead of creating your own response and see if that works for you. PHP Code: -...
14,914 Views
7 Replies
05-27-2025, 10:17 AM
grimpirate
    Thread: Codigniter 4.6.1 not loading config files based on environment
Post: RE: Codigniter 4.6.1 not loading config files base...

You can create a Configuration class and use its properties, but it won't be loaded based on the environment. You'd have to figure out which environment is being used to achieve a similar result to wh...
4,520 Views
16 Replies
05-26-2025, 10:38 PM
grimpirate
    Thread: forge->addColumn
Post: RE: forge->addColumn

I'm not understanding the majority of what your code does, but here is what it looks like in the simplest form to do what I think you're trying to achieve (try it and report back): PHP Code: -- $thi...
1,054 Views
2 Replies
05-21-2025, 12:07 PM
grimpirate
    Thread: Setting baseURL in Registrar not working
Post: RE: Setting baseURL in Registrar not working

If it's never invoked how did you get the fatal error that is being thrown? The error is saying that you defined your baseURL as '/' in Config/App.php. Which is why the application fails. Your namespa...
3,766 Views
9 Replies
05-21-2025, 10:01 AM
grimpirate
    Thread: Validation Rules: Valid email, but allow null?
Post: RE: Validation Rules: Valid email, but allow null?

Rules for General Use (https://codeigniter4.github.io/userguide/libraries/validation.html#rules-for-general-use).
1,486 Views
3 Replies
05-19-2025, 09:28 PM
grimpirate
    Thread: hot-reload side effects seem to be clobbering my app
Post: RE: hot-reload side effects seem to be clobbering ...

I've updated the URL (should resolve the error that was displayed). What mechanism are you using for login/logout? Is this something you coded?
3,683 Views
10 Replies
05-16-2025, 03:31 PM
grimpirate
    Thread: Setting baseURL in Registrar not working
Post: RE: Setting baseURL in Registrar not working

Unable to reproduce your error, here is a live example (https://phpsandbox.io/e/x/xaoyh?theme=dark&showExplorer=yes). The code for app/Config/Registrar.php PHP Code: --
3,766 Views
9 Replies
05-15-2025, 02:20 PM
grimpirate
    Thread: hot-reload side effects seem to be clobbering my app
Post: RE: hot-reload side effects seem to be clobbering ...

Can we assume you're using Shield? If so, have you changed anything from the default configuration? Shield automatically redirects you to the login page once you log out as seen here (https://github.c...
3,683 Views
10 Replies
05-15-2025, 12:35 PM
grimpirate
    Thread: my controller fails to find helper function
Post: RE: my controller fails to find helper function

Post BaseController.php and myvalidate_helper.php source. Is myvalidate_helper.php located in app/Helpers/myvalidate_helper.php?
13,570 Views
12 Replies
05-07-2025, 11:49 AM
grimpirate
    Thread: my controller fails to find helper function
Post: RE: my controller fails to find helper function

Your  helper is called myvalidate_helper, but the function you define inside it (I'm assuming) is named is_valid_level. There is no myvalidate function. There was no need to change your ci3 code. If y...
13,570 Views
12 Replies
05-07-2025, 07:25 AM
grimpirate
    Thread: Set session expiration time based on user role in CodeIgniter 4
Post: RE: Set session expiration time based on user role...

Create an implicit registrar (https://codeigniter.com/user_guide/general/configuration.html#implicit-registrars). Apply your logic to determine expiration time and return the updated expiration value....
1,709 Views
4 Replies
05-06-2025, 02:46 PM
grimpirate
    Thread: Access of env-vars in Constants.php
Post: RE: Access of env-vars in Constants.php

@"sevmusic" I copied your code on a fresh install of CodeIgniter and added dd(ENVI); to the default Home Controller and it showed the appropriate value. You've done something else that isn't working c...
6,238 Views
7 Replies
05-02-2025, 01:27 PM
grimpirate

Theme © iAndrew 2016 - Forum software by © MyBB