Support » Theme: Storefront » Storefront /Gravity Forms Critical Error

  • Resolved bruceinct


    I have the Storefront theme installed along with Gravity Forms. When I click the ‘Forms’ button on the WordPress Dashboard, I see the following error message, “There has been a critical error on this website. Please check your site admin email inbox for instructions.”

    1) I do not receive any emails referencing this error. I do receive other admin emails to the email address. So the admin email setting in WP is setup correctly and I triple checked Spam/Junk folders.

    2) I disabled every other plugin. I have 2 themes installed. Twenty Twenty-One and Storefront. When I enable Twenty Twenty-One, Gravity Forms is fine. When I enable Storefront, I see the error message. Again, no other plugins are enabled.

    3) Server shows fatal error in the domain log:

    [Thu May 13 16:59:14.174027 2021] Got error ‘PHP message: PHP Fatal
    error: Cannot declare class
    Storefront_NUX_Admin_Inbox_Messages_Customize, because the name is
    already in use in
    on line 17’`

    I contacted Gravity Forms support. They replied with:

    The error message indicates that the class Storefront_NUX_Admin_Inbox_Messages_Customize is being used in more than one place. Once in the theme, which is noted in the error message, but then it errors out when it’s being called from somewhere else. That is not coming from Gravity Forms, so there is likely an issue with the theme itself, or a child theme is incorrectly calling that same class, or there is a conflict with another plugin which is calling that class specifically.

    The site is:

    I greatly appreciate any help.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Hi !

    Same for me, no response from Storfront support nor Gravity Form support. If you’ll find something, could you explain how you resolve this issue ? For the moment I commented the lines of storefront’s theme in functions.php :

    // if ( version_compare( get_bloginfo( 'version' ), '4.7.3', '>=' ) && ( is_admin() || is_customize_preview() ) ) {
    // 	require 'inc/nux/class-storefront-nux-admin.php';
    // 	require 'inc/nux/class-storefront-nux-guided-tour.php';
    // 	require 'inc/nux/class-storefront-nux-starter-content.php';
    // }

    Line 62 to 67.

    But it’s definitively not the good way to resolve this bug but I can now use Gravity Form.

    Thanks !

    Stuart Duff – a11n


    Automattic Happiness Engineer

    Hi @bruceinct,

    I’ve performed some cross testing to day using Storefront v3.6.0 and Gravity Forms Version 2.5.1.

    When doing so I’m not seeing the described error message when clicking the View Forms button on the WordPress > Dashboard section. I was also able to create a new form too after being taken to the gravity forms creation page.

    Image Link:

    Are you using the same versions of Storefront and Gravity Forms which I tested with above. Did I also click the correct dashboard button when testing to try and replicate this behaviour for us?

    I also tested additionally with first having the Twenty Twenty activated and then activated the Storefront theme. Is it a fresh installation of Storefront you’re using where the theme has never been configured on the site before?


    Hi !

    I’ve installed a fresh wordpress ( 5.7.2) on wampserveur v3 with php v7.4.9
    woocommerce Version 5.3.0
    Gravity form Version 2.5.1
    Storefront Version 3.6.0
    All I have done is install and activate this 2 plugins and theme.

    On all submenu of Gravity forms menu I have this error :

    Fatal error: Cannot declare class Storefront_NUX_Admin_Inbox_Messages_Customize, because the name is already in use in C:\wamp64\www\wordpress\wp-content\themes\storefront\inc\nux\class-storefront-nux-admin-inbox-messages-customize.php on line 17
    Call Stack
    #	Time	Memory	Function	Location
    1	0.0001	367488	{main}( )	...\admin.php:0
    2	0.5378	19427928	require_once( 'C:\wamp64\www\wordpress\wp-admin\admin-header.php' )	...\admin.php:239
    3	0.6358	19601008	do_action( )	...\admin-header.php:288
    4	0.6358	19601384	WP_Hook->do_action( )	...\plugin.php:484
    5	0.6358	19601384	WP_Hook->apply_filters( )	...\class-wp-hook.php:316
    6	0.6380	19602544	Storefront_NUX_Admin->admin_inbox_messages( )	...\class-wp-hook.php:292
    7	0.6380	19603440	require( 'C:\wamp64\www\wordpress\wp-content\themes\storefront\inc\nux\class-storefront-nux-admin-inbox-messages-customize.php' )	...\class-storefront-nux-admin.php:212

    I tested to activate Twenty Twenty, there is no more error on Gravity forms menu. Then I activate the licence key, created a form, turn on storefront and get the same error.

    I also had this problem but was able to determine the issue.

    Turns out I had two Storefront themes installed. Once I removed the additional theme, the problem went away.

    How can be two Storefront theme installed ? I tought only one theme could be activated at the same time. How do you see that and how you removed the seconde one ?

    This was a project handed to me by another developer so I don’t why there were two themes. He probably just duplicated the existing folder and renamed it. To remove the second one, I just dragged the additional folder out of the themes folder and placed it somewhere else. I’ll delete it just as soon as I am sure there’s nothing there I need like some stylesheet or whatever.

    @yourbudweiser Are you sure it wasn’t a child theme of Storefront you deleted?

    Stuart Duff – a11n


    Automattic Happiness Engineer

    Hey @mahii-conception,

    Thanks for the details of your testing.

    I spun up a fresh installation of WordPress using Local with the configuration below.

    PHP v7.4.1
    WooCommerce v5.3.0
    Gravity Forms v2.5.1
    Storefront v3.6.0

    I firstly activated Gravity Forms then activated the WooCommerce plugin with the Twenty Twenty-One theme activated. When doing so there were no error messages displaying on the Gravity Forms sub-menus.

    I then activated the Storefront theme. After doing so I then see the error message displaying. So it seems this conflict does only occur when a fresh installation of Storefront is activated on a site with Gravity Forms installed

    Image Link:

    Looking at the code which the error references it’s for the note which is added to the WooCommerce > Home page which would be this note below.

    Image Link:

    It seems for some peculiar reason the Gravity Forms plugin is trying to redeclare that note on its plugin pages. When cross-testing no other plugin I tested which have WordPress sub-menus produces the same error message when Storefront is activated.

    The theme added notices in two places for the Storefront setup. If WooCommerce is enabled a notice would only be displayed within WooCommerce > Home like in the screenshot above which is classed as the WooCommerce Admin Dashboard.

    If however WooCommerce is not enabled Storefront would display a different notice at the top of each page. Below is an example of that.

    Image Link:

    Interestingly the only page on the site where this default WordPress admin notice does not display is on the Gravity Forms page. It seems Gravity Forms have a custom page that removes WordPress Admin Notices in their plugin.

    Image Link:

    Instead, the Gravity Forms plugin seems to have a custom notice implementation which refers you to the WordPress Dashboard like the below when a new admin notice is present on a WordPress installation.

    Image Link:

    It seems to be this custom admin notice implementation within the Gravity FOrms plugin that is causing the issues with plugins or themes that add notifications to the WooCommerce Admin Dashboard.

    This is tricky as Storefront is not doing anything out of the ordinary with the notices and it’s only the Gravity Forms plugin that is showing this error. I’d suggest initially reaching out to Gravity Forms to they an offer with their thinking relating to this.

    For reference going through the Storefront setup process removes the admin notice and the error.

    I hope this helps.


    Perfect, this solve my issue perfectly ! Thank you so munch.

    Hi @mahii-conception,

    Glad to hear that and thanks for confirming that Stuart’s solution worked for you!

    @bruceinct could you please confirm if Stuart’s solution works for you too?

    Theme Author Automattic


    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can reopen it again if you need be.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Storefront /Gravity Forms Critical Error’ is closed to new replies.