Title: Fatal error: Uncaught error
Last modified: January 29, 2018

---

# Fatal error: Uncaught error

 *  [layla1978](https://wordpress.org/support/users/layla1978/)
 * (@layla1978)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-10/)
 * 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](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ffatal-error-uncaught-error-10%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [jarektheme](https://wordpress.org/support/users/jarektheme/)
 * (@jarektheme)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-10/#post-9915319)
 * Hi [@layla1978](https://wordpress.org/support/users/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://wordpress.org/support/theme/juliet#new-post](https://wordpress.org/support/theme/juliet#new-post)
 * Kind regards
 *  Thread Starter [layla1978](https://wordpress.org/support/users/layla1978/)
 * (@layla1978)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-10/#post-9917331)
 * 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/](https://anappleaday.info/2018/01/29/moroccan-road-trip/)
 *  [jarektheme](https://wordpress.org/support/users/jarektheme/)
 * (@jarektheme)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-10/#post-9918561)
 * 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: [http://prntscr.com/i7rcc4](http://prntscr.com/i7rcc4)
 * Please let me know if it works.
 * Best
 *  Thread Starter [layla1978](https://wordpress.org/support/users/layla1978/)
 * (@layla1978)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-10/#post-9923256)
 * Hi!
 * I think that has worked. Thanks so much for your help ad I hope the bug gets 
   fixed soon.
 *  [jarektheme](https://wordpress.org/support/users/jarektheme/)
 * (@jarektheme)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-10/#post-9923960)
 * Hi [@layla1978](https://wordpress.org/support/users/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.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/kale/2.8.2/screenshot.jpg)
 * Kale
 * [Support Threads](https://wordpress.org/support/theme/kale/)
 * [Active Topics](https://wordpress.org/support/theme/kale/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/kale/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/kale/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [jarektheme](https://wordpress.org/support/users/jarektheme/)
 * Last activity: [8 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-10/#post-9923960)
 * Status: not resolved