Comments (3)
A quickfix I used was changing it to:
foreach (['theme_file_path', 'theme_file_uri', 'parent_theme_file_path', 'parent_theme_file_uri'] as $hook) {
add_filter($hook, function ($path) {
if (is_file($path)) {
return $path;
}
return dirname($path);
});
}
from sage.
@oxyc Thanks ! I also had to create a dummy theme.json file inside the resources directory with just an empty object:
resources/theme.json
{}
from sage.
We are seeing this also on WordPress 6.3 and narrowed it down to a check for theme.json
here:
https://github.com/WordPress/wordpress-develop/blob/6.3/src/wp-includes/class-wp-theme-json-resolver.php#L242-L243
Since theme_file_path
discards the filename, but is_readable()
still is true because the directory is readable, we end up with the error.
Full stack trace for us:
#00 /wp-includes/class-wp-theme-json-resolver.php(110): wp_json_file_decode('/wp-content/themes/sage/resources', ['associative' => true])
#01 /wp-includes/class-wp-theme-json-resolver.php(244): read_json_file('/wp-content/themes/sage/resources')
#02 /wp-includes/class-wp-theme-json-resolver.php(591): get_theme_data()
#03 /wp-includes/global-styles-and-settings.php(80): get_merged_data('theme')
#04 /wp-includes/block-supports/typography.php(500): wp_get_global_settings()
#05 /wp-includes/class-wp-theme-json.php(1696): wp_get_typography_font_size_value(...)
#06 /wp-includes/class-wp-theme-json.php(1773): get_settings_values_by_slug(...)
#07 /wp-includes/class-wp-theme-json.php(1516): compute_preset_vars(...)
#08 /wp-includes/class-wp-theme-json.php(1072): get_css_variables(...)
#09 /wp-includes/global-styles-and-settings.php(206): get_stylesheet(...)
#10 /wp-includes/script-loader.php(2467): wp_get_global_stylesheet()
#11 /wp-includes/class-wp-hook.php(310): wp_enqueue_global_styles('')
#12 /wp-includes/class-wp-hook.php(334): apply_filters(NULL, [0 => ''])
#13 /wp-includes/plugin.php(517): do_action([0 => ''])
#14 /wp-includes/script-loader.php(2225): do_action('wp_enqueue_scripts')
#15 /wp-includes/class-wp-hook.php(310): wp_enqueue_scripts('')
#16 /wp-includes/class-wp-hook.php(334): apply_filters(NULL, [0 => ''])
#17 /wp-includes/plugin.php(517): do_action([0 => ''])
#18 /wp-content/themes/sage/app/filters.php(96): do_action('wp_head')
#19 /wp-content/themes/sage/vendor/illuminate/collections/Traits/EnumeratesValues.php(245): App\{closure}('wp_head', 1)
#20 /wp-content/themes/sage/app/filters.php(102): each(Closure::__set_state(array()))
#21 /wp-includes/class-wp-hook.php(310): App\{closure}('/wp-content/themes/sage/resources/views/single-work.blade.php')
#22 /wp-includes/plugin.php(205): apply_filters('/wp-content/themes/sage/resources/views/single-work.blade.php', array(0 => '/wp-content/themes/sage/resources/views/single-work.blade.php',))
#23 /wp-includes/template-loader.php(104): apply_filters('template_include', '/wp-content/themes/sage/resources/views/single-work.blade.php')
#24 /wp-blog-header.php(19): require_once('/wp-includes/template-loader.php')
#25 /index.php(17): require('/wp-blog-header.php')
from sage.
Related Issues (20)
- Bug: tailwind plugins import issue HOT 3
- Method ReflectionParameter::getClass() is deprecated Bug: HOT 1
- Bug: > cache/acorn/framework/cache directory must be present and writable HOT 1
- ❤️ Feature Request: static analysis of blade templates HOT 1
- Sage is incompatible with symbolic links : Unrecognized file extension HOT 1
- Replace single line PHP statements HOT 1
- Can Sage 10 integrate React and use shadcn/ui? HOT 1
- Hot reload not working (Redirecting to base URL when front page is set) HOT 1
- @import tailwind syntax is not supported and can cause issues with bud cache
- Unable to use @import on css files HOT 1
- Use modern Yarn install
- [sage 9] page-template not working on wordpress 6.4 HOT 1
- Sage 10 tailwind css is not working without small addition to tailwind.config.js HOT 5
- Sage 9 + Wordpress 6.4 and 6.4.1 create broken Gutenberg layout HOT 3
- Admin bar breaking error pages HOT 1
- Seems eslint --fix doesn't apply prettier changes HOT 1
- do_action('get_header') should occur before wp_head() HOT 13
- "editor.css" not included when Gutenberg (block) editor is in the new iframe mode
- Tailwind logical properties classes does not work as expected HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sage.