Event images not displaying

This topic contains 15 replies, has 3 voices, and was last updated by  urbanfix 8 years, 4 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #66661

    urbanfix
    Expired Member
    Post count: 310

    Hi, my event images arent displaying on import, this is an issue which has been fixed in the past by @giri see here.

    I am unsure what the problem exactly is or what was done to rectify it, only that it worked after I tested it (after the fix).I haven’t tried it since or done any updates/changes to any files or plugins, but its now not working.

    Please could someone have a look at whats going wrong?
    thanks, UF

    #66663

    urbanfix
    Expired Member
    Post count: 310
    This reply has been marked as private.
    #66683

    Guust
    Moderator
    Post count: 29970

    Do you mean when using CSV to import events?
    I scrolled through the last added events and cannot find any missing images.

    I found one listing with a missing image because it has not been uploaded to /wp-content/uploads/2016/01/12630559.jpg

    #66701

    urbanfix
    Expired Member
    Post count: 310

    yeah via the csv import!
    They aren’t displaying on the actual listing though…!
    The picture is on the tab (on detail listing page but not at the top)
    Please note this is just for events..!
    –Thanks UF

    #66797

    Guust
    Moderator
    Post count: 29970

    Your “whoop-event-photos” DIV is empty, there should be an image there. There must have been some customization made to that, because the default Whoop theme works correctly.

    We only provide support for the GD core plugin to non-members, so please renew your support membership, then we can have a look at your Whoop and events problem.

    #66798

    urbanfix
    Expired Member
    Post count: 310
    This reply has been marked as private.
    #66831

    Giri
    Expired Member
    Post count: 3155

    Hello urbanfix, last time I have modified thumbnail display function on your website and nothing else.

    Instead of wp_get_attachment_image_src function, I have used geodir_get_featured_image function.

    Check the screenshot for the code I changed.

    So my last change only deals with thumbnail display function. But right now the thumbnail is not getting displayed because its returning 404 error which is entirely different issue.

    I hope you are talking about the thumbnail i pointed out using the arrow in 2nd screenshot. If its not then i’m missing something here

    #66849

    urbanfix
    Expired Member
    Post count: 310

    hi @giri, unfortunately that isnt what im talking about.
    I’m talking about the event listing detail page see this link.
    There should be a thumbnail image displayed on the page and their isnt!

    Thanks, UF

    #66881

    Giri
    Expired Member
    Post count: 3155

    Ok fixed it. Please check it and let me know.

    #66885

    urbanfix
    Expired Member
    Post count: 310

    @giri Thanks thats perfect they are all displaying.

    I shall delete all events listings and upload the CSV from scratch and images via ftp and let you know how it goes!

    Thanks guys!

    #67161

    urbanfix
    Expired Member
    Post count: 310
    This reply has been marked as private.
    #68111

    urbanfix
    Expired Member
    Post count: 310

    I have updated to the latest version of whoop and the issue is back,
    If you could fix it and then tell me what to do after each update i could do it myself,
    Thanks, UF

    #68118

    Giri
    Expired Member
    Post count: 3155

    Hi urbanfix, sorry for the trouble. We haven’t released any new version after the fix i applied on your website. The fix will be included in the next version.

    This is what I changed.

    File geodirectory_whoop/functions/events.php

    Around line 68

    
    
    //                    if (has_post_thumbnail()) {
    //                        echo get_the_post_thumbnail( $post->ID, array( 250, 200) );
    //                    }
                        if ($fimage = geodir_get_featured_image($post->ID, '', true, $post->featured_image)) {
                            ?>
                            <img width="200" src="<?php echo $fimage->src; ?>" class="attachment-250x200 wp-post-image" alt="">
                            <?php
                        } 
    #68131

    urbanfix
    Expired Member
    Post count: 310

    No worries @giri! Thanks for all the support!
    I’ve done something wrong as now my home page is plain white.

    The PHP looked like this:

    
    
                <div class="whoop-event-photo-inner">
                    <?php
                    if ($preview) {
                        $image_url_string = $post->post_images;
                        if (!empty($image_url_string)) {
                            $image_urls = explode(',', $image_url_string);
                            $image_url = $image_urls[0];
                            ?>
                            <img width="200" src="<?php echo $image_url; ?>" class="attachment-250x200 wp-post-image" alt="">
                            <?php
                        }
                    } else {
                        if (has_post_thumbnail()) {
                            echo get_the_post_thumbnail( $post->ID, array( 250, 200) );
                        }
                    }
                    ?>
                </div>
            </div>
            <h1 class="entry-title geodir-big-header-title fn whoop-title">
                <?php
                echo esc_attr(stripslashes($post->post_title));
                ?>

    I changed it to:

    
    
                <div class="whoop-event-photo-inner">
                    <?php
                    if ($preview) {
                        $image_url_string = $post->post_images;
                        if (!empty($image_url_string)) {
                            $image_urls = explode(',', $image_url_string);
                            $image_url = $image_urls[0];
                            ?>
                            <img width="200" src="<?php echo $image_url; ?>" class="attachment-250x200 wp-post-image" alt="">
                            <?php
                        }
                    } else {
                        if (has_post_thumbnail()) {
                            echo get_the_post_thumbnail( $post->ID, array( 250, 200) );
                        }
                        if ($fimage = geodir_get_featured_image($post->ID, '', true, $post->featured_image)) {
                            ?>
                            <img width="200" src="<?php echo $fimage->src; ?>" class="attachment-250x200 wp-post-image" alt="">
                            <?php
                        } 
                </div>
            </div>
            <h1 class="entry-title geodir-big-header-title fn whoop-title">
                <?php
                echo esc_attr(stripslashes($post->post_title));
                ?>

    I know i’ve missed something stupid here, where did i go wrong?
    Please advise!
    Thanks, UF

    #68135

    Giri
    Expired Member
    Post count: 3155

    In the code I give earlier, this part is commented out

    
    
    if (has_post_thumbnail()) {
        echo get_the_post_thumbnail( $post->ID, array( 250, 200) );
    }
Viewing 15 posts - 1 through 15 (of 16 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket