Support

Home Forums Event Espresso Premium S2Members conflict

S2Members conflict

Posted: January 23, 2018 at 2:00 am


ATD Cascadia Chapter

January 23, 2018 at 2:00 am

I’ve been using S2Members and EE together for years without issue. Just recently we noticed that our site’s settings for S2 are all blank. When EE is disabled all of the settings return so it seems there’s some type of conflict.

The only error I get in console is:
SyntaxError: expected expression, got ‘<‘ admin.php:6:16469


Josh

  • Support Staff

January 23, 2018 at 7:08 am

Hello,

May I ask which versions of Event Espresso and s2members are installed on your site? Also, does the error occur if all other plugins are deactivated and the site is temporarily switched to the default theme?


ATD Cascadia Chapter

January 23, 2018 at 5:13 pm

Event Espresso – 4.9.55.p
S2Members – Version 170722 + s2Member Pro v170722
Theme: Striking MultiFlex – Version 1.2.8.8

We’ve been running both EE and S2 for many years now without issues, there’s be no new plugins added, and all plugins/themes are up to date with the most current versions.

I haven’t tried disabling the theme but I have tried all the plugins and it’s only the core EE that’s causing the conflict. S2Members support has replied to me asking me to contact EE for a script to block JS from loading on non-EE pages.

Other plugins if it helps:
Event Espresso – Calendar (EE 4.3+) – Version 3.2.11.p
Event Espresso – Promotions (EE 4.9.10+) – Version 1.0.12.p
Event Espresso – WP Users (EE4.6+) – Version 2.0.14.p

Thank you!


Josh

  • Support Staff

January 24, 2018 at 9:13 am

Hi there,

That’s interesting that S2Member support asked about a way to block EE’s scripts from loading on non-EE pages. This is because with one exception, EE’s scripts do not load on on non-EE pages.

I have S2 installed on a test site and checked its admin pages and there were no conflicts there.

Does S2 support know exactly which script needs to be blocked? My guess would be ee-cpt-wp-injects.js, because that’s the only script that’s loaded on non-EE pages. It’d be a really strange thing for that script to cause a conflict though.

  • This reply was modified 9 months ago by  Josh. Reason: clarifications added


ATD Cascadia Chapter

January 25, 2018 at 5:28 pm

I’ve reached out to them with your reply. Since they didn’t initially tell me which scripts to block then I’m assuming they aren’t sure which script(s). Is it worth trying to block that script you mention to see if that fixes the issue?


Josh

  • Support Staff

January 26, 2018 at 1:39 pm

You can block that script from loading from the S2 General Options page by adding the following code to a site functions plugin:

add_action('admin_enqueue_scripts','my_remove_ee_script_from_s2_pages', 21);
function my_remove_ee_script_from_s2_pages(){
    $current_screen = get_current_screen();
    if($current_screen->id == 's2member-pro_page_ws-plugin--s2member-gen-ops'){
        wp_dequeue_script('ee-inject-wp');
    }
}

Here’s how to set up a site functions plugin. If the above fixes the issue for the S2 General Options page of your site we can add the other pages to the script.


ATD Cascadia Chapter

January 29, 2018 at 6:44 pm

Thanks for the reply Josh.

I’ve added that script to my functions.php but unfortunately it’s still not working. S2 just has a blank page on all the settings.


Josh

  • Support Staff

January 30, 2018 at 7:12 am

I didn’t think that would help because like I mentioned earlier, it would be really strange thing for that script to cause a conflict.

Can you get a copy of the source of the s2member webpage and paste it into a gist or pastebin, then link here? I’m afraid we can only guess what S2 is doing on that page and why there’d be an error there. If you cannot do that, you could also complete this form so we can investigate further.


Josh

  • Support Staff

January 31, 2018 at 8:01 am

Hi there,

I found the error and applied a temporary fix and the S2 plugin’s settings page loads now. I can advise contacting your host and ask them if they can upgrade the web server to at least PHP 5.6.32, but it’d be best if they can update to PHP 7.0 or greater.

The support post ‘S2Members conflict’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Josh 8 months, 3 weeks ago ago

Topic Tags

Tagged: 

Notifications

This topic is: not resolved
Do NOT follow this link or you will be banned from the site!