• I’ve noticed this behavior in the latest version of A1EC. If you use a shortcode like this:

    [ai1ec cat_name=”Events” view=”monthly”]

    and if the Events category does not have any events listed for the current month, the calendar’s formatting explodes, looking like every element has about 100px of padding on the top and bottom. If you view source, it looks like there are many unclosed paragraph tags in the calendar, though I’m not sure if it is related.

    As soon as you add one event, the calendar shows up normally. However, we don’t have events every month in every category, so it doesn’t really work.

    https://www.ads-software.com/plugins/all-in-one-event-calendar/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi,

    This sounds like a conflict with your WP theme, can you please provide a link to your calendar page,

    Thread Starter typeless

    (@jbalyo)

    Hi Benjamin-

    Here is one with no events currently, (until 9/1/2016):

    https:// slpr . net /programs/adult/fitness/

    Thanks

    Thread Starter typeless

    (@jbalyo)

    Benjamin-

    This looks like a similar issue:

    https://time.ly/forums/topic/unwanted-br-tags-spoiling-display-no-css/

    When I compare the source code between a calendar with events to one without events, in the one without I see br and p tags all throughout the calendar code. I think this is what is causing all that extra padding, rather than CSS.

    I tried to implement the fix suggested in the aforementioned forum thread, but it did not work – such would be a temporary solution anyways since the next update would overwrite it.

    Thanks

    Thread Starter typeless

    (@jbalyo)

    Benjamin-

    Okay, I figured there must be something happening in /app/view/event/content.php which wasn’t taking place in calendars without events, so after a quick study, I found this line:

    $content = preg_replace( ‘/\s+/’, ‘ ‘, $content );

    and transposed it into /app/view/calendar/shortcode.php right before $page_content[‘html’] gets returned:

    $page_content[‘html’] = preg_replace( ‘/\s+/’, ‘ ‘, $page_content[‘html’] );

    After that line is in place, everything appears right as rain – any chance of getting this fix implemented as part of the core code so we don’t need to remodify after every update? Should I branch a github?

    Thanks

    I am glad you find a way through the issue and thank you for sharing workaround. I forwarded this to the development team.

    Thanks,
    Ben

    Thread Starter typeless

    (@jbalyo)

    Hi Ben-

    It’s been 3 months but this fix still hasn’t been implemented – updates continue to break our site until I go in and manually patch the plugin each time. I’m assuming the developers have been notified that there is a problem and a workaround? Is there any word yet when this will be included in the plugin?

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Calendar explodes if there are no events’ is closed to new replies.