[ php-blog-Bugs-1915339 ] Feed always sets email address even when told not to
"SourceForge.net" <[email protected]> Mon, 31 Mar 2008 19:20:36 -0700
| Newsgroups | gmane.comp.serendipity.trackers |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #1915339, was opened at 2008-03-16 03:09 Message generated for change (Comment added) made by sf-robot You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=542822&aid=1915339&group_id=75065 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Syndication Feeds Group: None >Status: Closed Resolution: Fixed Priority: 1 Private: No Submitted By: Filip Van Raemdonck (mechanix) Assigned to: Garvin Hicking (garvinhicking) Summary: Feed always sets email address even when told not to Initial Comment: Even when the configuration says not to publish an email address, there still is an (invalid) address of [email protected] added to each entry of the ATOM feed, and I'd guess all feeds. In include/functions_rss.inc.php there is a comment which says "// RSS Feeds need an E-Mail address!" (around line 85, in v1.2.1. I checked the ATOM http://www.ietf.org/rfc/rfc4287.txt, RSS 2.0 http://www.rssboard.org/rss-specification#ltauthorgtSubelementOfLtitemgt, RSS 1.0 http://web.resource.org/rss/1.0/spec and RSS 0.91 http://www.rssboard.org/rss-0-9-1-netscape specifications and nowhere is email listed as a required field. In case of ATOM, email is an optional subelement of author. In case of RSS 2.0, it's actually the author field that should be an email address, but there it is listed as optional too. RSS 1.0 and RSS 0.91 are completely silent about either an email or author element -- no requirement there either. For the time being I fixed this by making sure in the above include file that entry['no_email'] is always set to either TRUE or FALSE, and adding an if check around the email element in the ATOM smarty template. This should really be fixed in the serendipity distribtuion as well, though. ---------------------------------------------------------------------- >Comment By: SourceForge Robot (sf-robot) Date: 2008-03-31 19:20 Message: Logged In: YES user_id=1312539 Originator: NO This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker). ---------------------------------------------------------------------- Comment By: Garvin Hicking (garvinhicking) Date: 2008-03-17 07:35 Message: Logged In: YES user_id=473563 Originator: NO ([email protected] is currently the better check I just realized, because $options[...] can also be set differently and won't be available as a smarty variable) ---------------------------------------------------------------------- Comment By: Garvin Hicking (garvinhicking) Date: 2008-03-17 07:28 Message: Logged In: YES user_id=473563 Originator: NO But we always have the Authorname, the mail is just an addon! If we stripped the author element for [email protected], people would also not be able to read the usual authorname. That's a bad loss in functionality. If you want no author name to show, you would need to change that in your custom template, but the s9y distro will keep the author name by default in the feed output. Thanks for telling me about the mistake I made with example.com; I used the wrong default case, I will correct this and check for entry['no_email'] as well. (default-php is non-working, so patches there are not really that useful) ---------------------------------------------------------------------- Comment By: Filip Van Raemdonck (mechanix) Date: 2008-03-17 07:08 Message: Logged In: YES user_id=2695 Originator: YES I don't disagree about the format for RSS, but even there the author field is optional as you also point out yourself. So it too would benefit from the same check (if the "no_email" flag is true, don't add the author element) Looking at the commit, I see you're comparing the address, however it's set to "[email protected]" in include/functions_rss.inc.php, not "[email protected]" which you compare with. May I suggest the logic I mentioned, making sure that entry['no_email'] is always either true or false in the above file, and checking for it's value in the smarty template? That is a little less errorprone, IMHO. (also, I think the templates in default-php/ could use the same fix) Thanks! ---------------------------------------------------------------------- Comment By: Garvin Hicking (garvinhicking) Date: 2008-03-17 04:39 Message: Logged In: YES user_id=473563 Originator: NO Hi! Thanks for looking into this. The RSS2.0 problem was more that the <author> element is described at needing to be in the format "mail (realname)", so we could not simply issue "realname" inside the author element. The element itself is optional, but we emit the authorname there. If you do not like that yourself, you can edit the feed*.tpl template files for your template. For Atom, this is a different matter -- there, basically you could remove the email on its own. The problem is that our generation code at this point does not differ between RSS or ATOM output, this is decided in the feed*.tpl files on its own. This is where you could also strip the <email> part, like you've seem to already have done. I have now applied this to the two atom (1.0 and 0.3) template files in the s9y default distribution as well. Best regards, Garvin ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=542822&aid=1915339&group_id=75065 ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace