Skip to content

Theme views are never resolved on a fresh install: themes/ vs public/content/themes/ #297

Description

@ogorzalka

Summary

On a fresh composer create-project pollora/pollora install, the front-end is broken out of the box:

View [home] not found.

The theme ships at themes/default/ with resources/views/home.blade.php present, and WordPress reports default as both template and stylesheet. But pollora:theme:status shows:

✗ No self-registered theme found
✗ No active theme found via ThemeService

WordPress theme info:
  Stylesheet: default
  Template Directory: /var/www/html/public/content/themes/default

public/content/themes/ only contains .gitkeep. WordPress looks for the theme where Pollora did not put it, so the view path is never added to Laravel's view finder — only resources/views is registered.

Two separate causes

1. config/theme.php ships with 'active' => null

pollora:install sets the theme as active on the WordPress side, but Pollora's own config stays null, so ThemeService has no active theme.

2. use_default_wp_theme_directory is a dead config key

config/wordpress.php declares it:

'use_default_wp_theme_directory' => false,

but it is read nowhere in the codebase:

$ grep -rn "use_default_wp_theme_directory" vendor/pollora/ --include="*.php"
vendor/pollora/framework/config/wordpress.php:59:    'use_default_wp_theme_directory' => false,

The only hit is the declaration itself. Setting it to true changes nothing.

Workaround

# 1. activate the theme on Pollora's side
sed -i "s/'active' => null,/'active' => 'default',/" config/theme.php

# 2. make the theme visible where WordPress looks for it
ln -s ../../../themes/default public/content/themes/default

After that, pollora:theme:status reports the theme in sync and the front-end returns 200.

Suggestion

Either honour use_default_wp_theme_directory (calling register_theme_directory() with base_path('themes') when false — WordPressThemeAdapter::registerThemeDirectory() already exists and is not called with that config), or have pollora:install set config/theme.php's active key and create the link. As it stands, a fresh install cannot render its own front-end.

Environment

Pollora v13.4.3 · WordPress 6.9.4 · PHP 8.4.20 · Laravel 13.8.0 · DDEV, nginx-fpm

https://claude.ai/code/session_01CtKVtFGujknnYGtcEEJD3x

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions