Comments (7)
Thanks for the report, but pubDate
element generation is handled by WordPress itself. If you believe that there is a bug, submit it to official WordPress bug tracker: https://core.trac.wordpress.org/
Related line: https://core.trac.wordpress.org/browser/trunk/src/wp-includes/feed-rss2.php#L92
from sermon-manager.
Thanks for the report, but
pubDate
element generation is handled by WordPress itself.
This statement is partly incorrect, or only partly correct, depending on how you look at it.
It may be correct (and probably is) for the child pubDate
element of the channel
element, however it is not for the child pubDate
element of the item
element. I did take a closer look at Sermon Manager's podcast RSS feed code. The later (item
case) is definitely currently handled by the Sermon Manager directly. Hence, please reopen this issue because it only pertains to the Sermon Manager.
from sermon-manager.
Thanks for adding additional comments.
The line of code that I have sent is from official WordPress RSS2 code. And it is used for creating pubDate
element as a child of item
element, as you can see the opening item
tag just couple lines above it.
It is true, we have copied that line into our own RSS2 template, as you can see here. It is completely identical to official WordPress code.
So, if there is a bug in Sermon Manager code, that means that it is present in the WordPress itself.
Unfortunately, we do not have time or resources to fix core WordPress issues, so please, if you believe that there is an issue, create it in the official WordPress bug tracker. As soon as they fix it, we will update the code in Sermon Manager.
Or, if you have time and knowledge, make a pull request and we will gladly accept it. (And again, you could also make a pull request or open an issue on WordPress bug tracker as well)
from sermon-manager.
Perhaps I should have added which RSS feed I am referring to. The issue refers to the podcast RSS feed of the Sermon Manager, not the sermons feed itself.
Currently, I do not have much time to dig deeper into the Sermon Manager code either but I may post a PR to fix this issue some time in the future.
from sermon-manager.
Yeah, I've been talking about podcast RSS feed whole time. The links in my previous comments lead all to wpfc-podcast-feed.php
file. So, it's for podcasts
from sermon-manager.
At first glance, the code may look identical to WordPress RSS code, however it does not behave like WordPress code. There is some sort of function redirection or aliasing going on. The function effectively responsible for generating the pubDate
element's body time stamp string in the item
element of Sermon Manager is wpfc_sermon_date()
. I am not a PHP expert, so I am unable to identify the root cause of the issue or what to actually fix yet. But, it is definitely not working as intended. To me, https://github.com/WP-for-Church/Sermon-Manager/blob/master/includes/podcast-functions.php#L24 looks like where this sort of function alias is going off the rails (so to speak).
Test, test, and once again test. Do not assume anything unless you have looked through the full calling stack. 😉
from sermon-manager.
I took another look at this issue, and I still stay by my words - this is an issue in WordPress itself, and I will now provide proof for my statement.
First, with default settings, Sermon Manager uses core WordPress file, not custom one for Sermon dates, pubDate
of item
element.
The code is located at line 92 of feed-rss2.php.
Copied here for consistency:
<pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_post_time('Y-m-d H:i:s', true), false); ?></pubDate>
There is no way to override that line because of the way RSS feed is created (but actually, I got an idea but it's a bit hacky - so it won't be implemented).
If we take a look at mysql2date function:
function mysql2date( $format, $date, $translate = true ) {
if ( empty( $date ) )
return false;
if ( 'G' == $format )
return strtotime( $date . ' +0000' );
$i = strtotime( $date );
if ( 'U' == $format )
return $i;
if ( $translate )
return date_i18n( $format, $i );
else
return date( $format, $i );
}
...we would see that it uses PHP's core date()
function (because $translate
is set to false
), and PHP manual for that function says that r
parameter should be used for date format if we want RFC2822 formatted date.
You said:
Interestingly, the implementation produces correct date and time stamps in the body of the lastBuildDate element regardless of the exporting system's (or process') current locale.
And I agree, because in the same file, couple lines above, WordPress uses r
as the format parameter for the date. That's why lastBuildDate
shows correctly.
So, that's why I strongly recommend you to submit a bug to WordPress, because this is not an issue on our end.
I would love to be proved wrong, but everything points to WordPress core files. (if you edit feed-rss2.php
on your local instance and reload Sermon Manager podcasts feed, it will show changes. Don't forget to clear local browser and server cache)
from sermon-manager.
Related Issues (20)
- "Theme Compatibility" Strips Audio and Video on Archive Page
- Sermon description formatting problem
- Hyperlinks are Stripped in the Description Field in the Sermon Details Section HOT 1
- https conversion not desired
- Can't add new sermons
- Single Sermon Page - Fatal error: Uncaught Error: Call to undefined function is_plugin_active() HOT 2
- REST API does not have sermon series images
- Unable to open sermon due to fatal error in `sermons.php` HOT 1
- Hooks to adjust media URL in wpfc_render_audio and RSS feed view.
- Pagination error
- Single Sermon View only shows Text Description
- Sermon Manager Pro causes WordPress Site to Crash
- Sermon feed broken due to nested ternary operatory ?
- Unable to load sermons via Upload tab.
- Attempt to read property "ID" on null
- RSS Feed Encoding URLs
- Who is managing the Plugin? HOT 1
- Since Plugin-Update after 2.16.x plugin does not show media-content
- Security Contact
- Feature Request: Public Function to return audio url.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sermon-manager.