The output is the following with the default WP error page:
"Foobar
Fatal error: Uncaught Error: Call to undefined function non_existing_function() in /Users/calvinalkan/valet/booking/wp-content/plugins/test-plugin/view.php:10 Stack trace: #0 /Users/calvinalkan/valet/booking/wp-content/plugins/snicco-bookings-"
It also makes sense why this happens:
Inside the PhpView:
public function toString() {
if ( empty( $this->getName() ) ) {
throw new ViewException( 'View must have a name.' );
}
if ( empty( $this->getFilepath() ) ) {
throw new ViewException( 'View must have a filepath.' );
}
$this->engine->pushLayoutContent( $this );
if ( $this->getLayout() !== null ) {
// ERROR HAPPENS HERE
return $this->getLayout()->toString();
}
return $this->engine->getLayoutContent();
}
Hey. I am trying to get started with WP Emerge. I've been following 0 to 100 Setup.
However it states I am supposed to get the error:
Fatal error: Uncaught Error: Class '\App\Controllers\Web\HomeController' not found
But instead I receive:
There has been a critical error on this website.
I assumed it was just because maybe the newer version has a different error but as I kept following the steps where it is supposed to resolve the error, it did not. Everything was fine until I reached that stage and double checked that I pasted in the code correctly in the .php and .json files.
Does anyone have any pointers on what could be happening or links to any resources? I can't find any resources online on WP Emerge besides this site itself.
Warning: Use of undefined constant WPEMERGE_APPLICATION_FILESYSTEM_KEY - assumed 'WPEMERGE_APPLICATION_FILESYSTEM_KEY' (this will throw an Error in a future version of PHP) in /var/www/vhosts/rechtsanwalt.com/dev.rechtsanwalt.com/wp-content/plugins/racom-directory/app/src/WordPress/AssetsServiceProvider.php on line 29
Fatal error: Uncaught Pimple\Exception\UnknownIdentifierException: Identifier "WPEMERGE_APPLICATION_FILESYSTEM_KEY" is not defined. in /wp-content/plugins/racom-directory/vendor/pimple/pimple/src/Pimple/Container.php:101 Stack trace: #0 /wp-content/plugins/racom-directory/app/src/WordPress/AssetsServiceProvider.php(29): Pimple\Container->offsetGet() #1 //wp-content/plugins/racom-directory/vendor/htmlburger/wpemerge/src/Application/LoadsServiceProvidersTrait.php(107): RacomDirectory\WordPress\AssetsServiceProvider->bootstrap() #2 /var/www/vhosts/rechtsanwalt.com/dev.rechtsanwalt.com/wp-content/plugins/racom-directory/vendor/htmlburger/wpemerge/src/Application/LoadsServiceProvidersTrait.php(82): WPEmerge\Application\Application->bootstrapServiceProviders() #3 /var/www/vhosts/rechtsanwalt.com/dev.rechtsanwalt.com/wp-content/plugins/racom-directory/vendor/htmlburger/wpem in /var/www/vhosts/rechtsanwalt.com/dev.rechtsanwalt.com/wp-content/plugins/racom-directory/vendor/pimple/pimple/src/Pimple/Container.php on line 101
When I look for taht definition it is located in AssetsServiceProviderPHP Line 29
$this->filesystem = $container[ WPEMERGE_APPLICATION_FILESYSTEM_KEY ];
Do I have to set that somewhere?
Hi @jennifer.eberlei_gitlab ,
You shouldn't need to edit any files inside /vendor/ for everything to work. My first guess would be is that you need to run composer install --no-dev
to install the production dependencies on your server.
Alternatively, you can use the yarn release command: https://docs.wpemerge.com/#/starter/scripts?id=yarn-release
This will build all assets, install production dependencies and zip up your theme which you can then upload to your server and unzip.
yarn hot
are served with an HTTP protocol, and are blocked, stopping the HMR to work properly. I've tried to valet secure
the local domain, to indicate the HTTPS url in config.json
, but without any luck until now. any idea on what i should modify to make it work? thanks
resources/build/postcss.js
and removing require('./lib/combine-media-queries'),
from the array of pluginsasset()
function for it but ignore that for now
assets/index.js
build script runs import '@images/photos/photo1.jpg';
(see github link above).. this should import and output the image to dist but it's not keeping the subfolder i have to reference it as <img src="{{ asset('images/photo1.jpg') }}" /><
Greetings and thanks in advance.
How can I create a middleware that detects a subdomain and passes it as $ _GET type argument?
For example: london.mysite.com => mysite.com/q=london