Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Acorn throws "Unable to detect application namespace" #61

Closed
4 tasks done
Puntpixel opened this issue Apr 24, 2020 · 2 comments
Closed
4 tasks done

Acorn throws "Unable to detect application namespace" #61

Puntpixel opened this issue Apr 24, 2020 · 2 comments

Comments

@Puntpixel
Copy link

Description

After developing Sage 10 project locally I deployed it on a server. Unfortunately this is shared hosting (for reasons beyond my control), so I know many restrictions apply.

The theme errors with an exception in vendor/roots/acorn/src/Acorn/Concerns/Application.php on line 749. Full error message is: Uncaught RuntimeException: Unable to detect application namespace

My access to logs is sadly restricted, so I can't say for sure what's causing this, but it happens sometimes with Laravel applications. Modifying vendor/roots/acorn/src/Acorn/Concerns/Application.php seems to resolve the issue by assigning a value to the $appPath variable on line 47 as per this thread on StackOverflow:

protected $appPath = __DIR__;

Steps to reproduce

  1. Deploy theme on server
  2. Activate theme
  3. WordPress sends a fatal error email

Expected behavior:
The theme should load successfully.

Actual behavior:
It throws a fatal error.

Reproduces how often: Not sure.

Versions

Latest version of Acorn, v1.0.6.
PHP 7.3.15 (fastcgi) on a shared Apache server.

@Puntpixel
Copy link
Author

After reading through the code I realised I neglected to upload my composer.json... All seems to be well now.

@RiaanWest
Copy link

@Puntpixel Thank you for leaving your solution on the Issue - it just saved my behind

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants