Stylesheet overwriting styles for another plugin's admin panel

Home Forums Ticket Products Event Tickets Plus Stylesheet overwriting styles for another plugin's admin panel

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #1184955
    Rob Dewing
    Participant

    We are running The Events Calendar Pro and Event Tickets Plus on two sites which also use the Magicmembers plugin to manage membership subscriptions.

    After performing a recent version update to the plugins, the admin menu for the Magicmembers plugin is broken, with menu items floating and overlaid by other content. When we deactivate Events Calendar and Event Tickets plugins the Magicmembers plugin admin menu reverts to displaying correctly.

    When I raised the issue with Magicmembers support they stated that the issue is that Events Calendar/ Event Tickets plugins are loading stylesheets which overwrite their styles. When we look in the browser properties inspector we can see that there are indeed a number of style rules being applied to the Magicmembers admin menu from /wp-content/plugins/event-tickets/common/vendor/jquery/ui.theme.css?ver=4.3.1 . Are you able to help? Would we be able to apply a function which dequeues your stylesheets when not on EC and ET admin pages?

    In discussions with Magicmembers support they do not see this as their problem and have suggested that we request that your styles should be loaded in such a way as to overwrite their styles. As stated at the start of this post, this has only become an issue after a recent version update. Are you able to recommend how we overcome this problem which is affecting a live site and a second one which is in development and about to be handed over to the client?

    #1185604
    Geoff B.
    Member

    This reply is private.

    #1195536
    Rob Dewing
    Participant

    This reply is private.

    #1195537
    Rob Dewing
    Participant

    Sorry, you might need my email address for the Magicmembers licence: [email protected]

    • This reply was modified 9 years, 5 months ago by Rob Dewing. Reason: typo
    #1196298
    Geoff B.
    Member

    Good evening Rob,

    Thank you for the files.

    Actually, the first option under Events -> Settings -> Display (the radio button option) should let you decide which stylesheet is loaded at a global level. I was curious to see if that would have helped.

    As for the plugin, even with all the Events Calendar plugins deactivated, I simply cannot activate it without getting a fatal error: Fatal error: Call to a member function get_page_permastruct() on a non-object in /var/www/vhosts/mysite.com/wp-includes/link-template.php on line 355

    So I am afraid that the option to troubleshoot using the plugin is out for now.

    What I will do however is ask for a snippet to achieve what you are looking for: prevent the EC styles and scripts being enqueued on admin pages which don’t need them. I believe tweaking the following will probably work: https://gist.github.com/cliffordp/d3e17609114d84eb6a36

    What could help, if that is possible, would be to have access to a staging site where we can see your plugin in action in the admin section.

    Hang in there as I follow-up for you on this.

    Best regards,

    Geoff B.

    #1196756
    Rob Dewing
    Participant

    This reply is private.

    #1196891
    Geoff B.
    Member

    This reply is private.

    #1201390
    Rob Dewing
    Participant

    This reply is private.

    #1201876
    Geoff B.
    Member

    Good evening Rob,

    Thank you for writing back.

    I am glad my earlier suggestion helped. As per your request, here is a snippet that simply dequeues the resource in a less destructive manner:

    function load_custom_wp_admin_style() {
    wp_dequeue_script( 'tribe-jquery-ui-theme' );
    }
    add_action( 'admin_enqueue_scripts', 'load_custom_wp_admin_style', 1000 );

    Let me know if that helps.

    Have a great day!

    Geoff B.

    #1204827
    Rob Dewing
    Participant

    This reply is private.

    #1205063
    Geoff B.
    Member

    This reply is private.

    #1206441
    Brook
    Participant

    This reply is private.

    #1206506
    Rob Dewing
    Participant

    This reply is private.

    #1206575
    Geoff B.
    Member

    Hey Rob,

    I am super stoked that my colleague Brook’s updated snippet did it for you.

    You are welcome back in our support forums any time 🙂

    For now, I am going to close this thread.

    Have a great week!

    Geoff B.

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘Stylesheet overwriting styles for another plugin's admin panel’ is closed to new replies.