WP-for-Church / Sermon-Manager

Sermon Manager for WordPress is the #1 plugin for churches who want to manage their sermons easily and missionally.
https://wordpress.org/plugins/sermon-manager-for-wordpress/
GNU General Public License v2.0
44 stars 34 forks source link

Add separate sermon date field back #77

Closed nikola3244 closed 7 years ago

tythewebguy commented 7 years ago

Some questions from the post on WordPress.org, specifically...

Reasons the date was removed: – Bad compatibility with WordPress and themes; – Constant influx of emails related to bugs related to sermon dates;

What were the compatibility problems and bugs you were hearing about? I've just started using the plugin, so there's a chance I'll run into some of those problems myself, in the future.

For anyone interested in the other WordPress thread discussing this: https://wordpress.org/support/topic/sermon-data-is-no-longer-available/

paulkosciecha commented 7 years ago

I'd concur that this is an important feature to have back in. The way Wordpress has the publish date is not convenient for those entering the details and a separate date field is much better.

nikola3244 commented 7 years ago

@tythewebguy The main problem was that it was not coded properly since the beginning, there were couple big mistakes:

  1. Plain text date was saved (without the time!) initially, and then in some plugin version, someone suddenly changed to Unix time in code, without creating proper backwards compatibility or conversion code
  2. Code somewhere used Unix time, and somewhere used text date
  3. If I recall correctly (based on support requests), dates were saved as plain text in multiple formats, depending on Sermon Manager version
  4. Also, nobody did proper plugging into get_the_date and get_the_time filters, so those custom Sermon dates were used just at couple places.

So, you can imagine what kind of issues all that can cause.

But, someone actually tried to add that functionality, but they gave up because it was buggy (there's a function for time under it as well). So, when we took over the plugin, I rewrote them and put them back into life, also added more checks for dates (and converting), updated the views, etc... but user reports did not stop coming - mostly because there were plenty of some ancient views that used some functionality that we were not aware of.

Anyway, when I think about it now, removing sermon date was not the best idea. We wanted to remove the possibility for more issues to arise and to improve UX, by having one less date field to add (we thought that WordPress "Publish" date would be just enough), but, we were wrong.

So, date field will be added back, but coded properly this time. :slightly_smiling_face: (With 100% backwards compatibility as usual)

This is just one step at rewriting Sermon Manager codebase, which should fully start in the next few days.

tythewebguy commented 7 years ago

@nikola3244 - Thanks for the additional detail--very good to see and better understand the nuances of WordPress development that are easy to overlook and ignore. It's always fun to inherit someone else's code, eh? :-)