Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter coloccia

    (@coloccia)

    No luck, I’m starting to suspect it’s more of a wordpress thing, not a plug-in thing.

    [coloccia@sandbox ~]$ head events.ics 
    
    BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//wp-events-plugin.com//5.55//EN
    BEGIN:VEVENT
    UID:b0f13b55-ffd2-4c08-831a-5aac3ffa985c
    DTSTART:20150401T231500Z
    DTEND:20150402T003000Z
    DTSTAMP:20140811T182625Z
    SUMMARY:Lighthouse District Roundtable - Hilton High School - 04/01/2015 - 7:15 pm - 8:30 pm
    
    [coloccia@sandbox ~]$ head /var/www/html/wp-content/plugins/events-manager/templates/templates/ical.php
    <?php $summary_format = str_replace ( ">", ">", str_replace ( "<", "<", get_option ( 'dbem_ical_description_format' ) ) );
    $description_format = str_replace ( ">", ">", str_replace ( "<", "<", get_option ( 'dbem_ical_real_description_format') ) );
    $location_format = str_replace ( ">", ">", str_replace ( "<", "<", get_option ( 'dbem_ical_location_format' ) ) );
    
    //figure out limits
    $ical_limit = get_option('dbem_ical_limit');
    $page_limit = $ical_limit > 50 || !$ical_limit ? 50:$ical_limit; //set a limit of 50 to output at a time, unless overall limit is lower
    //get passed on $args and merge with defaults
    $args = !empty($args) ? $args:array(); /* @var $args array */
    $args = array_merge(array('limit'=>$page_limit, 'page'=>'1', 'owner'=>false, 'orderby'=>'event_start_date', 'scope' => get_option('dbem_ical_scope') ), $args);
    [coloccia@sandbox ~]$
    Thread Starter coloccia

    (@coloccia)

    [coloccia@sandbox ~]$ head events.ics

    is this file in play
    BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//wp-events-plugin.com//5.5401//EN
    BEGIN:VEVENT
    UID:c19ab304-1a4d-4933-87e6-115728ae3520
    DTSTART:20150312T003000Z
    DTEND:20150312T014500Z
    DTSTAMP:20140910T163213Z

    <?php //define and clean up formats for display
    $summary_format = str_replace ( ">", ">", str_replace ( "<", "<", get_option ( 'dbem_ical_description_format' ) ) );
    $description_format = str_replace ( ">", ">", str_replace ( "<", "<", get_option ( 'dbem_ical_real_description_format') ) );
    $location_format = str_replace ( ">", ">", str_replace ( "<", "<", get_option ( 'dbem_ical_location_format' ) ) );
    //figure out limits
    $ical_limit = get_option('dbem_ical_limit');
    $page_limit = $ical_limit > 50 || !$ical_limit ? 50:$ical_limit; //set a limit of 50 to output at a time, unless overall limit is lower
    //get passed on $args and merge with defaults
    $args = !empty($args) ? $args:array(); /* @var $args array */
    $args = array_merge(array('limit'=>$page_limit, 'page'=>'1', 'owner'=>false, 'orderby'=>'event_start_date', 'scope' => get_option('dbem_ical_scope') ), $args);
    $args = apply_filters('em_calendar_template_args',$args);
    //get first round of events to show, we'll start adding more via the while loop
    $EM_Events = EM_Events::get( $args );
    //calendar header
    $output = "is this file in play
    BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//wp-events-plugin.com//".EM_VERSION."//EN";
    echo preg_replace("/([^\r])\n/", "$1\r\n", $output);

    Yep, this is the right file.

    It is strange, isn’t it?

    Thanks again for the ongoing help.

    Could this be a wordpress/apache thing?

    Both wordpress installs are 4.11, both apache installs are 2.2.15-39.

    Thread Starter coloccia

    (@coloccia)

    Thanks – ok – so I joined lines 1 and 2 and removed the blanks…

    No luck:

    [coloccia@sandbox ~]$ head events.ics

    BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//wp-events-plugin.com//5.5401//EN
    BEGIN:VEVENT
    UID:0af9de35-5213-476b-8949-f15fe323cab4
    DTSTART:20150312T003000Z
    DTEND:20150312T014500Z

    Hmm. My gut suggests it may be a wordpress thing, not necessary a plugin template thing – that the issue is somewhere inside the delivery of the header lines in the file em-ical.php – but I just don’t know enough about wordpress to dig into it yet…

    Thread Starter coloccia

    (@coloccia)

    I’m not using a custom template file, I’m using yours. Show here is the top of /var/www/html/wp-content/plugins/events-manager/templates/templates/ical.php

    <?php //define and clean up formats for display
    $summary_format = str_replace ( ">", ">", str_replace ( "<", "<", get_option ( 'dbem_ical_description_format' ) ) );
    $description_format = str_replace ( ">", ">", str_replace ( "<", "<", get_option ( 'dbem_ical_real_description_format') ) );
    $location_format = str_replace ( ">", ">", str_replace ( "<", "<", get_option ( 'dbem_ical_location_format' ) ) );
    
    //figure out limits
    $ical_limit = get_option('dbem_ical_limit');
    $page_limit = $ical_limit > 50 || !$ical_limit ? 50:$ical_limit; //set a limit of 50 to output at a time, unless overall limit is lower
    //get passed on $args and merge with defaults
    $args = !empty($args) ? $args:array(); /* @var $args array */
    $args = array_merge(array('limit'=>$page_limit, 'page'=>'1', 'owner'=>false, 'orderby'=>'event_start_date', 'scope' => get_option('dbem_ical_scope') ), $args);
    $args = apply_filters('em_calendar_template_args',$args);
    //get first round of events to show, we'll start adding more via the while loop
    $EM_Events = EM_Events::get( $args );
    
    //calendar header
    $output = "BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//wp-events-plugin.com//".EM_VERSION."//EN";
    echo preg_replace("/([^\r])\n/", "$1\r\n", $output);
    
    //loop through events
    $count = 0;

    I put some time into changing around the regular expression matching and the new line characters but never made any progress. I went back to original code, and that is what you see here.

    Thanks for your time and energy thinking about this peculiar issue.

    Thread Starter coloccia

    (@coloccia)

    yes, it is.

    Examples:

    This is from my install:
    [coloccia@sandbox ~]$ head events.ics

    BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//wp-events-plugin.com//5.5401//EN
    BEGIN:VEVENT
    UID:53ef9cc3-5a74-4609-9f76-df19be3262e2
    DTSTART:20150312T003000Z
    DTEND:20150312T014500Z
    DTSTAMP:20140910T163213Z
    SUMMARY:Black Creek District Committee Meeting – Seneca Waterways Service Center (Brighton) – 03/11/2015 – 8:30 pm – 9:45 pm

    This is from your demo install.
    [coloccia@sandbox ~]$ head events1.ics
    BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//wp-events-plugin.com//5.5401//EN
    BEGIN:VEVENT
    UID:314ecc82-f8a6-4400-993d-2aa64a93054d
    DTSTART;VALUE=DATE:20150311
    DTEND;VALUE=DATE:20150312
    DTSTAMP:20150305T101004Z
    SUMMARY:Alanis Morissette – The Wiltern – 11 Mar 15 00:00
    DESCRIPTION:Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s\, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries\, but also the leap into electronic typesetting\, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages\, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\n[nggallery id=13]\n\nThe gallery above is generated by the nextgen gallery plugin
    [coloccia@sandbox ~]$

    Thread Starter coloccia

    (@coloccia)

    Hi, thanks for the suggestion, no, no dice.

    I merged the two first lines into one line:
    <?php //define and clean up formats for display

    I still see the line in the events.ics file.

    [coloccia@sandbox ~]$ head events.ics

    BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//wp-events-plugin.com//5.5401//EN
    BEGIN:VEVENT
    UID:5e86a465-2eab-421f-bce4-c8eb12162ade
    DTSTART;VALUE=DATE:20150307
    DTEND;VALUE=DATE:20150308
    DTSTAMP:20141029T145613Z
    <snip>

    Even when I remove the function call to templates/ical.php from em-ical.php and just deliver text using an echo from within em-ical.php I still get a blank line.

    Other ideas? Thanks again in advance!

Viewing 6 replies - 1 through 6 (of 6 total)