Home › Forums › Ticket Products › Event Tickets Plus › Stylesheet overwriting styles for another plugin's admin panel
- This topic has 14 replies, 4 voices, and was last updated 9 years, 4 months ago by
Rob Dewing.
-
AuthorPosts
-
October 29, 2016 at 2:43 pm #1184955
Rob Dewing
ParticipantWe 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?
October 31, 2016 at 9:45 pm #1185604Geoff B.
MemberThis reply is private.
November 21, 2016 at 2:36 pm #1195536Rob Dewing
ParticipantThis reply is private.
November 21, 2016 at 2:37 pm #1195537Rob Dewing
ParticipantSorry, 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
November 22, 2016 at 10:24 pm #1196298Geoff B.
MemberGood 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.
November 23, 2016 at 2:29 pm #1196756Rob Dewing
ParticipantThis reply is private.
November 23, 2016 at 11:30 pm #1196891Geoff B.
MemberThis reply is private.
December 4, 2016 at 4:18 pm #1201390Rob Dewing
ParticipantThis reply is private.
December 5, 2016 at 10:20 pm #1201876Geoff B.
MemberGood 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.
December 12, 2016 at 11:12 am #1204827Rob Dewing
ParticipantThis reply is private.
December 12, 2016 at 10:23 pm #1205063Geoff B.
MemberThis reply is private.
December 15, 2016 at 8:18 am #1206441Brook
ParticipantThis reply is private.
December 15, 2016 at 8:40 am #1206506Rob Dewing
ParticipantThis reply is private.
December 15, 2016 at 10:59 am #1206575Geoff B.
MemberHey 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.
-
This reply was modified 9 years, 5 months ago by
-
AuthorPosts
- The topic ‘Stylesheet overwriting styles for another plugin's admin panel’ is closed to new replies.
