• Resolved GideonLupine

    (@gideonlupine)


    My error logs is being filled with these “Attempt to read property” PHP Warnings every 5 or 10 seconds.

    Below is just for the time of 20:10:20.

    I have no idea where it is coming from or why. It is making it hard to manage the server because the logs are filled with noise.

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "state_province" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 27

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "state" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 27

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "province" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 27

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "address" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 28

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "address" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 28

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "post_title" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 32

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "state_province" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 27

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "state" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 27

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "province" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 27

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "address" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 28

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "address" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 28

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "post_title" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 32

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "state_province" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 27

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "state" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 27

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "province" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 27

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "address" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 28

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "address" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 28

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "post_title" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 32

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "state_province" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 27

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "state" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 27

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "province" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 27

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "address" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 28

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "address" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 28

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "post_title" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 32

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "state_province" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 27

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "state" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 27

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "province" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 27

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "address" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 28

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "address" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 28

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "post_title" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 32

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "state_province" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 27

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "state" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 27

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "province" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 27

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "address" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 28

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "address" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 28

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "post_title" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 32

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "state_province" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 27

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "state" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 27

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "province" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 27

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "address" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 28

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "address" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 28

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "post_title" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 32

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "state_province" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 27

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "state" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 27

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "province" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 27

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "address" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 28

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "address" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 28

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "post_title" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 32

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "state_province" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 27

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "state" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 27

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "province" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 27

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "address" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 28

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "address" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 28

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "post_title" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 32

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "state_province" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 27

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "state" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 27

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "province" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 27

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "address" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 28

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "address" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 28

    [09-Aug-2024 20:10:20 UTC] PHP Warning: ?Attempt to read property "post_title" on int in /var/www/html/website/wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php on line 32
Viewing 15 replies - 16 through 30 (of 31 total)
  • Thread Starter GideonLupine

    (@gideonlupine)

    I am getting these errors:

    [13-Aug-2024 07:56:27 UTC] Event Venue Error: Venue is not an object for event ID: 6569. Actual type: integer. Value: 5633

    [13-Aug-2024 07:56:27 UTC] Event Venue Error: Venue is not an object for event ID: 6569. Actual type: integer. Value: 5633

    [13-Aug-2024 08:04:28 UTC] Event Venue Error: Venue is not an object for event ID: 6569. Actual type: integer. Value: 5633

    [13-Aug-2024 08:04:28 UTC] Event Venue Error: Venue is not an object for event ID: 6569. Actual type: integer. Value: 5633

    [13-Aug-2024 08:45:25 UTC] Event Venue Error: Venue is not an object for event ID: 14225. Actual type: integer. Value: 7298

    [13-Aug-2024 08:45:25 UTC] Event Venue Error: Venue is not an object for event ID: 14261. Actual type: integer. Value: 7298

    [13-Aug-2024 08:45:25 UTC] Event Venue Error: Venue is not an object for event ID: 14350. Actual type: integer. Value: 7298

    Thread Starter GideonLupine

    (@gideonlupine)

    I found a venue called “Online”, but it has no values. Just the title.

    What would I do in that situation?

    Plugin Support tristan083

    (@tristan083)

    Hi @gideonlupine ,

    Thank you for your message.

    Since the “Online” venue is not a valid “venue”, I would recommend checking if there are any events associated with that venue and if there are none, I recommend removing it from the admin dashboard -> Events -> Venues menu.

    Thread Starter GideonLupine

    (@gideonlupine)

    I am the admin, so I don’t use The Events Calendar directly.

    Apparently, the staff are complete idiots.

    What is the best practice for an event that is “Online?” The location is a website or online meeting tool, not an actual map address.

    I don’t think they read or understand your manual. Whatever they think they are doing is obviously wrong.

    I understand their intent, I just don’t know what is the best way to do it.

    I do know they keep changing their webinar or meeting app like changing underwear, so I need a generic best practice.

    Thread Starter GideonLupine

    (@gideonlupine)

    Your plugin needs to have venue.php updated.

    You need to add basic error checking and just not assume everything is rosy all the time.

    I made some assumptions, but your programmer should be able to adapt quickly. I commented my changes, and left the rest of the code intact.

    I added three basic checks:

    • Check for $event->venues existence and type being an object
    • Add check for $venue = $event->venues[0] being an object
    • Add default empty strings for undefined properties

    The code fails on the second check, but not the first. Why is that? What is staff who are regular users who don’t know how to work anything doing wrong to cause this? So I can stop whatever they are doing.

    <?php

    /**

     * View: List Single Event Venue

     *

     * Override this template in your own theme by creating a file at:

     * [your-theme]/tribe/events/v2/list/event/venue.php

     *

     * See more documentation about our views templating system.

     *

     * @link https://evnt.is/1aiy

     *

     * @version 6.2.0

     * @since 6.2.0 Added the
    tec_events_view_venue_after_address action.

     *

     * @var WP_Post $event The event post object with properties added by the tribe_get_event function.

     * @var string  $slug  The slug of the view.

     *

     * @see tribe_get_event() For the format of the event object.

     */

    // FIX: Check for $event->venues existence and type

    if (!isset($event->venues)) {

      error_log('Event Venue Error: $event->venues is not set for event ID: ' . (isset($event->ID) ? $event->ID : 'unknown'));

      return;

    } elseif (!is_object($event->venues)) {

      error_log('Event Venue Error: $event->venues is not an object for event ID: ' .

        (isset($event->ID) ? $event->ID : 'unknown') .

        '. Actual type: ' . gettype($event->venues) .

        '. Value: ' . var_export($event->venues, true));

      return;

    }

    // FIX: END

    if (! $event->venues->count()) {

      return;

    }

    $separator            = esc_html_x(', ', 'Address separator', 'the-events-calendar');

    $venue                = $event->venues[0];

    // FIX: Add check for $venue = $event->venues[0] being an object

    if (! is_object($venue)) {

      error_log('Event Venue Error: $venue=$event->venues[0] is not an object for event ID: ' .

        (isset($event->ID) ? $event->ID : 'unknown') .

        '. Actual type: ' . gettype($venue) .

        '. Value: ' . var_export($venue, true));

      return;

    }

    // FIX: END

    // FIX: Add default empty strings for undefined properties

    $append_after_address = array_filter(array_map('trim', [

      $venue->state_province ?? '',

      $venue->state ?? '',

      $venue->province ?? ''

    ]));

    // FIX: END

    // FIX: Add default empty strings for undefined properties

    $address = ($venue->address ?? '') . (($venue->address ?? '') && ($append_after_address || isset($venue->city)) ? $separator : '');

    // FIX: END

    ?>

    <address class="tribe-events-calendar-list__event-venue tribe-common-b2">

      <span class="tribe-events-calendar-list__event-venue-title tribe-common-b2--bold">

        <?php

        // FIX: Add default empty strings for undefined properties

        echo wp_kses_post($venue->post_title ?? '');

        // FIX: END

        ?>

      </span>

      <span class="tribe-events-calendar-list__event-venue-address">

        <?php

        echo esc_html($address);

        if (! empty($venue->city)) :

          echo esc_html($venue->city);

          if ($append_after_address) :

            echo $separator;

          endif;

        endif;

        if ($append_after_address) :

          echo esc_html(reset($append_after_address));

        endif;

        if (! empty($venue->country)):

          echo $separator . esc_html($venue->country);

        endif;

        ?>

      </span>

      <?php

      /**

       * Fires after the full venue has been displayed.

       *

       * @since 6.2.0

       *

       * @param WP_Post $event Event post object.

       * @param string  $slug  Slug of the view.

       */

      do_action('tec_events_view_venue_after_address', $event, $slug);

      ?>

    </address><?php

    /**

     * View: List Single Event Venue

     *

     * Override this template in your own theme by creating a file at:

     * [your-theme]/tribe/events/v2/list/event/venue.php

     *

     * See more documentation about our views templating system.

     *

     * @link https://evnt.is/1aiy

     *

     * @version 6.2.0

     * @since 6.2.0 Added the tec_events_view_venue_after_address action.

     *

     * @var WP_Post $event The event post object with properties added by the tribe_get_event function.

     * @var string  $slug  The slug of the view.

     *

     * @see tribe_get_event() For the format of the event object.

     */

    // FIX: Check for $event->venues existence and type

    if (!isset($event->venues)) {

      error_log('Event Venue Error: $event->venues is not set for event ID: ' . (isset($event->ID) ? $event->ID : 'unknown'));

      return;

    } elseif (!is_object($event->venues)) {

      error_log('Event Venue Error: $event->venues is not an object for event ID: ' .

        (isset($event->ID) ? $event->ID : 'unknown') .

        '. Actual type: ' . gettype($event->venues) .

        '. Value: ' . var_export($event->venues, true));

      return;

    }

    // FIX: END

    if (! $event->venues->count()) {

      return;

    }

    $separator            = esc_html_x(', ', 'Address separator', 'the-events-calendar');

    $venue                = $event->venues[0];

    // FIX: Add check for $venue = $event->venues[0] being an object

    if (!is_object($venue)) {

      error_log('Event Venue Error: $venue=$event->venues[0] is not an object for event ID: ' .

        (isset($event->ID) ? $event->ID : 'unknown') .

        '. Actual type: ' . gettype($venue) .

        '. Value: ' . var_export($venue, true));

      return;

    }

    // FIX: END

    // FIX: Add default empty strings for undefined properties

    $append_after_address = array_filter(array_map('trim', [

      $venue->state_province ?? '',

      $venue->state ?? '',

      $venue->province ?? ''

    ]));

    // FIX: END

    // FIX: Add default empty strings for undefined properties

    $address = ($venue->address ?? '') . (($venue->address ?? '') && ($append_after_address || isset($venue->city)) ? $separator : '');

    // FIX: END

    ?>

    <address class="tribe-events-calendar-list__event-venue tribe-common-b2">

      <span class="tribe-events-calendar-list__event-venue-title tribe-common-b2--bold">

        <?php

        // FIX: Add default empty strings for undefined properties

        echo wp_kses_post($venue->post_title ?? '');

        // FIX: END

        ?>

      </span>

      <span class="tribe-events-calendar-list__event-venue-address">

        <?php

        echo esc_html($address);

        if (! empty($venue->city)) :

          echo esc_html($venue->city);

          if ($append_after_address) :

            echo $separator;

          endif;

        endif;

        if ($append_after_address) :

          echo esc_html(reset($append_after_address));

        endif;

        if (! empty($venue->country)):

          echo $separator . esc_html($venue->country);

        endif;

        ?>

      </span>

      <?php

      /**

       * Fires after the full venue has been displayed.

       *

       * @since 6.2.0

       *

       * @param WP_Post $event Event post object.

       * @param string  $slug  Slug of the view.

       */

      do_action('tec_events_view_venue_after_address', $event, $slug);

      ?>

    </address>
    • This reply was modified 3 months, 2 weeks ago by GideonLupine.
    Plugin Support Darian

    (@d0153)

    Hi @gideonlupine

    Thank you for sharing your valuable insights and suggestions. I will make sure to share this with the team for their consideration.

    Your contribution is important to us, and I appreciate your thoughtful inputs on this matter. Thank you.

    Thread Starter GideonLupine

    (@gideonlupine)

    OK, so can I get an answer on how to best handle an event that is “online”?

    The problem seems to exist because staff don’t know how to handle “online” events like a webinar or presentation that does not have an actual street address on Google Maps.

    Do I create a venue that is just a link without an address or something?

    Do I create a event that simply does not have a venue?

    The latter would be odd because it would make consistency harder.

    Not knowing anything about anything, it seems to me there could be many ways to skin this cat. What is the best way that you guys recommend?

    Plugin Support Santiago

    (@sjaure)

    Hey @gideonlupine,

    Santiago here from tech support. Just checking, do you have a Pro license for any of our plugins? If so, you can reach out directly to our helpdesk. If not, we can keep chatting here.

    About those log messages: you might want to try turning off Debug mode by going to Events -> Settings -> General -> Debug mode. That should help clear up at least one of the warnings the-events-calendar/common - Log: Initializing Tribe Events. As for the others, I’m not sure they’ll disappear just by disabling the logs, but it’s worth a try.

    Looking at the template code, I want to clarify something; we don’t validate $venue before accessing its properties because it’s supposed to be an object, as generated by our plugin. If it’s turning out to be something else, like an integer or null, that means something unexpected is happening earlier in the code.

    It could be that something in your site setup is conflicting with our plugin, or maybe there’s a bug we need to investigate. In any case, I wouldn’t recommend spending time adding extra validations. It’s better to figure out why it’s happening and address it at the source.

    Since you mentioned you’re working with custom code, do you think any of it might be interacting with our plugin’s templates, hooks, or functions?
    While you’re checking that out, I’ll work on a troubleshooting strategy to help us dig deeper into what’s going on.

    Best!

    Thread Starter GideonLupine

    (@gideonlupine)

    I got everything solved. Debugging is covered.

    None of our custom code touches anything related to events.

    The trouble seems to be events that are online only.

    I just don’t know how to best handle an event that is “online”?

    Staff don’t know how to handle “online” events like a webinar or presentation that does not have an actual street address on Google Maps. I see them doing weird stuff and different people are doing their own thing. So what should I tell them is the official right answer?

    Do we create a venue that is just a link without an address or something?

    Do I create a event that simply does not have a venue?

    The latter would be odd because it would make consistency harder.

    Not knowing anything about anything, it seems to me there could be many ways to skin this cat. What is the best way that you guys recommend to deal with online only events?

    You guys said that creating a venue without an address is bad. Well, users are doing that because they don’t know better. What should I tell them to do when they have an online event?

    • This reply was modified 3 months, 1 week ago by GideonLupine.
    Thread Starter GideonLupine

    (@gideonlupine)

    I am looking for a simple answer of, “The Events Calendar guys say that when you have an online only event, you do steps X, Y, and Z. Do that, and everyone will be happy and I can leave early.”

    Plugin Support Santiago

    (@sjaure)

    Hi, thanks for following up.

    Answering your question, yes, we do offer a way to manage online events through our Virtual Events feature, but it requires a Calendar Pro premium license.

    If you’re using the free version of the plugin, you’re limited to creating standard venues.
    If I understand correctly, you’ve set up a venue titled “Online” to represent your online events, is that correct?
    That approach should work fine, and you shouldn’t get any errors or warnings due to missing data for that venue. As I mentioned earlier, the $venue validations happen earlier in the code, to ensure it’s an object before the template accesses it.

    Have you been able to confirm that the warnings are specifically related to assigning the “Online” venue to an event, or is this an assumption based on the warning messages?
    I’m curious to know what happens on the front end when the venue properties are inaccessible. Does the venue data simply not display at all for that event?

    To help debug this issue, could you add the following line to the template right after $venue = $event->venues[0];?

    error_log('Venue data type: ' . gettype($venue));

    This will give us a clearer understanding of the data being passed.

    Plugin Support Darian

    (@d0153)

    Hi @gideonlupine

    I hope everything is going smoothly for you. I just wanted to touch base and inquire if you had the opportunity to review the response above as it has been some time since we last heard from you. Looking forward to your reply.

    Plugin Support Darian

    (@d0153)

    Hi there,

    This thread has been inactive for a while, so we’ll go ahead and mark it Resolved. Please open a new thread if any other questions arise, and we’d be happy to help.

    Hi – I’m experiencing the same messages every 15 seconds – my error log is huge because of these errors and I have to manually delete it every few days. Any fixes planned for this plugin?

    27: $append_after_address = array_filter( array_map( 'trim', [ (string)$venue->state_province, (string)$venue->state, (string)$venue->province ] ) );
    28: $address = (string)$venue->address . ( (string)$venue->address && ( $append_after_address || (string)$venue->city ) ? $separator : '' );

    When something wants to read a string but an int is given in that data, why not cast ist to string?
    I did that in the file /wp-content/plugins/the-events-calendar/src/views/v2/list/event/venue.php

    Works like a charm, Warnings are gone, I phear the update ??

Viewing 15 replies - 16 through 30 (of 31 total)
  • You must be logged in to reply to this topic.