X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/1c5b2bda69b964875a16330bcaf5c219e6f61300..refs/tags/3.20190207:/doc/bugs/invalid_meta_date_or_updated_not_diagnosed.mdwn?ds=sidebyside diff --git a/doc/bugs/invalid_meta_date_or_updated_not_diagnosed.mdwn b/doc/bugs/invalid_meta_date_or_updated_not_diagnosed.mdwn index 17552d471..cd39438a7 100644 --- a/doc/bugs/invalid_meta_date_or_updated_not_diagnosed.mdwn +++ b/doc/bugs/invalid_meta_date_or_updated_not_diagnosed.mdwn @@ -44,3 +44,46 @@ So, long story short: shouldn't invalid dates in meta tags yield an error of som Thanks! -- [[anarcat]] + +> If you're reporting a bug, it would be helpful to lead with the actual bug and save +> the account of how you tried to debug it for later (or omit it). +> I've moved this from a forum post into a bug report. +> +> The meta plugin uses Date::Parse::str2time from the TimeDate Perl library, so it has +> whatever error handling that has. However, historically any error has essentially +> been ignored, which I think is a bug. +> +> `\[[!meta date]]` and `\[[!meta updated]]` have two purposes: +> +> * they create `` and `` +> * they change the ctime/mtime used by ikiwiki for sorting, etc. +> +> I think the historical assumption was that even if the date can't be parsed for the +> second purpose, you still want the first purpose. However, you're right that this is +> really fragile, and the first purpose seems fairly niche anyway. +> In ikiwiki git master (to be released as 3.20180321 or later) I've made `\[[!meta date=...]]` +> and `\[[!meta updated=...]]` +> produce an error message if you don't have `Date::Parse` or if the date/time is +> malformed. +> +> In the unlikely event that someone really wants `` +> without parsing the date, they can still use `\[[!meta name="date" content="xxx"]]`. +> +> [[!tag done]] --[[smcv]] + +> > To my defense, when I wrote this, I didn't consider this a bug: I +> > was assuming the problem I was seeing was just some dumb mistake +> > that I made and, indeed, there *was* one such formatting mistake. +> > +> > But yeah, I could have re-edited this whole thing to make it look +> > better. I'm sorry, but I was at the end of an already long +> > yak-shaving session... +> > +> > I wasn't sure if doing an error was the right way to go, as this +> > might break rendering for existing sites... But I'm glad you fixed +> > this anyways! +> > +> > Thank you for the super-fast-response! :) I also tried updating +> > the [[meta directive documentation|ikiwiki/directive/meta]] so +> > that it's a little more detailed about that stuff. I hope that's +> > alright... -- [[anarcat]]