New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<txp:article_custom /> in body or excerpt breaks feeds #31
Comments
From r.wetzlmayr on August 10, 2009 04:37:01 Corrected test markup: <txp:article_custom wraptag="ul" break="li"> |
From r.wetzlmayr on August 10, 2009 05:19:48 Attached patch breaks plugins' capability to modify body or excerpt in response to |
From stefdawson on August 16, 2009 04:18:46 Hmmm. I can't see how plugin authors could modify the body or excerpt anyway. Maybe I Since the potential called plugin isn't passed any reference to $a or even $rs, how As far as I can make out, the proposed patch is fine, with the possible addition of |
From r.wetzlmayr on August 16, 2009 10:37:41 A plugin would modify $thisarticle['excerpt'] or $thisarticle['body'] in an See csb_feed_image for instance ( http://forum.textpattern.com/viewtopic.php?id=23210 ). |
From stefdawson on August 16, 2009 23:56:59 Oh right, ok. Didn't consider that. So I guess there has to be some kind of |
Restoring info that got lost: Project Member Reported by r.wetzlmayr, Aug 10, 2009 Reported by makss in http://forum.textpattern.com/viewtopic.php?id=29399: Steps to reproduce: A. Create a few articles with 2.1 body:
`<txp:article_custom wraptag="ul" break="li">`
`<txp:permlink><txp:title /></txp:permlink>`
`</txp:article_custom>`
2.2 excerpt:
`<txp:article_custom wraptag="ul" break="li">`
`<txp:permlink><txp:title /></txp:permlink>`
`</txp:article_custom>` C. ATOM and RSS feeds contain body and excerpt of the last created article Reason: $thisarticle global gets overwritten while parsing the embedded Robert added this patch: > Index: textpattern/publish/atom.php
> ===================================================================
--- textpattern/publish/atom.php (revision 3266)
+++ textpattern/publish/atom.php (working copy)
@@ -117,8 +117,8 @@
$e['category1'] = (trim($Category1) ? '<category term="'.htmlspecialchars($Category1).'" />' : '');
$e['category2'] = (trim($Category2) ? '<category term="'.htmlspecialchars($Category2).'" />' : '');
> - $summary = trim(replace_relative_urls(parse($thisarticle['excerpt']), $permlink));
> - $content = trim(replace_relative_urls(parse($thisarticle['body']), $permlink));
+ $summary = trim(replace_relative_urls(parse($Excerpt_html), $permlink));
+ $content = trim(replace_relative_urls(parse($Body_html), $permlink));
if ($syndicate_body_or_excerpt) {
# short feed: use body as summary if there's no excerpt
Index: textpattern/publish/rss.php
===================================================================
--- textpattern/publish/rss.php (revision 3266)
+++ textpattern/publish/rss.php (working copy)
@@ -69,8 +69,8 @@
$a['posted'] = $uPosted;
$permlink = permlinkurl($a);
- $summary = trim(replace_relative_urls(parse($thisarticle['excerpt']), $permlink));
- $content = trim(replace_relative_urls(parse($thisarticle['body']), $permlink));
+ $summary = trim(replace_relative_urls(parse($Excerpt_html), $permlink));
+ $content = trim(replace_relative_urls(parse($Body_html), $permlink));
if ($syndicate_body_or_excerpt) {
# short feed: use body as summary if there's no excerpt |
Presumably closed by two commits above, please confirm. |
From r.wetzlmayr on August 10, 2009 13:35:24
Reported by makss in http://forum.textpattern.com/viewtopic.php?id=29399 :
Steps to reproduce:
2.1 body:
<txp:article_custom wraptag="ul" break="li"
txp:permlink<txp:title />/txp:permlink
/txp:article_custom
2.2 excerpt:
<txp:article_custom wraptag="ul" break="li"
txp:permlink<txp:title />/txp:permlink
/txp:article_custom
in all feed items
Reason: $thisarticle global gets overwritten while parsing the embedded
article_custom tags.
Attachment: feeds-with-embedded-article-tags-r3266.patch
Original issue: http://code.google.com/p/textpattern/issues/detail?id=27
The text was updated successfully, but these errors were encountered: