• Hi!

    For some reason today when I’ve created galleries or added photos to a post it comes up with the following below each photo. Can anyone suggest how to change this?

    Many thanks

    Fatal error: Uncaught Error: Call to undefined function juliet_get_attachment() in /home/anapple9/public_html/wp-content/themes/juliet/image.php:40 Stack trace: #0 /home/anapple9/public_html/wp-includes/template-loader.php(74): include() #1 /home/anapple9/public_html/wp-blog-header.php(19): require_once(‘/home/anapple9/…’) #2 /home/anapple9/public_html/index.php(17): require(‘/home/anapple9/…’) #3 {main} thrown in /home/anapple9/public_html/wp-content/themes/juliet/image.php on line 40

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @layla1978,

    Thank you for reporting this. It seems this is a bug. We’ll fix it in the next release. However in the meantime it is quite easy to fix. Please open wp-content/themes/juliet/image.php file inside Appearance → Editor or on your FTP server and find these lines:

    <?php $attachment_meta = juliet_get_attachment( get_the_ID() ); if ($attachment_meta['caption'] != '') { ?>
                <div class="attachment-caption"><?php echo esc_html($attachment_meta['caption']); ?></div>
                <?php } ?>

    Then replace it with this code:

    <?php if ( function_exists( 'juliet_get_attachment' ) ) { ?>
    		        <?php $attachment_meta = juliet_get_attachment( get_the_ID() ); if ($attachment_meta['caption'] != '') { ?>
                        <div class="attachment-caption"><?php echo esc_html($attachment_meta['caption']); ?></div>
    		        <?php } ?>
    	        <?php } ?>

    Hope that helps.

    Please note also that this is Kale theme support but your question concerns Juliet theme so please add support questions here in future: https://www.ads-software.com/support/theme/juliet#new-post

    Kind regards

    Thread Starter layla1978

    (@layla1978)

    Hi, thanks for your reply. I don’t seem to be able to find that code I’m afraid. Is that for the one image that I posted in the original message? The bug has affected all the images in the recent post so I perhaps I should wait until it’s fixed. When will it be fixed?

    Here is the post where all the photos are affected by the bug:

    https://anappleaday.info/2018/01/29/moroccan-road-trip/

    Hi there,

    This code affects all images open as attachment page so changing it will take effect on every image.

    We’ll try to fix this issue as soon as possible, however there’s a quick fix. Please click on image in post to edit image and when Image Editor window opens change “Link To” settings to Media File. Right now you have “Attachment page” selected. Please see this screenshot for reference: https://prntscr.com/i7rcc4

    Please let me know if it works.

    Best

    Thread Starter layla1978

    (@layla1978)

    Hi!

    I think that has worked. Thanks so much for your help ad I hope the bug gets fixed soon.

    Hi @layla1978,

    I’m glad it’s working for you. We’ll try to release new patch soon.

    BTW: Thank you for great review ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Fatal error: Uncaught error’ is closed to new replies.