<f:link.action> fails to render when not cached, but works from cache

Couldn’t find any info on where to report bugs, so I do it here.
I’m using neos/flow 8.3.14, typo3fluid/fluid 2.7.4, PHP 8.4.4.

----- controller

<?php
namespace App\Local\Controller;

/*
 * This file is part of the App.Local package.
 */

use Neos\Flow\Annotations as Flow;
use Neos\Flow\Mvc\Controller\ActionController;

class StandardController extends ActionController
{
    /**
     * @return void
     */
    public function indexAction(array $arg = [])
    {
    }
}

----- template

<f:cache.disable />
<f:layout name="Default" />

<f:section name="Title">Index view of Standard controller</f:section>

<f:section name="Content">
    <f:link.action action="index" arguments="{arguments}">Link</f:link.action>
</f:section>

----- error

# Neos\Flow\Mvc\Routing\UriBuilder_Original::uriFor(): Argument #2 ($controllerArguments) must be of type array, null given, called in /var/www/flowtest/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/Neos_FluidAdaptor_ViewHelpers_Link_ActionViewHelper.php on line 115

|Exception Code|0|
| --- | --- |
|Exception Type|TypeError|
|Thrown in File|Data/Temporary/Development/Cache/Code/Flow_Object_Classes/Neos_Flow_Mvc_Routing_UriBuilder.php|
|Line|292|
|Original File|Packages/Framework/Neos.Flow/Classes/Mvc/Routing/UriBuilder.php|

The issue here is that when the page is rendered from cache, I don’t get this error and it works perfectly without issues.

Hi @nodetails ,
not sure how this is cache related, but the error says that you need to pass arguments as an array and not null.

If you don’t have arguments to pass, simply remove the arguments="{arguments} part.

If you want to pass arguments, ensure they are at least an empty array.

Thanks for the answer, but that’s already clear to me.

As I said, the issue is, when the template is rendered from cache, then there is no error.
You need to remove the <f:cache.disable> of course. Request the page the first time and you will get the error. Just hit F5 to refresh the page and the cached template won’t raise an error.
In my opinion, the none cached template should not raise an exception in the first place.

By the way, I found the GitHub page https://github.com/neos/flow-development-collection/issues
Would that be a better place to address this issue?