Support » Plugin: SportsPress - Sports Club & League Manager » Fatal error: Cannot redeclare class SP_Admin

  • I installed the plugin via wordpress and tried to activate the plugin then received this error

    Plugin could not be activated because it triggered a fatal error.

    Fatal error: Cannot redeclare class SP_Admin in /home/lv/public_html/wp/wp-content/plugins/sportspress/includes/admin/class-sp-admin.php on line 15

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Contributor Savvas

    (@savvasha)

    Hi @chevyfixr,

    This is usual occured by your theme. Can you switch to a default theme like Rookie or TwentSeventeen and try to reactivate SportsPress?

    Thanks,
    Savvas

    Thread Starter iconMatrix

    (@chevyfixr)

    That’s too bad. I set my site up using Storefront by woocommerce.

    Thanks for the info

    Plugin Contributor Savvas

    (@savvasha)

    If the problem was solved when you switched to a default theme, then you should contact the theme developer to tune their code. If the problem was still there, then some other plugin may occur this conflict. Try to disable all plugins except SportSpress. Then enable one by one to identify the “problematic” one 😉

    Thanks,
    Savvas

    Thread Starter iconMatrix

    (@chevyfixr)

    After deleting then activating each plugin until a problem happened, I found that Storefront Powerpack was the offending plugin. This is what Woocommerce said

    OK so I can replicate the issue, it looks like in the code both use the same class of S_Admin

    Given the extensive joining that Powerpack has with Storefront (it affects it in a ton of ways) it might be easier to work around with Sportspress. If you can on your forum thread with them, let them know it is the Powerpack plugin with Storefront that is conflicting, and see if there is something they can do (re-writing Powerpack to work with a particular plugin may not be something we can get our own developers to do)

    Plugin Contributor Savvas

    (@savvasha)

    Hi @chevyfixr,

    Unfortunately the answer is similar:

    (re-writing SportsPress to work with a particular plugin may not be something we can get our own developers to do)

    Thanks,
    Savvas

    Thread Starter iconMatrix

    (@chevyfixr)

    Gosh I wasted a bunch of time diagnosing for you and was steered that way because your website advertises an extension for Woocommerce. You should disclaim it that it will not work with Woocommerce Storefront that has the Woocommerce Powerpack plugin installed, to save another developer from wasting their time.
    https://www.themeboy.com/sportspress-extensions/

    Thanks

    Plugin Contributor Savvas

    (@savvasha)

    Hi @chevyfixr,

    SportsPress is fully compatible with the WooCommerce plugin.

    For some reason the Developers of Storefront Powerpack didn’t follow the “prefix rule” to avoid this type of conflicts.

    WooCommerce plugin uses the prefix wc_ and SportsPress plugin uses the prefix sp_. This is well described in WordPress Plugin Developer Handbook.

    Someone should expect that Storefront Powerpack would have chosen a prefix like wcsp_ (similar to wc_ their “parent” plugin WooCommerce uses).

    Anyway, as I can understand, Storefront Powerpack is a paid plugin, while SportsPress is a free opensource project. If the Powerpack developers are not willing to change their code then you can fork SportsPress and make the appropriate changes you want.

    If you have an active license for the SportsPress WooCommerse plugin then please come in contact with our Premium Support at https://support.themeboy.com/.

    Thanks,
    Savvas

    • This reply was modified 3 years, 6 months ago by Savvas. Reason: Premium Support
    Thread Starter iconMatrix

    (@chevyfixr)

    I relayed your info to Woocommerce, maybe in future versions they will fix it. In the meantime I’ll make a test site so I can look at and play with SportsPress

    Thanks for your help

    Plugin Contributor Roch

    (@rochesterj)

    You’re most welcome!

    Let us know if you need anything else.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Fatal error: Cannot redeclare class SP_Admin’ is closed to new replies.