Support » Plugin: CiviEvent Widget » Locations are not being displayed for events

  • Hi…

    Locations are not being displayed for events.

    This is in a fresh install of CiviCRM (4.7.19), without the sample data import; and the CiviEvents Widget is also the latest, at version 3.1. At first I added only one event. This issue has occurred with WP 4.8 and the previous version installed.

    In the file civievent-widget.php, after this line:

    $loc = CRM_Utils_Array::value( 'api.Address.getsingle', CRM_Utils_Array::value( 'api.LocBlock.getsingle', $result, array() ), array() );

    …when I:

    var_dump($loc)

    …it yields:

    array(3) { ["count"]=> int(2) ["is_error"]=>; int(1) ["error_message"]=> string(32) "Expected one Address but found 2" }

    So later in the code, the address elements are NULL.

    In the database column civicrm_address, there are only two records: one is the address for the event, and the other is my own organization/contact address for the website.

    But when I add a second event with a new address the dump changes:

    array(3) { ["count"]=> int(3) ["is_error"]=> int(1) ["error_message"]=> string(32) "Expected one Address but found 3” }

    So it appears that api.Address.getsingle is finding all addresses in the database, not just the single address associated with each event.

    Maybe a CiviCRM bug, in api.Address.getsingle?

    Or maybe there are parameters missing from your call to api.Address.getsingle?

    Thanks…

    • This topic was modified 4 years, 4 months ago by Thought Nozzle. Reason: Formatting code
    • This topic was modified 4 years, 4 months ago by Thought Nozzle.
Viewing 1 replies (of 1 total)
  • Hi,
    I’m having the same issue, though I have less technical knowledge than Thought Nozzle. Has anyone found a fix or another plugin?
    Thanks

Viewing 1 replies (of 1 total)
  • The topic ‘Locations are not being displayed for events’ is closed to new replies.