]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - doc/bugs/invalid_meta_date_or_updated_not_diagnosed.mdwn
Prepare new release
[git.ikiwiki.info.git] / doc / bugs / invalid_meta_date_or_updated_not_diagnosed.mdwn
index 17552d471278ea53df46a1194b7ea5d088d01eb1..cd39438a780227ac556197d1cc5bb7f2512e66d4 100644 (file)
@@ -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 `<meta name="date" content="xxx">` and `<meta name="updated" content="xxx">`
+> * 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 `<meta name="date" content="xxx">`
+> 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]]