Support » Plugin: My Calendar » archive.php issue

  • Resolved Skrivener


    I had an issue with using this plugin and an archive.php page, where on line 74 of my-calendar-core.php $this_post->ID was not defined (presumably because the nature of the query object is a bit different for archives?). I resolved by editing that line to:

    if( isset($this_post->ID) ) $id = $this_post->ID;

    Also perhaps worth noting, I am seeing warnings along these lines (I see them through debug bar plugin):

    WARNING: wp-content/plugins/my-calendar/my-calendar-core.php:82 - in_array() []: Wrong datatype for second argument
    WARNING: wp-content/plugins/my-calendar/my-calendar-core.php:939 - in_array() []: Wrong datatype for second argument
    WARNING: wp-content/plugins/my-calendar/my-calendar-core.php:228 - in_array() []: Wrong datatype for second argument

    and numerous notices along these lines (just quote one for example):

    NOTICE: wp-content/plugins/my-calendar/my-calendar-core.php:82 - Undefined variable: array

    I’m not sure to what extent, if any, these messages pose a problem but my functionality seems ok.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Joe Dolson


    None of those notices will pose any problem (notices are one of the lowest levels of error in PHP), but thanks for noting them; many of these are already resolved in the development of version 2.2, but I’ll check over what you’ve cited, to verify I’ve covered them.

    Thanks Joe. I’m glad I found your plugin; numerous others disconnect the calendar grid layer from the actual event output (eg. table grid html output first, then a bunch of event divs output afterward and absolutely positioned into place). Deep custom styling is a nightmare if there is no simple way to tell if a given cell contains any or which events. My Calendar not only contains the events within the cells but also has a nice selection of classes to style – quite a relief!

    This issue was resolved as originally stated (edit line 74 of my-calendar-core.php to: if( isset($this_post->ID) ) $id = $this_post->ID; ). Marking as resolved, because I forgot to earlier.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘archive.php issue’ is closed to new replies.