Home › Forums › Calendar Products › Events Calendar PRO › Javascript error when no featured image is set on hover preview
- This topic has 4 replies, 2 voices, and was last updated 10 years, 7 months ago by
Barry.
-
AuthorPosts
-
September 19, 2015 at 11:14 am #1006799
MIKE
ParticipantI’ve discovered a javascript error due to not having a featured image set on my events. This occurs on the hover previews of the calendar view.
Uncaught TemplateError: TypeError: Cannot read property 'length' of null (on tribe_tmpl_tooltip line 8)(anonymous function) @ tribe_tmpl_tooltip:19(anonymous function) @ tribe-events.min.js:1a @ tribe-events.min.js:1(anonymous function) @ tribe-events.min.js:1m.event.special.(anonymous function).handle @ jquery.js:4m.event.dispatch @ jquery.js:4r.handle @ jquery.js:4 6tribe_tmpl_tooltip:19 Uncaught TemplateError: TypeError: Cannot read property 'length' of null (on tribe_tmpl_tooltip line 8)The value of imageTooltipSrc is null when no featured image is set for the event.
Obviously setting the featured images on my events will solve this, but thought you should know to account for this in your code.
Nulls, I know, right?-
This topic was modified 10 years, 7 months ago by
MIKE.
September 19, 2015 at 11:33 am #1006802MIKE
ParticipantActually, perhaps now that I’m editing my events, it seems that the Featured Image is set, but to an image that no longer exists. Either the attachment meta is gone, or the image is gone. Maybe both, but the event meta still retains the association. Hope that helps further.
September 21, 2015 at 9:04 am #1007075Barry
MemberHi Mike,
Thanks for the report!
I don’t actually see the same problem, even if I manually delete the actual image file to try and create the same conditions (of a featured image being set, but without an accessible file).
Is it possible you have some customizations in place (custom templates perhaps) that might be impacting, or is there anything else you can think of to help us replicate (or could you even link to a live example of the problem)? I tried visiting the URL you provided but was unable to locate the main events page.
Thanks!
September 21, 2015 at 9:20 am #1007085MIKE
ParticipantI’ve since made the corrections to the featured images. This site had been copied to a new directory, which is probably why the post still thought it had a featured image, but the references to that image were gone. Not an issue now, more of an alert for you guys that the value of imageTooltipSrc can be null in obscure situations and that will cause the tooltip to not show. I know from reading other posts that people had issues with this and the fix was different. Thanks guys!
September 21, 2015 at 10:11 am #1007122Barry
MemberFantastic – and thanks again for highlighting this 🙂
-
This topic was modified 10 years, 7 months ago by
-
AuthorPosts
- The topic ‘Javascript error when no featured image is set on hover preview’ is closed to new replies.
