[Appointments+] Auto scroll solution not working on app+ service select

I believe I had a fix from WPMUDEV months ago for this website. The site has the app + module halfway down, so when the window reloads after selecting a provider or service it takes the user to the top of the page. I had a solution from you guys, that would scroll back down to the app+ module when I chose one of these options, but can't find the history in my profile, so might have been chat. I have noticed that when selecting the provider it works but when selecting the service it gets stuck at the top of the page. Not sure exactly how it worked, but I found some code in the functions.php file of my child theme that seems related but doesn't seem to be controlling the succesful auto scroll (as I have modified it without breaking the function. I have a vague memory that the code may have been implemented elsewhere, but can't see it in MU plugins or the DIVI code integration section. Here is what is in the functions.php:

<?php

function apps_auto_scroll(){
?>
<script type="text/javascript">
jQuery(function(){
if(window.location.href.indexOf("app_service_id":wink: > -1) {
jQuery('html,body':wink:.animate({scrollTop: jQuery('#schedule-appointment':wink:.offset().top}, 1000);
}
})
</script>
<?php
}
add_action('wp_footer','apps_auto_scroll':wink:;
?>

  • Adam Czajczyk

    Hello Willi

    I hope you're well today and thank you for your question!

    I tried to check your site but I have encountered two "issues":

    1. I see "Book Online" link in a menu but when I follow it it takes me to a page with another link which, in turn, takes me to some other site (other domain) where I'm also asked to log in. How/where can I see the Appointments booking page then?

    2. The support access doesn't work for me; It seems that the regular wp-admin has been either moved to some other location (it returns 404 Not found) or is protected in some way that doesn't let me use support access.

    If it comes to that 2nd issue - the support access wouldn't let me check files properly anyway (e.g. I can't view code of plugins/mu-plugins/theme or edit it) so in this case I"d need a bit more direct access.

    That being said, please let me know about booking page location and also send in:

    Subject: "Attn: Adam Czajczyk"

    - Mark to my attention, the subject line should contain only: ATTN: Adam Czajczyk
    - 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
    - login URL and admin account login credentials (may be a temporary admin account) data
    - Include FTP log-in details (hostname, username & password)
    - Include hosting control panel access details (login address, username & password) - cPanel's usually the control panel used for this, but your provider may use something else; I'll need this for accessing your site's database, preferably via phpMyAdmin
    - Include any relevant URLs for your site

    Please use our contact form here https://premium.wpmudev.org/contact/#i-have-a-different-question

    I'll then use these credentials to investigate and hopefully solve the case.

    Let me know here once you send the message, please.

    Best regards,
    Adam

  • Adam Czajczyk

    Hello Willi

    Thank you for your response.

    I have received your e-mail. Unfortunately, I still cannot access the site even though I have added those two lines to my hosts file. I'm taken to the site, which is then redirected to https:// (so that's expected I assume) but browser gives a security error (not valid certificate) with - surprisingly - no option to ignore that.

    Is there anything else that I should additionally do? Could you double-check if those host entries do work properly and let me know, please?

    Best regards,
    Adam

  • Adam Czajczyk

    Hello Willi

    Please disregard the post above, I got it published by mistake before I actually wrote the message but I can't remove it.

    As for the site. I'm sorry but I can't "manually add a certificate". I'm not sure why but no browser that I tried (under Win 10 Pro) let me do this, which is a bit surprising because usually I can easily bypass such kind of security issue. All I get is a security error message and an information that (it's worded differently in different browsers but the point remains the same) the site is currently not accessible and is using HSTS so "probably is down temporarily, try again later".

    Is there any other way to access it? What I mean is - are you able to e.g. set some fully accessible copy online on some sub-folder/sub-domain of a regular domain (that doesn't require editing hosts and either is not ssl protected or is protected with valid certificate)?

    I'd be more than happy to help you with that but without being able to access the site it's gonna be quite difficult and it seems that I can't overcome this certificate issue in this particular case.

    Kind regards,
    Adam

  • Predrag Dubajic

    Hi Willi,

    I'm afraid that I can't access the backend of your site as well, my hosts files has those lines from quite some time ago as I was working on your site before, but this time the support access is not working.

    Could you please send us your Admin login details so we can try it that way?
    I will answer you via email as well so you can send us the login as a response to that.

    Best regards,
    Predrag

  • Predrag Dubajic

    Hi Willi,

    Apologies for the delay, I've missed your email response.

    I was able to login to your site now but I don't have admin permissions with the account you have created, can you please grant it so we can check your setup further?

    I tried finding your previous report for this to see who provided the code in the first place but I'm afraid that I'm unable to find anything like that related to your account.
    Do you perhaps remember why this was added in the first place because dropdown selectors should be scrolling to the form by default with A+?

    Best regards,
    Predrag

  • Predrag Dubajic

    Hi Willi,

    I tried creating another page on your site without using Divi builder but the issue was still there, I then installed Divi on my end and tested it but couldn't replicate the issue there, so it doesn't seem directly related to theme.

    It could be that something else is conflicting with Divi or A+ that's causing issues with both default A+ behavior and your custom script.

    Can you try disabling your other plugins and removing mu-plugins so we could see if any of those are causing this issue?

    Best regards,
    Predrag

  • Predrag Dubajic

    Hi Willi,

    Thanks for checking that, the issue is indeed with the CSS code added in there.
    It's because the title above the time selector is hidden with this code:

    .app_services_dropdown_title{
    	display:none;
    }

    I commented out this part of code and used a different way to hide your title, so your code on line 384 now looks like this:

    /* Old code
    .app_services_dropdown_title{
    	display:none;
    }
    */
    
    /*New Code*/
    .app_services_dropdown_title{
        height: 0;
        opacity: 0;
        margin: 0;
        z-index: -10;
        position: relative;
    }

    And it should working fine now :slight_smile:

    Best regards,
    Predrag

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.