Passing data between filters and templates not working

You may want to see Sage 9 - Passing ACF data via Blade not working for an explanation of what’s going on.

This is supposedly fixed in Sage 9.0.1, but there are a few things that will need to be updated. You can try manually applying the changes at https://github.com/roots/sage/pull/2025 by stepping through each incremental change. Here’s the breakdown:

in /app/controllers/, rename the files app.php -> App.php and front-page.php -> FrontPage.php.

In these two renamed files, change this line:

namespace App;

to

namespace App\Controllers;

Finally, in the file composer.json at the root of the theme, replace this line:

"soberwp/controller": "~9.0.0-beta.4"

with

"soberwp/controller": "2.0.1"

You can then run composer require soberwp/controller:2.0.1 from the command line to force the update.

Give this a try and see if it resolves your problem! This has not yet been patched into the current release of Sage 9 as far as I can tell.

1 Like