Logs for #nikola for 2019-02-12

01:03:46 <KwBot> [nikola-themes] hygorxaraujo opened issue #166: TypeError with search form in GLOBAL_CONTEXT https://github.com/getnikola/nikola-themes/issues/166
02:09:36 <CRCinAU> oh - while we're talking themes, how do I bug report one? :)
02:10:27 <CRCinAU> I'm tryijng to figure out why the links on this page don't work and throw a javascript error: https://www.crc.id.au/xplane/essendon/
02:10:43 <CRCinAU> everything under the Landing Runway 17/26 and Landing Runway 35 headings
02:11:33 <CRCinAU> I'm using markdown for that page, and one of the links in question is just:
02:11:34 <CRCinAU> *   [WES - MVC - EN @ 1500ft](/images/xplane/essendon/atc/wes-mvc-en.jpg)
09:11:18 <KwBot> [nikola-themes] Kwpolska closed issue #166: TypeError with search form in GLOBAL_CONTEXT https://github.com/getnikola/nikola-themes/issues/166
13:19:07 <ralsina> CRCinAU: looking...
13:19:19 <ChrisWarrick> the baguettebox snippet appears to be buggy
13:19:52 <ralsina> ahhh it's catching links to jpg
13:19:58 <CRCinAU> yah
13:20:00 <ralsina> yep, that selector needs fixing
13:20:13 <CRCinAU> I'm happy with it doing that.... if it worked :)
13:20:35 <ralsina> good point :-)
13:21:00 <CRCinAU> and you'll note it works fine on the photos up the top of that page
13:21:25 <ralsina> yeah, it's trying to use "alt" which of course is not a thing on a link
13:21:33 <CRCinAU> but they use: [![/images/xplane/essendon/IMG_0001.jpg](/images/xplane/essendon/IMG_0001.thumbnail.jpg)](/images/xplane/essendon/IMG_0001.jpg)
13:21:39 <CRCinAU> (in markdown that is)
13:22:12 <ralsina> return element.getElementsByTagName('img')[0].alt
13:23:02 <ralsina> basically since we are applying that to something that has no image in it (a link) everything there is undefined
13:23:30 <CRCinAU> *nods*
13:23:52 <ralsina> Solutions: 1) change baguetteBox.run('div#content' so it only catches actual images
13:24:03 <ralsina> 2) change that .alt so it handles failure gracefully
13:24:37 <ralsina> if we do 1) then those links will work as normal links. If we do 2) then then will work as popups 
13:25:17 <CRCinAU> tbh, I'd prefer 2 :)
13:25:23 <CRCinAU> ie so it works the same as linked images?
13:25:44 <ralsina> ok, give me 15' :-)
13:25:46 <CRCinAU> however - I guess the included images at the top would be better formatted in something that isn't as ungodly
13:26:10 <CRCinAU> as I guess right now, the only reason its working is the [! bit?
13:26:29 <ralsina> It works because images always have an alt attribute, even if it's empty
13:26:34 <CRCinAU> ahhhhh
13:26:53 <CRCinAU> so I could change the ![random alt text] instead of a path?
13:27:07 <ralsina> right
13:27:20 <CRCinAU> I thought it had to be a path :p
13:27:28 <CRCinAU> I wasn't quite sure how that markdown was interpreted...
13:27:46 <ralsina> Something like ![nice plane](whatever.jpg)
13:36:08 <CRCinAU> hmmm
13:36:30 <CRCinAU> seems not putting in the alt bit (ie ![/path/to etc]) also breaks
13:36:39 <CRCinAU> I just changed the last image, and it all broke :p
13:36:56 <CRCinAU> ie: https://www.crc.id.au/xplane/essendon/
13:37:05 <CRCinAU> click on the last image in all the thumbnails...
13:37:16 <CRCinAU> the Alt is now "Control desk at night"
13:37:39 <CRCinAU> and the backwards and forwards arrows are acting broken
13:38:23 <CRCinAU> that last one went from the top format here, to the bottom format:
13:38:23 <CRCinAU> [![/images/xplane/essendon/IMG_0012.jpg](/images/xplane/essendon/IMG_0012.thumbnail.jpg)](/images/xplane/essendon/IMG_0012.jpg)
13:38:27 <CRCinAU> [![Control desk at night](/images/xplane/essendon/IMG_0013.thumbnail.jpg)](/images/xplane/essendon/IMG_0013.jpg)