WordPress / wporg-theme-directory

15 stars 6 forks source link

Local environment: Class 'WPORG_Ratings' not found #1

Closed ryelle closed 3 months ago

ryelle commented 1 year ago

Trying to set up the current theme-directory environment locally, and when I activate the theme, I get this error:

Fatal error: Uncaught Error: Class 'WPORG_Ratings' not found in /var/www/html/wp-content/plugins/theme-directory/class-themes-api.php:762
Stack trace:
#0 /var/www/html/wp-content/plugins/theme-directory/class-themes-api.php(557): Themes_API->fill_theme(Object(WP_Post))
#1 /var/www/html/wp-content/plugins/theme-directory/class-themes-api.php(150): Themes_API->query_themes()
#2 /var/www/html/wp-content/plugins/theme-directory/theme-directory.php(952): Themes_API->__construct('query_themes', Array)
#3 /var/www/html/wp-content/plugins/theme-directory/theme-directory.php(894): wporg_themes_query_api('query_themes', Array)
#4 /var/www/html/wp-content/themes/wporg-themes/functions.php(162): wporg_themes_get_themes_for_query()
#5 /var/www/html/wp-includes/class-wp-hook.php(308): wporg_themes_scripts('')
#6 /var/www/html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
#7 /var/www/html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#8 /var/www/html/wp-includes/script-loader.php(2180): do_action('wp_e in /var/www/html/wp-content/plugins/theme-directory/class-themes-api.php on line 762

It looks like we need to either open-source the ratings plugin or add a mock.