Template not rendered

Hi, in cake 4.5 I have the following problem. The related view template is not rendered. Here is the code:
In a template is a script block with this part:

		eventClick: function(event) {
                var deleteMsg = confirm("Do you really want to open?");
                if (deleteMsg) {
                        type: "POST",
                        url: '/eventAjax',
                        data: {
                            id: event.id,
                            type: 'show'
                        success: function(response) {

                            //calendar.fullCalendar('removeEvents', event.id);
                            displayMessage("Event opened Successfully");
			it is starting an action called ajax with case 'show'
			this redirect to function with standard name 'view'

            case 'show':
                return $this->redirect(['action' => 'view', $this->request->getData("id")]);

            case 'delete':
                $event = $this->Events->get($this->request->getData("id"));

the function view starts but the related template ‘view.php’ is not rendered.
All logs show the expected data and no error, just nothing happens

public function view($id = null) {
    $this->log('view:' . $id);
    $event = $this->Events->get($id, [
        'contain' => ['Users'],


You probaly need to adjust your controllers to use the new Content Type Negotiation mechanism

Or more specifically you will need to calll


if your view action is only used for Ajax purposes.

Even though it confuses me why you have $this->viewBuilder()->setLayout('default'); in there…

also see here