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

When previewing Largo or a child theme using the Customizer or the "preview theme" option, Class '' not found #1764

Closed
benlk opened this issue Jul 23, 2019 · 1 comment

Comments

@benlk
Copy link
Collaborator

benlk commented Jul 23, 2019

Fatal error: Uncaught Error: Class '' not found in /wp-content/themes/largo/homepages/homepage.php:79
Stack trace:
#0 /wp-content/themes/largo/home.php(35): largo_render_homepage_layout('')
#1 /wp-includes/template-loader.php(78): include('/...')
#2 /wp-blog-header.php(19): require_once('/...')
#3 /index.php(17): require('/...')
#4 ~/.composer/vendor/laravel/valet/server.php(158): require('/...')
#5 {main} thrown in /Users/blk/sites/workdayminn/wp-content/themes/largo/homepages/homepage.php on line 79

https://github.com/INN/largo/blob/0b03cb938061f9f2c64c9dee24b8be1e46356b26/homepages/homepage.php#L75-L81

The template to be loaded comes from largo_get_active_homepage_layout();

https://github.com/INN/largo/blob/0b03cb938061f9f2c64c9dee24b8be1e46356b26/home.php#L23-L35

Which comes from https://github.com/INN/largo/blob/512da701664b329f2f92244bbe54880a6e146431/homepages/homepage.php#L86-L88

of_get_option() there should be returning HomepageBlog if home_template doesn't have a defined value in the options framework options, but somehow it's returning an empty string. It returns 'HomepageBlog' dozens of times, save for during the final call that causes the fatal error.

@benlk
Copy link
Collaborator Author

benlk commented Jul 23, 2019

This is something to test for once we've switched to the Customizer framework, as part of #1438. This bug in the Options Framework itself doesn't need to be addressed, since we'll be moving off of that.

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

No branches or pull requests

1 participant