Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Javascript/CSS Breaks Subscription Forms After 220318 Update #1226

Open
billalive opened this issue Mar 22, 2022 · 0 comments
Open

Comments

@billalive
Copy link

billalive commented Mar 22, 2022

EXPLANATION OF THE ISSUE

After updating to version 220318 for both s2member and s2member Pro, our Authorize.net Pro-Forms for Level #1 Access or higher appeared to be broken. Instead of the usual four fields and option to choose a credit card, too many fields were displayed, and the credit card icons were invisible.

The broken forms could not be submitted.

STEPS TO REPRODUCE THE ISSUE

Update to 220318 on a WordPress website that is already running the previous version of s2member Pro.

BEHAVIOR THAT I EXPECTED

I expected the Authorize.net Pro-Forms to remain unchanged.

BEHAVIOR THAT I OBSERVED

Instead, the forms were broken.

POSSIBLE FIX

When I examined the browser Console, there seemed to be errors loading Javascript and CSS which were supposed to be generated by wp-content/plugins/s2member/s2member-o-.php

This led me to a previous bug, which may be the same issue: #1174.

Based on that, and the information here, I created a small must use plugin in this file:

wp-content/mu-plugins/s2-o-hacks.php

<?php
function s2_hacks() {
    $GLOBALS[ 'WS_PLUGIN__' ][ 's2member' ][ 'c' ][ 's2o_url' ] = site_url( '/' );
}
add_action( 'ws_plugin__s2member_after_loaded', 's2_hacks' );

That code is taken from #1174 (comment)

This appears to fix the problem. All Javascript and CSS now load correctly, and the forms appear as they did before.

But this seems like a workaround. Can you fix this bug in the s2member Pro code?

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant