Okay
  Public Ticket #1857262
not working after update
Closed

Comments

  •  1
    akifersoy started the conversation

    after update to version 1.4.1 my site is not working.

    inspecting page said:

    Failed to load resource: the server responded with a status of 500 ()
    Selected Element
    <div class="so-widget-sow-editor so-widget-sow-editor-base">…</div>

    https://www.terapistim.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/slots&serviceId=1&providerIds[]=1&extras=[]&group=1&persons=1

    Please help!

  • [deleted] replied

    Hi akifersoy,

    It is fixed and it should work now.

  •  1
    akifersoy replied

    Thanks a lot.

    May I learn how you fixed it, so that I may solve if a similar problem arises and I will have a deeper understanding of the plugin.

  • [deleted] replied

    Hi akifersoy,

    There was some code in version 1.4.1 that was not supported by PHP 5.6 that you have. In file ../wp-content/plugins/ameliabooking/src/Domain/Services/TimeSlot/TimeSlotService.php in function getProviderSpecialDayOccupiedTimeIntervals I have replaced this code:

    $specialDaysPeriod = new \DatePeriod(
    $specialDay->getStartDate()->getValue(),
        new \DateInterval('P1D'),
        (clone $specialDay->getEndDate()->getValue())->modify('+1 day')
    );

    with:

    $endDateCopy = clone $specialDay->getEndDate()->getValue();
    $specialDaysPeriod = new \DatePeriod(
        $specialDay->getStartDate()->getValue(),
        new \DateInterval('P1D'),    $endDateCopy->modify('+1 day')
    );