Comments (8)
Is this the result of a cached config?
from acorn.
@QWp6t cached and not cached.
from acorn.
I used this on a multisite with acorn v2 and parent/child themes that had similar issues, maybe itβs useful https://gist.github.com/oxyc/d5f62c41b6ed87f743d33c1b3c5a5c30
from acorn.
Hi @oxyc
Thanks a lot but I am afraid I do not get the context. Can you please explain a bit which parts might be of help to solve what? Is this overwriting the Config getter? Thanks a lot
from acorn.
So 6 months later I updated acorn :)
In functions.php
I changed:
@@ -40,7 +40,12 @@ if (! function_exists('\Roots\bootloader')) {
);
}
-\Roots\bootloader()->boot();
+$bootloader = \Roots\bootloader();
+$bootloader->getApplication()->bind(
+ \Roots\Acorn\Bootstrap\LoadConfiguration::class,
+ \App\Bootstrap\LoadConfiguration::class
+);
+$bootloader->boot();
/*
Add added this to app/Boostrap/LoadConfiguration.php
:
<?php
namespace App\Bootstrap;
use Illuminate\Contracts\Foundation\Application;
use Roots\Acorn\Bootstrap\LoadConfiguration as AcornLoadConfiguration;
class LoadConfiguration extends AcornLoadConfiguration
{
/**
* {@inheritdoc}
*/
public function bootstrap(Application $app)
{
parent::bootstrap($app);
// When `wp acorn optimize` runs it will create a cached config.php file
// with pre-determined values at build times. This causes issues with
// multisite since the config.php file uses get_theme_file_path() which
// needs to be dynamically evaluated per site.
// Here we override the cached config by re-evaluating the config files.
$this->loadConfigurationFiles($app, $app->make('config'));
}
}
The context for this was parent/child theme having cached theme paths but same should apply to l10n.
from acorn.
Any update on fixing this? I get translations to work as normal in WordPress but then suddenly they stop working. I try some combination of wp acorn optimize
wp acorn optimize:clear
yarn translate
yarn translate:compile
and it starts working again to stop working again later on. Not sure what's wrong.
from acorn.
All the updates so far are in this issue β there has not yet been a PR submitted to address this in Acorn
Did you try the solution from the comment above you?
from acorn.
Sorry if I hijacked the issue. I tried the solutions but they did not work for me. My problem seems to be with log1x/poet
package. This comment helped me Log1x/poet#46 (comment)
from acorn.
Related Issues (20)
- [bug] php fatal error on Sage mergeDependencies() random using bud.js HOT 6
- Custom file with wp-load loads wp-cli HOT 1
- Pin Pint to a specific version?
- Latest changes to Bootloader::registerWordPressRoute() throws Exception
- Changes to WordPress routes break the wp-admin login HOT 4
- Unable to login to wp-admin HOT 1
- www subdomain showing blank page HOT 2
- DefaultProviders: Illuminate\Foundation\Providers are deleted during the merge
- Cannot wp_redirect inside Components anymore HOT 3
- WP ACORN commands not working HOT 6
- wp acorn optimize: "PHP Warning: unlink(xxx): No such file or directory" HOT 2
- Laravel 11.x support
- Admin pages are broken in multisite with subfolder structure HOT 1
- Re-add WordPress plugin builds HOT 1
- Unable to use custom artisan path when using make:migration HOT 2
- Upgrading from v3.0 to v4.0 | MonoLog\Logger must be compatible with Psr\Log\LoggerInterface HOT 2
- Unable to install Acorn in WSL HOT 1
- Illuminate\View\ViewServiceProvider is instantiated twice
- Cannot replace Roots\Acorn\View\ViewServiceProvider
- Livewire - No application encryption key has been specified. HOT 7
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 acorn.