Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter apatheticnow2

    (@apatheticnow2)

    I should also mention that all images work perfectly fine for logged in admin users, but do not work for logged out users.

    Thread Starter apatheticnow2

    (@apatheticnow2)

    Hi – The thumbnails are generated correctly for items that are missing thumbnails. For example – I’ve swapped in $image_link in place of $image in this image call, and it works fine. Is there a woocommerce filter that is swapping in that the placeholder that I can possible hook into and change?

    See below where I have commented out the image link and replaced image with image_link – this fixes the issue on the product page, but I would ideally hook in and fix it everywhere instead of modifying a ton of woocommerce files.

    $product_thumbnail = '';

    if ( $product->get_image_id() ) {

    $image_title = esc_attr( get_the_title( get_post_thumbnail_id() ) );

    $image_link = wp_get_attachment_url( get_post_thumbnail_id() );

    $image = get_the_post_thumbnail( $post->ID, apply_filters( 'single_product_large_thumbnail_size', 'shop_single' ), array(

    'title' => $image_title

    ) );

    $product_thumbnail = apply_filters( 'woocommerce_single_product_image_html', sprintf(

    //'<a href="%s" class="thim-image-popup" title="%s" data-elementor-open-lightbox="no">%s</a>', esc_url( $image_link ), esc_attr( $image_title ), $image ), $post->ID );

    '<a href="%s" class="thim-image-popupBAR" title="%s" data-elementor-open-lightbox="no"><image src="%s"></a>', esc_url( $image_link ), esc_attr( $image_title ), esc_url( $image_link ) ), $post->ID );

    }
    Thread Starter apatheticnow2

    (@apatheticnow2)

    Hi – Can you explain to me why it’s loading the Placeholder image on page load but the actual image when it’s clicked on? Is that expected behaviour for images in this folder? If so is there a hook I can use to change the behaviour?

    Thread Starter apatheticnow2

    (@apatheticnow2)

    https://ibb.co/vJstGd4

    Here’s an image of the product being edited.

    I have confirmed that if I use an image from the media library that is hosted in the wp-content/uploads/10/ folder work as expected. The issues occurs when the image is uploaded to /wp-content/uploads/woocommerce-uploads/10 that the issue occurs

    Thread Starter apatheticnow2

    (@apatheticnow2)

    Thanks for following up. The images are generated by PDF Thumbnails Premium?plugin, which is generating images and putting them in the WooCommerce uploads directory. However I’ve confirmed that the issue persists with all plugins except WooCommerce disabled, and WP, my theme (Eduma) and Woo all fully updated. I’m running PHP 8.2.

    This issue has always existed. It is not new. I am able to write custom code to fix this if needed. I’m just looking for guidance on how to hook into something to do so.

    Thread Starter apatheticnow2

    (@apatheticnow2)

    Hey Marco – I spoke too soon. Will send additional information directly

    Thread Starter apatheticnow2

    (@apatheticnow2)

    Thanks Marco.

    So it seems we may have this resolved. After trying just about everything else under the sun, we restored to the tried and true “Turn it Off, Turn it on Again”. Bouncing the servers seems to have gotten whatever was stuck unstuck. We also disabled memcached as part of the restart, but I monitored memcached for a day and saw no cache set/gets so I’m not convinced that was the culprit.

    If this issue pops back up, I’ll open a new thread with any details I can find, but fingers crossed!

    Thread Starter apatheticnow2

    (@apatheticnow2)

    Thanks Marco – Is there somewhere I can send you our website address securely – rather not post to the forums at this time. It looks like the cache folder does still exist on the server, I can remove it this week. It only contains a single index.html and no sub directories so it doesn’t seem to be caching to disk there.

    We are running opcache in php 7.3 with the below configuration, and have disabled any other cache related plugins we had enabled, as well as scrubbed out themes of all manual calls to wp_cache.

    Zend OPcache
    Opcode Caching Up and Running
    Optimization Enabled
    SHM Cache Enabled
    File Cache Disabled
    Startup OK
    Shared memory model mmap
    Cache hits 117538450
    Cache misses 1274
    Used memory 54112624
    Free memory 73942928
    Wasted memory 6162176
    Interned Strings Used memory 6290024
    Interned Strings Free memory 1008
    Cached scripts 1262
    Cached keys 1704
    Max keys 7963
    OOM restarts 0
    Hash keys restarts 0
    Manual restarts 0
    Directive Local Value Master Value
    opcache.blacklist_filename
    opcache.consistency_checks 0 0
    opcache.dups_fix Off Off
    opcache.enable On On
    opcache.enable_cli Off Off
    opcache.enable_file_override Off Off
    opcache.error_log no value no value
    opcache.file_cache no value no value
    opcache.file_cache_consistency_checks 1 1
    opcache.file_cache_only 0 0
    opcache.file_update_protection 2 2
    opcache.force_restart_timeout 180 180
    opcache.huge_code_pages Off Off
    opcache.interned_strings_buffer 8 8
    opcache.lockfile_path /tmp /tmp
    opcache.log_verbosity_level 1 1
    opcache.max_accelerated_files 4000 4000
    opcache.max_file_size 0 0
    opcache.max_wasted_percentage 5 5
    opcache.memory_consumption 128 128
    opcache.opt_debug_level 0 0
    opcache.optimization_level 0x7FFEBFFF 0x7FFEBFFF
    opcache.preferred_memory_model no value no value
    opcache.protect_memory 0 0
    opcache.restrict_api no value no value
    opcache.revalidate_freq 2 2
    opcache.revalidate_path Off Off
    opcache.save_comments 1 1
    opcache.use_cwd On On
    opcache.validate_permission Off Off
    opcache.validate_root Off Off
    opcache.validate_timestamps On On

Viewing 8 replies - 1 through 8 (of 8 total)