• Resolved doffine

    (@doffine)


    Hello @awelzel,

    we just updated a good dozens of websites with your new v2.52. After the update a command like…

    [timed-content-server hide="2019-FEB-11 00:01:00 Europe/Berlin"]CONTENT[/timed-content-server]

    …doesn’t work anymore. The content that should be hidden is not hidden anymore on all of our websites that use your plugin. We had to manually rollback all versions to v2.51 – there it worked again.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Arno Welzel

    (@awelzel)

    In short: I’ll add a fix for this, sorry for the trouble.

    You should rollback to version 2.10 until an update to 2.53 is ready! 2.51 is not enough!

    More detailed:

    Since version 2.50 shortcuts and rules don’t use localized date values like “2019-FEB-11” or “02/11/2019” any more. The format is now always YYYY-MM-DD HH:MM TZ. This is also the format the rule editor and the TinyMCE dialog now use.

    In your case this should be:

    [timed-content-server hide="2019-02-11 00:01:00 Europe/Berlin"]CONTENT[/timed-content-server]

    The reason why your shortcode “worked” before was actually a bug in 2.51 which causes all content to be hidden, if the “hide” attribute is either missing or could not be parsed at all. The new version 2.52 will ignore the now invalid “hide” attribute and just treat it as non-existent.

    I’ll try to explain the reason for this decision:

    The situation before – when I started to maintain the plugin, I did not create it in the first place – was, that the date values were not really parsed in a defined manner but more or less “guessed” from what is in the shortcode. In fact the value from a shortcode was just put to the PHP function strtotime() without sanitizing anything except trying to translate local month names to English, so strtotime() would have a chance to understand it.

    For example what this means:

    [timed-content-server hide="02/11/2019 00:01:00 -0600"]CONTENT[/timed-content-server]

    It is not clear if 02/11/2019 means February 11, 2019 or November 2, 2019. And yes, I had a number of support issues just because of that.

    Therefore the change to ISO style formats.

    However I understand, that you can’t change all the shortcodes in dozens of websites. Therefore I’ll add a fallback – if the date can not be parsed as yyyy-mm-dd or mm/dd/yyyy the last option will be the old way using strtotime(). Then old your rules should work again.

    The update should be available within 24 hours. Until then you should rollback to 2.10 to be sure that the existing rules work as intended.

    Thread Starter doffine

    (@doffine)

    Hello @awelzel,

    thanks for your quick and detailed reply. We perfectly understand all what you said. We are looking forward to the fix and will rollback to 2.10 meanwhile.

    Thanks again for your work!

    Plugin Author Arno Welzel

    (@awelzel)

    I just pushed an update to version 2.53. The existing shortcodes with localized date/time values should work again.

    For reference see my demo page: https://wordpress-demo.arnowelzel.de/timed-content/

    Please let me know, if this works for you.

    I also improved the format of the debug messages in shortcodes with debug="true", so it is a bit easier to see what the plugin actually does.

    Thread Starter doffine

    (@doffine)

    Hello @awelzel,

    we just updated to v2.53 – all is fine now! Thanks a lot for your quick work!

    Plugin Author Arno Welzel

    (@awelzel)

    Thanks for the feedback.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘v2.52 Bug: timed-content-server hide does not work’ is closed to new replies.