Having trouble moving my SAGE 10 Bedrock site from local to live hosting - wsod


I’m very new to SAGE 10 and I’m having some problems moving my site from local to hosting.

I’ve managed to get a simple one page site with ACF created locally, running in MAMP.

I have run yarn build production from inside my theme, and also ran composer install --no-dev from inside the theme.

I then moved all of the files (except the node_modules and .git files) up to the hosting.

I exported the database from the local site using wp-migrate and set to change to the live domain name. I then imported the db to the hosting.

I edited the .env file so that it contained the details of the hosted db, set it to production and updated the WP_HOME to be the live domain name.

This has been done inside a subdomain - https://bm.simon-testing.co.uk/

I’m getting a white screen and I’m unable to log in to the admin, any suggestions of where I’m going wrong?

I have used SAGE 9 previously but I’m struggling a little with SAGE 10!

Thanks in advance for any help :slight_smile:

Are there any clues in your logs? The two places I would be checking are web/app/cache/acorn/logs and web/app/debug.log

You could also probably switch the .env to ‘development’ briefly to see if that exposes an error.

Hi, thanks for getting back to me, I had a look in the application log and found the following -

[2024-03-29 15:00:05] development.ERROR: call_user_func_array(): Argument #1 ($callback) must be a valid callback, function “App\your_action_hook” not found or invalid function name (View: /Applications/MAMP/htdocs/bancmedia/web/app/themes/bancmedia-theme/resources/views/layouts/app.blade.php) (View: /Applications/MAMP/htdocs/bancmedia/web/app/themes/bancmedia-theme/resources/views/layouts/app.blade.php) {“userId”:1,“exception”:"[object] (Illuminate\View\ViewException(code: 0): call_user_func_array(): Argument #1 ($callback) must be a valid callback, function "App\your_action_hook" not found or invalid function name (View: /Applications/MAMP/htdocs/bancmedia/web/app/themes/bancmedia-theme/resources/views/layouts/app.blade.php) (View: /Applications/MAMP/htdocs/bancmedia/web/app/themes/bancmedia-theme/resources/views/layouts/app.blade.php) at /Applications/MAMP/htdocs/bancmedia/web/wp/wp-includes/class-wp-hook.php:324)
#0 /Applications/MAMP/htdocs/bancmedia/vendor/illuminate/view/Engines/PhpEngine.php(60): Illuminate\View\Engines\CompilerEngine->handleViewException(Object(Illuminate\View\ViewException), 1)
#1 /Applications/MAMP/htdocs/bancmedia/vendor/illuminate/view/Engines/CompilerEngine.php(72): Illuminate\View\Engines\PhpEngine->evaluatePath(‘/Applications/M…’, Array)
#2 /Applications/MAMP/htdocs/bancmedia/vendor/illuminate/view/View.php(207): Illuminate\View\Engines\CompilerEngine->get(‘/Applications/M…’, Array)
#3 /Applications/MAMP/htdocs/bancmedia/vendor/illuminate/view/View.php(190): Illuminate\View\View->getContents()
#4 /Applications/MAMP/htdocs/bancmedia/vendor/illuminate/view/View.php(159): Illuminate\View\View->renderContents()
#5 /Applications/MAMP/htdocs/bancmedia/web/app/themes/bancmedia-theme/index.php(3): Illuminate\View\View->render()
#6 /Applications/MAMP/htdocs/bancmedia/web/wp/wp-includes/template-loader.php(106): include(‘/Applications/M…’)
#7 /Applications/MAMP/htdocs/bancmedia/web/wp/wp-blog-header.php(19): require_once(‘/Applications/M…’)
#8 /Applications/MAMP/htdocs/bancmedia/web/index.php(7): require(‘/Applications/M…’)
#9 {main}

I changed the .env to development but no joy I’m afraid, still on the white screen.

Are you using a function “App\your_action_hook” in your app.blade.php view? I would start by searching your files for “your_action_hook”. It seems like you might have left something in there that was intended to be renamed.

I did a search on my entire project and it didn’t find your_action_hook anywhere, nothing in the app.blade.php as well, I checked just in case.

It did ring a bell though so I looked it up and the first result is this -

Which I remember trying when I was setting up the site locally.

I can’t find it anywhere in my code though, strange!

Edit: I have the same error in my application log on my local machine, but the local version works ok.

Have you tried clearing your view cache? web/app/cache/acorn/framework/views. Try deleting that directory just in case something is cached that shouldn’t be

I deleted the views folder from web/app/cache/acorn/framework/views but I’m still getting a wsod I’m afraid.

Is there a way to check I’ve got rid of the bug on local first, even though it loads up? I tried clearing out the application.log but it seems to automatically fill up again.

This applied to older acorn/Sage, but it may well be a permissions/ownership issue, to the cache/acorn directory in that setup:

Thanks for that, I set the app in public_html and all files below to 755, is that right?

Still getting the wsod though :frowning: