|page filter stopped working (after removing Seostorm plugin | Twig Extension missing)

I just updated my OctoberCMS 3.7.12 using twig v3.21.1.

For unknown reasons, the |page filter stopped working. I didnt change anything here since months while I was updating regularly, so I guess either October or Twig did some changes.

I checked the changelogs but didnt find anything.

So… here we are. Sure I could post an example of my twig code etc, but since I didnt change this and it worked before, this should not be the case.

Any ideas where to start? It works on DEV environment and does not on STAGING. STAGING has stricter rules, here’s the differences in the env file:

APP_DEBUG='false'
CMS_ASSET_CACHE='false'

I cleared the cache which also didnt change anything.

Ideas welcome, I am kinda lost here.

That’s unusual, if the |page filter wasn’t working, every site running October would be broken. Do you have any plugins that override the filter perhaps?

I compared the composer files, the only useful difference is the symfony components.

I found out it’s only within |page filters where the Views are rendered the following way:

        return View::make(
            'my.plugin::contentcards.card',
            [
              "link"   => $this->link, // includes the page
          ];
        )->render();

If the |page filter is rendered within a twig template, everything works. I found pages where the filter still works as expected.

Partial includes this:
<a href="{{ link|page }}">Title</a>

This code is used inside a components render() method.

I tried to nail it down to the bare minimum. The empty layout is really nearly empty… not much in there. “Welcome” is my index page in the pages folder.

PAGE:

title = "Testpagefilter"
url = "/test"
layout = "empty"

[testComponent]
==
{% component "testComponent" %}

COMPONENT:

class TestComponent extends ComponentBase
{
    public $test;
    public function onRun()
    {
        $this->test = View::make(
            'razen.octoberutils::test',
            [
                "link" => "welcome",
            ]
        )->render();
    }
}

COMPONENT DEFAULT.HTM

{{ __SELF__.test|raw }}

VIEW UTILS::TEST

<a href="{{ link|page }}">TEST</a>         


Addition:
The funny thing: If I use this code in the component, the page filter is within the loaded filters:

        $twig = \Cms\Classes\Controller::getController()->getTwig();
        $filters = $twig->getFilters();
        $filterNames = array_keys($filters);
        trace_log($filterNames);

I could solve the issue:

I recognized it happens if I run my website without Initbiz/Seostorm which I had installed since the beginning of the development.

So I digged further and found this here in the boot() method of SeoStorm

        $twig = app()->get('twig.environment');

        if (!$twig->hasExtension(StringLoaderExtension::class)) {
            $stringLoader = new StringLoaderExtension();
            $twig->addExtension($stringLoader);
        }

        if (!$twig->hasExtension(Extension::class)) {
            $controller = Controller::getController() ?? new Controller();
            $octoberExtensions = new Extension($controller);
            $twig->addExtension($octoberExtensions);
        }

When this part is removed, the |page filter does not work for me anymore. So I copied it over and everything was fine.

Now I wonder: Why were the twig extensions not loaded?