• Hello.

    I have downloaded this theme through my WP admin but when I try to preview it, it gives me PHP error about capabilities.php.

    Here is the message :

    Fatal error: Uncaught Error: Call to undefined function wp_get_current_user() in /home/XXXXX/wp-includes/capabilities.php:877 Stack trace: #0 /home/XXXXX/wp-includes/theme-previews.php(17): current_user_can('switch_themes') #1 /home/XXXXX/wp-includes/class-wp-hook.php(310): wp_get_theme_preview_path('twentytwenty') #2 /home/XXXXX/wp-includes/plugin.php(205): WP_Hook->apply_filters('twentytwenty', Array) #3 /home/XXXXX/wp-includes/theme.php(317): apply_filters('template', 'twentytwenty') #4 /home/XXXXX/wp-includes/theme.php(328): get_template() #5 /home/XXXXX/wp-includes/l10n.php(1306): get_template_directory() #6 /home/XXXXX/wp-includes/l10n.php(1331): _load_textdomain_just_in_time('simple-lightbox') #7 /home/XXXXX/wp-includes/l10n.php(185): get_translations_for_domain('simple-lightbox') #8 /home/XXXXX/wp-includes/l10n.php(297): translate('Simple Lightbox', 'simple-lightbox') #9 /home/XXXXX/wp-content/plugins/simple-lightbox/main.php(27): __('Simple Lightbox', 'simple-lightbox') #10 /home/XXXXX/wp-settings.php(462): include_once('/XXXXX...') #11 /home/XXXXX/wp-config.php(98): require_once('/XXXXX...') #12 /home/XXXXX/wp-load.php(50): require_once('/XXXXX...') #13 /home/XXXXX/wp-admin/admin.php(34): require_once('/XXXXX...') #14 /home/XXXXX/wp-admin/site-editor.php(12): require_once('/XXXXX...') #15 {main} thrown in /home/XXXXX/wp-includes/capabilities.php on line 877

    Any idea of the problem ?

    Thanks.

Viewing 1 replies (of 1 total)
  • Hey there @draky – are you getting this error with other theme previews? You might try using Health Check to see if you get anything different when previewing without Simple Lightbox active, since that plugin is mentioned in the error.

Viewing 1 replies (of 1 total)
  • The topic ‘Error previewing theme in admin’ is closed to new replies.