Welcome Guest, Not a member yet? Register   Sign In
C4 version 4.4.1 posts me a route problem
#1

hello devs

i come to you because C4 version 4.4.1 posts me a route problem, i explain:
CONFIG.
debian 12
php 8.3.11
ci4 version 4.4.1
apache 2.4

when launching the application the software executes a javascript script

<code>
//run email queue
$(document).ready(function () {
$.ajax({
type: 'POST',
url: MdsConfig.baseURL + '/Ajax/runEmailQueue',
data: setAjaxData({})
});
});
</code>
the url really exists OK

the routing is in static form

<code>
$postArray = [
//Ajax
'Ajax/runEmailQueue',
'Ajax/getBlogCategoriesByLang',
//Auth
'Auth/sendActivationEmailPost',
];

foreach ($postArray as $item) {
$array = explode('/', $item);
$routes->post($item, $array[0] . 'Controller::' . $array[1]);
</code>
the line url: MdsConfig.baseURL + '/Ajax/runEmailQueue', causes a 404 error

the other routing links also cause a 404 error example $routes->post('login-post', 'AuthController::loginPost');

what is the hardest, is that the application runs on a debian 12 workstation development machine and
on a debian 12 user workstation same problem on a debian 12 VPN server same crash

really thank you for those who can help me
Gabriel
Reply
#2

Can you post your routes
#php spark routes
Reply
#3

normal user on a terminal ,not as root works for me :

Code:
[andrew@darkstar ~]$ cd /srv/http/CI4-CMS
[andrew@darkstar CI4-CMS]$ php spark routes

CodeIgniter v4.5.5 Command Line Tool - Server Time: 2024-10-16 08:44:35 UTC+00:00

+--------+---------------------+------+------------------------------------------+----------------+---------------+
| Method | Route               | Name | Handler                                  | Before Filters | After Filters |
+--------+---------------------+------+------------------------------------------+----------------+---------------+
| GET    | resetPW             | »    | \App\Controllers\Setup::pwForm           | myfilter       |               |
| GET    | setUp               | »    | \App\Controllers\Setup::setUpForm        |                |
CMS CI4 A CMS system, runs out of the box written on top of CI4
Arch Book  CodeIgniter4 on Apache(pages 92-114) 
Reply




Theme © iAndrew 2016 - Forum software by © MyBB