Welcome Guest, Not a member yet? Register   Sign In
v4.4.8 Bug Fix Released
#1

We have released v4.4.8 bug fix.

This would be the last version of 4.4.x and the last version to support PHP 7.4.

If you still use PHP 7.4 that is not supported by the PHP Group, we strongly recommend to upgrade to PHP 8.1 or later immediately.

Very soon we will release v4.5.0, which requires PHP 8.1 or later.

This release has one breaking change. Most users will not be affected, but please check the changelog.

ChangeLog: https://codeigniter4.github.io/userguide...4.4.8.html
Upgrading Guide: https://codeigniter4.github.io/userguide...e_448.html

Note: Unfortunately now the User Guide on the official site is not yet updated due to the deployment trouble.
Reply
#2

(This post was last modified: 04-06-2024, 11:14 PM by ozornick.)

Thank you, kenjis.
I just have a question about exceptions. Why do I need a separate CodeIgniter\API\ResponseTrait? I see that it is needed for the API (json, xml) But it is also used for PageNotFoundException. Therefore, the POST (application/x-www-form-urlencoded) request gives me JSON instead of HTML. 
Is there a way to fix this except as a custom handler?
See  https://github.com/codeigniter4/CodeIgni...8C3-L78C82
Simple CI 4 project for beginners codeigniter-expenses
Reply
#3

Thank you CodeIgniter 4 Development Team.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#4

@ozornick I don't get what you say.

ResponseTrait is for API response. If it is a normal HTML page, we don't need to use it.
So it is separated.

> Therefore, the POST (application/x-www-form-urlencoded) request gives me JSON instead of HTML.

Why?
Reply
#5

I use PageNotFound for HTMX. HTML is cirrect response
Simple CI 4 project for beginners codeigniter-expenses
Reply
#6

@ozornick I don't know your code and situation.
So if you think there is a bug, please send a detailed bug report on GitHub.
Reply
#7

I don't know if this is a bug.

The situation is simple: I send an HTMX POST request with Accept "form data"(Not html). For a 404 error, it produces a JSON response along with tracing.

I assumed there would be HTML. But for some reason the 404 handler has methods for the API. 
That's the question
Simple CI 4 project for beginners codeigniter-expenses
Reply
#8

@ozornick Okay, please go to https://forum.codeigniter.com/forumdisplay.php?fid=19
Also, can you show the request headers of the HTMX request?
Reply




Theme © iAndrew 2016 - Forum software by © MyBB