# Twig\\Error\\RuntimeError after updating to 5.1.0

**URL:** <https://forum.mautic.org/t/twig-error-runtimeerror-after-updating-to-5-1-0/32366>\
**Category:** Mautic 5 Install/Upgrade Support\
**Created:** [June 13, 2024, 10:30am UTC](https://forum.mautic.org/t/twig-error-runtimeerror-after-updating-to-5-1-0/32366 "2024-06-13T10:30:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ar84](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ar84/32/1441_2.png) [@ar84](https://forum.mautic.org/u/ar84)\
**Post date:** [June 13, 2024, 10:30am UTC](https://forum.mautic.org/t/twig-error-runtimeerror-after-updating-to-5-1-0/32366/1 "2024-06-13T10:30:25Z")

</div>

**Your software**  
My Mautic version is: 5.1.0  
My PHP version is: PHP 8.0.30 (cli) (built: Jun 6 2024 16:44:55) ( NTS )  
My Database type and version is: Server version: 10.5.23-MariaDB-0+deb11u1 Debian 11

**Your problem**  
My problem is: I get the following error after updating to Version 5.1.0 from 5.0.3.  
When I open the Contacts it says Internal Server error 500, when i check the Log files it shows this:

[2024-06-13T10:25:07.429318+00:00] mautic.CRITICAL: Uncaught PHP Exception Twig\Error\RuntimeError: “An exception has been thrown during the rendering of a template (“Unable to generate a URL for the named route “mautic\_tagmanager\_batch\_index\_action” as such route does not exist.”).” at /var/www/mautic/docroot/app/bundles/LeadBundle/Resources/views/Lead/\_list.html.twig line 2 {“exception”:“[object] (Twig\Error\RuntimeError(code: 0): An exception has been thrown during the rendering of a template ("Unable to generate a URL for the named route "mautic\_tagmanager\_batch\_index\_action" as such route does not exist."). at /var/www/mautic/docroot/app/bundles/LeadBundle/Resources/views/Lead/\_list.html.twig:2)\n[previous exception] [object] (Symfony\Component\Routing\Exception\RouteNotFoundException(code: 0): Unable to generate a URL for the named route "mautic\_tagmanager\_batch\_index\_action" as such route does not exist. at /var/www/mautic/vendor/symfony/routing/Generator/CompiledUrlGenerator.php:50)”} {“hostname”:“marketing”,“pid”:4059503}

These errors are showing in the log:  
[2024-06-13T10:25:07.429318+00:00] mautic.CRITICAL: Uncaught PHP Exception Twig\Error\RuntimeError: “An exception has been thrown during the rendering of a template (“Unable to generate a URL for the named route “mautic\_tagmanager\_batch\_index\_action” as such route does not exist.”).” at /var/www/mautic/docroot/app/bundles/LeadBundle/Resources/views/Lead/\_list.html.twig line 2 {“exception”:“[object] (Twig\Error\RuntimeError(code: 0): An exception has been thrown during the rendering of a template ("Unable to generate a URL for the named route "mautic\_tagmanager\_batch\_index\_action" as such route does not exist."). at /var/www/mautic/docroot/app/bundles/LeadBundle/Resources/views/Lead/\_list.html.twig:2)\n[previous exception] [object] (Symfony\Component\Routing\Exception\RouteNotFoundException(code: 0): Unable to generate a URL for the named route "mautic\_tagmanager\_batch\_index\_action" as such route does not exist. at /var/www/mautic/vendor/symfony/routing/Generator/CompiledUrlGenerator.php:50)”} {“hostname”:“marketing”,“pid”:4059503}

How can i solve this?

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [June 13, 2024, 10:41am UTC](https://forum.mautic.org/t/twig-error-runtimeerror-after-updating-to-5-1-0/32366/2 "2024-06-13T10:41:41Z")

</div>

Hi there,

Thanks for reporting this, have you cleared the Mautic cache and does that make any difference? Thanks!

---

<div class="post-metadata">

**Author:** ![ar84](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ar84/32/1441_2.png) [@ar84](https://forum.mautic.org/u/ar84)\
**Post date:** [June 13, 2024, 11:00am UTC](https://forum.mautic.org/t/twig-error-runtimeerror-after-updating-to-5-1-0/32366/3 "2024-06-13T11:00:35Z")

</div>

I did clear the cache, but unfortunately it did not make any difference.

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [June 13, 2024, 1:18pm UTC](https://forum.mautic.org/t/twig-error-runtimeerror-after-updating-to-5-1-0/32366/4 "2024-06-13T13:18:10Z")

</div>

Do you see this line in this file?

> <https://github.com/mautic/mautic/blob/b30170e7711ebebcce4297699bbe107a2d29473f/plugins/MauticTagManagerBundle/Config/config.php#L10>

---

<div class="post-metadata">

**Author:** ![ar84](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ar84/32/1441_2.png) [@ar84](https://forum.mautic.org/u/ar84)\
**Post date:** [June 14, 2024, 12:36am UTC](https://forum.mautic.org/t/twig-error-runtimeerror-after-updating-to-5-1-0/32366/5 "2024-06-14T00:36:39Z")

</div>

Hi @escopecz

I just checked the file and it was actually missing. This section from line 10 to 17 was missing:

```
        'mautic_tagmanager_batch_index_action' => [
            'path' => '/tags/batch/view',
            'controller' => 'MauticPlugin\MauticTagManagerBundle\Controller\BatchTagController::indexAction',
        ],
        'mautic_tagmanager_batch_set_action' => [
            'path' => '/tags/batch/set',
            'controller' => 'MauticPlugin\MauticTagManagerBundle\Controller\BatchTagController::execAction',
        ],

```

After I added those lines, cleared the Cache it all works now.

Thanks for the fast help
