Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: ResourceController inserts 0000-00-00 00:00:00 on empty string?
Post: RE: ResourceController inserts 0000-00-00 00:00:00...

Really?iRedds Wrote: (04-05-2022, 08:42 AM) -- There is no ResourceController class in CI4. Controllers do not work with the base. Where is the problem area code? -- Check this out: https://codei...
2,277 Views
7 Replies
04-05-2022, 09:11 AM
blaasvaer
    Thread: ResourceController inserts 0000-00-00 00:00:00 on empty string?
Post: RE: ResourceController inserts 0000-00-00 00:00:00...

Oh, of course, dumb me! WTF is dbforge? Did you actually read my post?
2,277 Views
7 Replies
04-05-2022, 02:46 AM
blaasvaer
    Thread: ResourceController inserts 0000-00-00 00:00:00 on empty string?
Post: ResourceController inserts 0000-00-00 00:00:00 on ...

I pass query data to the default update method on a ResourceController, but it inserts 0000-00-00 00:00:00 into the timestamp instead of the default NULL the database is set to use. Now, WHY does it ...
2,277 Views
7 Replies
04-05-2022, 01:12 AM
blaasvaer
    Thread: Log to terminal from Spark?
Post: Log to terminal from Spark?

Hi, I find the info on the Kint debugger pretty useless. So, does anyone know of a way to pipe output to the terminal for debugging a codeigniter 4 app? Just a simple 'echo "Hello World"'; would do ...
622 Views
0 Replies
04-01-2022, 04:35 AM
blaasvaer
    Thread: The framework needs the following extension(s) installed and loaded: intl.?
Post: RE: The framework needs the following extension(s)...

Well, according to my php.ini neither: ;extension=mysqli ;extension=intl is enabled. But I no longer get the first error, now I cannot connect to the database: "Unable to connect to the database...
24,938 Views
10 Replies
01-31-2022, 08:48 AM
blaasvaer
    Thread: The framework needs the following extension(s) installed and loaded: intl.?
Post: RE: The framework needs the following extension(s)...

It's localhost. And I'm having a complete nightmare figuring out which instance of PHP is running om my machine in relation to PHP SPARK. I have MAMP running all my WordPress projects, but this spec...
24,938 Views
10 Replies
01-30-2022, 05:35 PM
blaasvaer
    Thread: The framework needs the following extension(s) installed and loaded: intl.?
Post: The framework needs the following extension(s) ins...

I didn't touch a project for about six weeks ... and now, continuing work I'm met by this error: "Message: The framework needs the following extension(s) installed and loaded: intl." Now, What On Ea...
24,938 Views
10 Replies
01-30-2022, 08:11 AM
blaasvaer
    Thread: REST does not support PATCH!?
Post: RE: REST does not support PATCH!?

Yes, I did all the reading I could find. It didn't leave me that much wiser to be honest. What I'm basically struggling with is the issue of setting a datetime-local input to NULL, but when serializi...
2,193 Views
3 Replies
12-03-2021, 03:53 AM
blaasvaer
    Thread: How to pass NULL from datetime-local?
Post: How to pass NULL from datetime-local?

Now, we obviously cannot set the value of a datetime-local input type to null. So what we get is an empty string ... but HOW do I make a REST Resource in CI receive that empty string and set the datab...
852 Views
0 Replies
12-02-2021, 02:39 PM
blaasvaer
    Thread: REST does not support PATCH!?
Post: REST does not support PATCH!?

From the docs it seems that PATCH redirect to PUT (as well as PUT itself) ... as if PATCH by itself is not supported. Why is that? And how would I make it support it? I need different handling for th...
2,193 Views
3 Replies
11-29-2021, 01:40 PM
blaasvaer
    Thread: Extend RESTController BaseModel?
Post: Extend RESTController BaseModel?

I'm trying to add a method to the BaseModel used with a ResourceController, but I keep getting an Internal Server Error; so now, I'm trying to figure out if this is at all possible since I've tried EV...
666 Views
0 Replies
11-09-2021, 08:50 AM
blaasvaer
    Thread: Cannot serve index method by default?
Post: RE: Cannot serve index method by default?

OK, to answer myself in the future. I had renamed a folder inside the public folder to 'platform' to separate assets. And that kicked me! So CI obviously serve whatever /urlpath from the /public fol...
885 Views
1 Replies
10-21-2021, 05:04 AM
blaasvaer
    Thread: Cannot serve index method by default?
Post: Cannot serve index method by default?

How come I cannot serve the index method by default? I have a controller 'platform' (with an index method) ... when visiting http://localhost:8081/platform I get: Code: -- Not Found The requested ...
885 Views
1 Replies
10-21-2021, 03:57 AM
blaasvaer
    Thread: Get only specific fields using getFieldData?
Post: Get only specific fields using getFieldData?

I can get all "information_schema.columns" using: PHP Code: -- $this->db->getFieldData( $table ); -- But, how do I get only info on specific columns, like 'name' and 'type'. I'm looking for the equ...
680 Views
0 Replies
10-13-2021, 06:33 AM
blaasvaer
    Thread: Query return empty CSP object when wrapped?
Post: Query return empty CSP object when wrapped?

If I do this in my controller: PHP Code: -- return $this->response->setJSON($this->model->find($id)); -- I properly get the data I want as an object: Code: -- {     "id": "3",     "name"...
1,233 Views
1 Replies
10-13-2021, 12:38 AM
blaasvaer
    Thread: Cannot serve site from localhost subfolder using spark?
Post: Cannot serve site from localhost subfolder using s...

I've placed a CI website in a subfolder on my localhost (/Applications/MAMP/htdocs/website). From the root of the folder I run: Code: -- $ php serve spark --port 8081 -- And get this: Code: -- Cod...
913 Views
1 Replies
10-11-2021, 06:31 AM
blaasvaer
    Thread: Forbidden 403? CSRF!
Post: Forbidden 403? CSRF!

Hi, I've been creative and created a 'dynamic' API (http:// … //) which work great. My problem is, that when I try to add resources by POSTing (or update using PUT), I get a 403 forbidden. Now, acc...
742 Views
0 Replies
02-04-2021, 02:35 AM
blaasvaer
    Thread: JSON formatting in the browser (missing headers)?
Post: RE: JSON formatting in the browser (missing header...

Thanks, but that's just what I already did. This does NOT send a header of type json to the client. I had to do this for that to work: return $this->response->setJSON($this->model->find($id)); Now,...
1,702 Views
3 Replies
02-01-2021, 06:05 AM
blaasvaer
    Thread: JSON formatting in the browser (missing headers)?
Post: JSON formatting in the browser (missing headers)?

I'm responding from an API using this: Code: -- return $this->setResponseFormat('json')->respond(json_encode($response), 200); -- Now, I would 'expect' the proper headers would be set 'automagic...
1,702 Views
3 Replies
02-01-2021, 04:28 AM
blaasvaer
    Thread: Cannot login with CI4 after updating Chrome?
Post: RE: Cannot login with CI4 after updating Chrome?

Turned out I had to change the SameSite to Lax ... and remove Secure ... weird that it worked until the update.
2,286 Views
4 Replies
01-13-2021, 03:39 PM
blaasvaer

Theme © iAndrew 2016 - Forum software by © MyBB