diff --git a/typo3/sysext/fluid/Classes/View/StandaloneView.php b/typo3/sysext/fluid/Classes/View/StandaloneView.php
index f354a1754a9482868a902f7775ce6d646c87fa4e..97a0f5d20e28d233668a28d8abec7ce5460b128b 100644
--- a/typo3/sysext/fluid/Classes/View/StandaloneView.php
+++ b/typo3/sysext/fluid/Classes/View/StandaloneView.php
@@ -138,19 +138,23 @@ class StandaloneView extends AbstractTemplateView
     }
 
     /**
-     * Returns the absolute path to a Fluid template file if it was specified with setTemplatePathAndFilename() before
+     * Returns the absolute path to a Fluid template file if it was specified with setTemplatePathAndFilename() before.
+     * If the template filename was never specified, Fluid attempts to resolve the file based on controller and action.
+     *
+     * NB: If TemplatePaths was previously told to use the specific template path and filename it will short-circuit
+     * and return that template path and filename directly, instead of attempting to resolve it.
      *
      * @return string Fluid template path
-     * @throws \RuntimeException
      * @api
      */
     public function getTemplatePathAndFilename()
     {
         $templatePaths = $this->baseRenderingContext->getTemplatePaths();
-        if ($templatePaths instanceof TemplatePaths) {
-            return $templatePaths->getTemplatePathAndFilename();
-        }
-        throw new \RuntimeException('The template paths storage must be of type ' . TemplatePaths::class, 1482251889);
+        return $templatePaths->resolveTemplateFileForControllerAndActionAndFormat(
+            $this->baseRenderingContext->getControllerName(),
+            $this->baseRenderingContext->getControllerAction(),
+            $templatePaths->getFormat()
+        );
     }
 
     /**