Another update, another broken site with multiple issues...

Just updated marketpress and Coursepress Pro.
Now get another bunch of erros....

First error that shows up on my course list page....
Warning: array_filter() expects parameter 1 to be array, boolean given in /home/public_html/site/wp-content/plugins/coursepress/2.0/include/coursepress/data/class-student.php on line 2004

Next error....
Click on Enroll Now button for any course. Choose 'Create An Account'. Fill out the details. Hit the 'Create Your Account' button and watch nothing happen. Modal stay on screen, nothing happens.

I have enabled you backend access (again) and hope these issues will be fixed (again).
Worst product ever.

    Kasia Swiderska

    Hello lowercase,

    Have you tried solution provided here https://premium.wpmudev.org/forums/topic/problem-after-update-coursepress-pro#post-1227025 to not display warnings on the front end? Is that not working for you?

    I tested this on my site and I could not replicate this issue. There is no warring and I could register new account without problem.

    This might sound strange but can you disable for while MarketPress and see if you can register in popup?
    There is one error in console that points to MarketPress, so I want to exclude this is problem there.

    kind regards,
    Kasia

    lowercase

    Hi there,

    I am not sure removing the ability to see the log on the site fixes the error?
    If there is an error in your Coursepress code, we would need it fixed, not just hidden from view?

    I'd like the plugin to have no errors please.

    Also, I still cannot create a new account on the site. No matter what fields are filled in, I still get the 'All fields are required' error and nothing happens. This only started with the new update today. I also deactivated Marketpress as per your suggestion and the problem still remains. No one can create an account on the site.

    Please make sure you are LOGGED OUT to replicate the issue.

    Kasia Swiderska

    Hello lowercase,

    I know that pushing warning from front end to debug.log is not fixing issue - and we reported that warning to developers so they will fix it. But until new version is released it is better to have it in debug than out there, where visitors can see it.

    Also, I still cannot create a new account on the site. No matter what fields are filled in, I still get the 'All fields are required' error and nothing happens. This only started with the new update today. I also deactivated Marketpress as per your suggestion and the problem still remains. No one can create an account on the site.

    Please make sure you are LOGGED OUT to replicate the issue.

    That popup shows only for logged out visitors so it's not possible to test that as logged in user - and I still can't replicate this on my site. I can create account without problem on my test site.

    I would like to check debug log - because right now there is no JS errors in browser console. Enable debug log and try creating new account, let see if something will show up. To enable it, open your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:
    define('WP_DEBUG', true);
    In order to enable the error logging to a file on the server you need to add yet one more similar line:

    define( 'WP_DEBUG_LOG', true );

    In this case the errors will be saved to a debug.log log file inside the /wp-content/directory.

    Depending on whether you want your errors to be only logged or also displayed on the screen you should also have this line there, immediately after the line mentioned above:

    define( 'WP_DEBUG_DISPLAY', false );

    The wp-config.php is located in your WordPress root directory. It’s the same file where the database configuration settings are. You will have to access it by FTP or SFTP in order to edit it.

    I would need then to see content of the debug.log file - so please upload it to service like a Dropbox and paste link here.

    kind regards
    Kasia

    lowercase

    hi Kasia Swiderska

    Unfortunately this still does not work. Nothing shows up in the log file for this error either.

    Nobody can sign up to a user account on our website right now.
    Here are the steps we are taking so you can replicate.

    1. Choose ENROLL NOW BUTTON to launch modal.
    2. Message appears: 'Don't have an account? Create an Account now!'
    3. Choose to Create an account.
    4. Enter First Name, Last Name, Username, Email, Password, Confirm Password
    5. Hit CREATE ACCOUNT button.

    At this point, Nothing happens. Nothing loads, the modal stays on screen and nothing is redirected. The button does not work at all.

    Occasionally, an error message appears at the beginning of the form saying 'All fields are required.'.

    Please help.

    Kasia Swiderska

    Hello lowercase,

    Is debug log entirely empty? Or there are some entries but they doesn't seem to be related? Can I see that log file to double check it?

    Would it be possible to run full plugin/theme conflict test on your site? I could do that for you if you could you send in the following via our secure contact form https://premium.wpmudev.org/contact/ :

    - Mark to my attention, the subject line should contain only: ATTN: Kasia Swiderska
    - Do not include anything else in the subject line, doing so may delay our response due to how email filtering works.
    - Link back to this thread
    - Include WordPress admin access details (login address, username & password)
    - Include FTP log-in details (hostname, username & password)
    - Include any relevant URLs for your site

    IMPORTANT: Please make sure you select "I have a different question" for your topic, so it doesn't go back to the forums - this and the subject line ensure that it gets assigned to me.

    Please confirm here that you send those credentials

    kind regards,
    Kasia

    Nithin

    Hi lowercase,

    Hope you are doing good today.

    Warning: array_filter() expects parameter 1 to be array, boolean given in /home/public_html/site/wp-content/plugins/coursepress/2.0/include/coursepress/data/class-student.php on line 2004

    I have applied the patch regarding this issue in your system, under /wp-content/plugins/coursepress/2.0/include/coursepress/data/class-student.php, and now it should work fine. This fix will be provided in the next plugin update, so that you don't have to worry about the file being overwritten during plugin update. Also attaching the file below.

    Nobody can sign up to a user account on our website right now.
    Here are the steps we are taking so you can replicate.

    I can confirm this issue in your system, however I'm still not able to replicate this exact issue in my test system, it works fine. To troubleshoot this further, is it okay, if we could disable all the plugins, except MarketPress, and CoursePress, and see how that goes?

    Since it looks like a live website, I didn't disable the plugins for testing this issue extensively, please do let us know whether you are comfortable with us disabling the plugins, so that we could help get this sorted asap.

    Kind Regards,
    Nithin

    lowercase

    Hi again Nithin and Kasia Swiderska

    I have made some progress in locating the error.
    In the footer of my site code we have another modal.
    If I delete the modal code, we can sign up via the Coursepress Modal.
    If any other modal code is on the page, it fails.

    Here is our code. Any help on why this code is preventing your modal signup code to fail?

    <div class="modal fade mailing-list-modal" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
       <div class="modal-dialog modal-sm" role="document">
          <div class="modal-content">
             <div class="modal-body">
                <h1 class="mailing-list-text">Join our Mailing List</h1>
                <form action="https://www.siteremoved.com?encoding=UTF-8" method="POST">
                   <div class="form-group">
                      <input type=hidden name="oid" value="004534h">
                      <input type=hidden name="retURL" value="http://siteremoved.com/mailing-list/">
                      <label for="first_name">Your First Name</label><input id="first_name" maxlength="40" name="first_name" size="20" type="text" class="form-control" />
                      <label for="last_name">Your Last Name</label><input id="last_name" maxlength="80" name="last_name" size="20" type="text" class="form-control" />
                      <label for="email">Your Email</label><input  id="email" maxlength="80" name="email" size="20" type="text" class="form-control" />
                      <button type="submit" name="submit" class="btn btn-default">Sign in</button>
                   </div>
                </form>
             </div>
          </div>
       </div>
    </div>
    lowercase

    Just some more information as to what I think is happening...

    The Coursepress signup form requires all fields to validate on submit. That is, you can't submit the form unless every field has an entry.

    The problem is, this form seems to be reading blank field values from ANOTHER form on the page (the one I have posted in the previous message), and as we are not filling that one out, it will always fail validation on the signup form.

    Hope that makes sense.

    So how would we make sure the Coursepress signup form only validates it's own fields and not try to validate fields from other forms and modals loaded on the same page?

    Kasia Swiderska

    Hello lowercase,

    Thanks for that additional information. That would explain that error message - looks like classes for second form are used also in CoursePress form, thus CP validation is also validating second form.

    Let me bring this to developer attention and ask how we can narrow validation to only CoursePress form. There will be probably changed needed in both form and script, but this is something I need to check with dev.

    kind regards,
    Kasia