display issues with appointments+

I added one statement at the top of the page, so that people can click and see a video of the appointments process. Now look at the first line of the service description and the first line of the service providers' biography.

  • Katya Tsihotska

    Hello Chip

    Hope you had a wonderful day.

    Also
    Don't forget that the justification on the form filled by the user when making the appointment got all whacky as well.
    Look at the last 3 fields in the picture below

    This issue could be fixed with custom CSS, just paste the following code into Appearance > Customize > Additional CSS.

    .appointments-confirmation-wrapper fieldset div:after {
        display: table;
        content: '';
        clear: both;
    }

    I added one statement at the top of the page, so that people can click and see a video of the appointments process. Now look at the first line of the service description and the first line of the service providers' biography.

    I would like to have a closer look at your site to investigate this issue, but support access has expired as it is limited to 5 days so could you grant it again. Let me know when you'll do it.

    Best regards,
    Katya

  • Katya Tsihotska

    Hello Chip

    Hope you are fine today :slight_smile:

    The css fixed the alignment issue, thank you.
    Still seems like a band-aid to me. What happens next time the alignment goes whacky in some other section (not just .appointments-confirmation-wrapper)?

    This issue not quite related to alignment, it relates to floating block. It happens because the labels in your form are floating, and height of some labels are bigger than they parent block, so they go beyond the parent container and causing the issue.

    If you want to learn more about floating blocks you can read following article: http://www.hongkiat.com/blog/css-floats/

    And this one about how to fix such issues: https://css-tricks.com/snippets/css/clear-fix/

    I added one statement at the top of the page, so that people can click and see a video of the appointments process. Now look at the first line of the service description and the first line of the service providers' biography.

    I can replicate the same form my ends as well. I'm marking it as a bug and sending a report to the developer so he will provide a new plugin version or a hotfix.

    Please keep in mind, our developers work around the clock and they have to deal with lots of critical issues and other things. So it may take a little while for them to check this and release a fix. I appreciate your patience!

    Best regards,
    Katya

  • Panos

    Hey Chip!

    Sorry to hear it caused you trouble :slight_frown:

    Could you please provide admin and ftp access so I could have a closer look on your site? You can send that privately through our contact form: https://premium.wpmudev.org/contact/#i-have-a-different-question

    Send in:Subject: "Attn: Panos Lyrakis"

    - Admin login:
    Admin username
    Admin password
    Login url

    - FTP credentials
    host
    username
    password
    (and port if required)

    - link back to this thread for reference

    Please post back here once you send credentials so I get notified faster!

    Thanks!

  • Panos

    Hi Chip ,

    Apologies again for previous error on file attached! This happens due to different testing environments, no need to worry about it for this change :slight_smile:

    Let me try explain why the excerpts are wrong. The plugin uses the WP core function get_the_excerpt( $post->ID ) . Although the post id is correct, it doesn't support excerpts because it is a page. That function should be returning an empty string but instead it returns the content of the current post/page , cause of the "get_the_excerpt" filter in get_the_excerpt() function in WP file wp-includes/post-template.php, again this happens in WP core and not the plugin.

    Sorry if it was to technical information to follow. So what the fix does, is actually the same thing but without the "get_the_excerpt" filter. So this time the excerpt will be empty and the plugin will continue and select the proper content to trim and then return/display.

    One other possible solution would be to change :

    $text = get_the_excerpt( $page_id );

    to

    if( post_type_supports( $page->post_type, 'excerpt' ) ){
    			$text = get_the_excerpt( $page_id );
    }

    I personally prefer the first solution for this specific case (mentioned in a previous reply), one less function to run.

    it is not an elegant or permanent solution

    I agree that it's not recommended to modify plugin/theme core files, instead we could try using any hooks available from functions.php or a mu-plugin. For the current situation the available hook is
    app_excerpt
    which we could use instead. But it will add more unnecessary overhead, however if you prefer you can restore previous file to how it was and then in your theme's functions.php or a mu-plugin add the following :

    add_filter( 'app_excerpt', function( $content, $page_id, $worker_id ){
    
    	$appointments = appointments();
    
    	$text = '';
    		if ( !$page_id )
    			return $text;
    		$page = get_post( $page_id );
    		if ( !$page )
    			return $text;
    
    		if( post_type_supports( $page->post_type, 'excerpt' ) ){
    			$text = get_the_excerpt( $page_id );
    		}
    
    		if ( empty( $text ) ) {
    			$text = $page->post_content;
    		}
    
    		$text = strip_shortcodes( $text );
    
    		$text = apply_filters('app_the_content', $text, $page_id, $worker_id );
    		$text = str_replace(']]>', ']]>', $text);
    		$excerpt_length = apply_filters('app_excerpt_length', 55);
    		$excerpt_more = apply_filters('app_excerpt_more', ' &hellip; <a href="'. esc_url( get_permalink($page->ID) ) . '" target="_blank">' . __( 'More information <span class="meta-nav">&rarr;</span>', 'appointments' ) . '</a>');
    		$text = wp_trim_words( $text, $excerpt_length, $excerpt_more );
    
    		if ( $show_thumb_holder ) {
    
    			$thumb = '<div class="appointments-service-thumb appointments-service-thumb-' . absint( $page_id ) . '" data-page="' . absint( $page_id ) . '"></div>';
    		}
    		else {
    			$thumb = $appointments->get_thumbnail( $page_id, $thumb_size, $thumb_class, $worker_id );
    		}
    
    		return $thumb . $text;
    
    }, 10, 3 );

    Just a kind note:
    It is recommended that any plugin/theme updates or file modifications should be first tested on a staging/testing site before doing these changes on the production/live site.

    Please let me know if I confused you here :slight_smile:

    Thanks!

    • Chip

      UN-f.....-BELIEVABLE
      whatever you guys did screwed up the piece of crap Appointments+ plugin
      AGAIN

      Everything was working fine
      I did nothing to the site or the plugin
      Now the same situation started up again where the provider/service description is replaced by the same text as the header immediately preceding your plugin -- in my case "click here to see a video ...
      I am tired of dealing with these issues
      One after another after another after another after another
      FIX THIS P.O.S. or cancel my subscription

      • Panos

        Hi Chip ,

        Sorry you got the same issue back after update :slight_frown:

        I believe this fix didn't make it through this release as it is not a bug with the plugin since it uses WordPress core functions for this. I have pinged developer again for this.

        I have attached file appointments/appointments.php which you can replace. I would now suggest though to use the snippet I provided in previous reply, which will work with the current version without modifying plugin files.

        Thanks!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.