# Sage 9 page-template not working on wordpress 6.4

**URL:** https://discourse.roots.io/t/sage-9-page-template-not-working-on-wordpress-6-4/26261
**Category:** sage
**Tags:** sage9
**Created:** 2023-11-13T16:12:56Z
**Posts:** 7

## Post 1 by @Patipan_Koedsukon — 2023-11-13T16:12:56Z

Show only white screen

 ![image](https://discourse.roots.io/uploads/default/original/2X/b/b13f4412ff2406ca9998d8d7bbfddae252b87d6d.png)

---

## Post 2 by @prtkaru — 2023-12-17T09:18:54Z

Did you find a solution? Experiencing the same here with Sage 9.0.0-beta.2 and WP 6.4.2 specifically.

---

## Post 3 by @ben — 2023-12-17T15:25:35Z

FYI, from [https://github.com/roots/sage/issues/3158#issuecomment-1851085787](https://github.com/roots/sage/issues/3158#issuecomment-1851085787):

[https://core.trac.wordpress.org/ticket/60025](https://core.trac.wordpress.org/ticket/60025)

---

## Post 4 by @jeremylind — 2024-01-05T18:05:44Z

I was able to address this by adding the following to `resources/functions.php`:

```
add_filter('stylesheet_directory', function ($tdir, $temp, $root) use ($sage_views) {
    if (!str_contains($tdir, 'views')) {
        $tdir .= '/views';
    }
   return $tdir;
}, 10, 3);
```

and modifying `app/setup.php` near line 136 like:

```
config([
        // 'assets.manifest' => "{$paths['dir.stylesheet']}/../dist/assets.json",
        // Bug fix for WP 6.4.2. See https://core.trac.wordpress.org/ticket/60025
        'assets.manifest' => "{$paths['dir.stylesheet']}/../../dist/assets.json",
...
```

---

## Post 5 by @codemonkeynorth — 2024-01-19T14:44:55Z

the above fixed it for our old sage 8 theme

thanks!

---

## Post 6 by @codemonkeynorth — 2024-01-25T13:40:09Z

oddly this broke again in the last couple of days on our production site without us making any changes since the `add_filter` fix above last week

I can only guess that WPEngine maybe have tried to do a backend fix for customers to avoid this and it’s broken something else, because our theme now reverted to the default theme instead with the error “Stylesheet is missing”

my solution was to copy `style.css` into `templates/style.css` … just odd that it was fine until the last couple of days

I see the WP dev team are addressing this too as there are various issues around themes that change the main template directory

but anyway leaving this here in case it helps anybody.

thanks  
J

see also  
[https://core.trac.wordpress.org/ticket/59847](https://core.trac.wordpress.org/ticket/59847)

---

## Post 7 by @MWDelaney — 2024-01-26T13:53:54Z

You might try deactivating and re-activating your theme. I’ve had some weird cases where old versions of Sage thought their root was `wp-content/themes/sage/templates` after a WordPress update.
