Okay
  Public Ticket #3707474
Php error 500
Closed

Comments

  •  2
    Alex started the conversation

    When i'm connected as an Amelia Manager (wp-amelia-manager), i'm not able to take out an appointment in the Front-office

    I've got this error : 

     "message": "Call to undefined method AmeliaBooking\Domain\Entity\User\Manager::getStripeConnect()"

    "file": "/plugins/ameliabooking/src/Application/Services/Reservation/AbstractReservationService.php",

    I think the problem is here :
    wp-contentpluginsameliabookingsrcApplicationServicesUserCustomerApplicationService.php

    method : getNewOrExistingCustomer

     if ($loggedInUser) {
                if ($loggedInUser->getType() === AbstractUser::USER_ROLE_ADMIN) {
                    $userData['type'] = AbstractUser::USER_ROLE_CUSTOMER;

                    $userData['externalId'] = null;
                } elseif ($loggedInUser->getType() === AbstractUser::USER_ROLE_MANAGER) {
                    $userData['type'] = AbstractUser::USER_ROLE_MANAGER;
                }
            }

    Is it normal ? Amelia manager can't just take an appointment ?

  •  1,564
    Marko replied

    Hello there,

    Thank you for reaching out to us.

    We are not sure what you are trying to achieve?

    Are you trying to book on the front end as a customer? If this is the case you must not do this with any employee. You can not be customer and a custoemr at the same time. So employees must always book from the backend and if you book from the front for a customer you must book from the incognito mode and if your employee for some reason wants to be a customer also they must book with a new mail and new sperate user with separate login so that you do not create conflict of roles. Since you can not be custoemr and employee or a manager and customer or manager and emplyoee, etc. You need to have only one mail and one role for one login per user.

    Should you have any further inquiries, we kindly request that you open separate tickets for each question and we will gladly help you there.

    We wish you all the best and hope you have a wonderful day ahead. 


    Kind Regards, 

    Marko Davidovic
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  •  2
    Alex replied

    Thank you for your response.

    I'm indeed trying to take an appointment when I'm connected to the back-office.

    It's not really what i want, but i'm doing tests and i need to be on the back  office to check if my programming is working.


    I understand what you explain, i must not do that, but in fact it is working, with the Wordpress Admin role, with the Amelia Customer role and with the Amelia Employee role.

    The problem occurs only when i'm connected with the Amelia Manager role.

  •  1,564
    Marko replied

    Hello again,

    Please provide me a temporary WP-admin (administrator) user for your site where this happens, so we could log in and take a look ‘from the inside’ as that’s the most efficient way to see and resolve the issue. 

    We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course, we do not provide login data to third parties. 

    You can write credentials here just check PRIVATE Reply so nobody can see them except us. 

    Kind Regards, 

    Marko Davidovic
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  •   Alex replied privately
  •  1,564
    Marko replied

    Hello again,

    We can not find any issues. Can you please give us pass so that we can log in as a manager and test this live.

    Looking forward to your reply.  


    Kind Regards, 

    Marko Davidovic
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  •   Alex replied privately
  •  1,564
    Marko replied

    Hello again,

    You are mentioning front end again 

    9656693683.png

    And we have explained that you must not book in any circumstance from the front end 

    And in previous reply you mentioend backend

    8038429820.png

    So if the issue on the front end or back end? If it is front end there is nothing to look since you are creating conflict of roles and we have already explained in details that you must not book with any role on the front end. 

    Kind Regards, 

    Marko Davidovic
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  •  2
    Alex replied

    Ok, my previous responses were not clear, but yes, i try to take appointment on the front.

    Okay, so it's not possible to do that. However, i just want to say that i could take an appointment with any role connected without any conflict, except Amelia Manager role.

  •  1,564
    Marko replied

    Hello again,

    But if you did this with while logged in to WP you can create if you already didn't crated it will create a conflict of role. This can be matter of time when Amelia developes some issue. We would suggest that you delete all users and all roles and that you create new users with new mails (or to delete them all from PHPmy admin ) for this installation. 

    Should you have any further inquiries, we kindly request that you open separate tickets for each question and we will gladly help you there.

    We wish you all the best and hope you have a wonderful day ahead.  


    Kind Regards, 

    Marko Davidovic
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  •  1
    Andrea replied

    Hello, i can confirm that you probably have a bug. 

    This is the error:

                "type": "Error",
                "code": 0,
                "message": "Call to undefined method AmeliaBooking\\Domain\\Entity\\User\\Manager::getStripeConnect()",
                "file": "*******************public\/wp-content\/plugins\/ameliabooking\/src\/Application\/Services\/Reservation\/AbstractReservationService.php",
                "line": 351

    I was not able to booking on some emails and got 500. 

    Some working and some not with that error, very strange. If, for example, for some (and valid) mail change the point or letter, then working!

    I also not using Stripe and is not set on backoffice as payment service. 

    This error occurs as anonymous user not registered.

    My resolution for "resolve" temporary the problem and bypass Stripe connect, is:

    if (false && $user->getStripeConnect() && $user->getStripeConnect()->getId()) {    $appointmentData['bookings'][0]['customer']['stripeConnect'] = $user->getStripeConnect()->toArray();
    }

    WpAmelia is Version 7.7.1 (30.07.2024)

    Thanks

  •  2
    Alex replied

    Hello Andrea and thank you for your response.

    You find another way to bypass the problem. On my side, I added the method getStripeConnect() and setStripeConnect() in the Manager class : 

     /**
         * @return StripeConnect
         */
        public function getStripeConnect()
        {
            return $this->stripeConnect;
        }

        /**
         * @param StripeConnect $stripeConnect
         */
        public function setStripeConnect($stripeConnect)
        {
            $this->stripeConnect = $stripeConnect;
        }



  •  1,564
    Marko replied

    Hello again,

    We do apologize but your messages are often mixed as we mentioned before and we do not understand what and where the issue is. Can you please send us short one minute video of the issue so that we understand it better if you wish? 

    We wish you all the best and hope you have a wonderful day ahead. 

    Kind Regards, 

    Marko Davidovic
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  •  6
    Yamato replied

    Hi Marko, Alex, Andrea,

    Allow me to jump in this thread as I also encountered the same issue here.

    Marko - I've attached how it looks on frontend. The Amelia booking step just returns to the previous screen because of the PHP 500 error if I try to complete booking with my admin email. If declining employee emails is an intended behavior, it's fine, but I expect some error messages like "this email address is not accepted for booking."

    I was actually surprised to see Amelia 7.7.1 suddenly started declining new appointments on frontend with an employee email address, which was doable in the previous versions. After struggling for an hour, I finally found this solution thanks to Alex and Andrea. I also think that this behavior is a bug.

    Attached files:  php500.mp4

  •  1
    Andrea replied

    Hi,

    Yeah the problem is like in the video, getting stuck.

    In my case, the problem was also related on email not of from employee. So about new mail. 

    Don't know why worked on some mail and in some not (always new mails/account). 

  •  1,564
    Marko replied

    Hello to all,

    1. We need to kindly ask each one of you to open a separate ticket of their own.

    2. What you are trying to achieve is not correct behavior. And by doing this now or in the past you are creating a much larger issues and Amelia can stop work entirely. You must not book with any employee role on the front admin, manager or employee

    3. There is quite easy solution to check this each one of you can open a ticket send us temporary admin credentials in private reposne their own tickets and we will swap your credentials with our and test as a customer and confirm that everything is working

    4. What we can not do and will not do is to check why manager or any other role cannot book from the front end because this must not be done this creates conflict of roles and Amelia can develop much larger issues.

    In our previous responses below we have explained several times that when you book from the front end you need to book either while you are logged out or from incognito mode.

    There is no need to book from frontend when you can do that from backend. Front end is is for customers only. There is no bug you simple must not book with employee roles on the front this is for customers and you must use backend since this is for employees that is why from end and backend exist.

    If any one have a conflict of roles they must open separate ticket for that or any other question.

    We wish you all the best and hope you have a wonderful day ahead. 

    Kind Regards, 

    Marko Davidovic
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  •  6
    Yamato replied

    Hi Marko,

    I understand we should not book as an employee on frontend. It's just fine. But I think we are probably reporting something more critical than you think.

    Would you please escalate our findings to the developers who can look into? Andrea says this issue can occur even without using employee or admin email addresses. I also believe this is a bug because Amelia is calling a getStripeConnect() even if I turned off the Stripe integration completely.

  •  1,564
    Marko replied

    Hello Yamato,

    No, please open your own ticket and send us your issue and screenshots there so that it can be tested before it escalated to developers. 

    In response 3 we mentioend that we would need admin credentials (this goes to Andrea) so that we can test this with our credentials. Please send us credentials in in private response and we will gladly take a look.

    Looking forward to your reply. 


    Kind Regards, 

    Marko Davidovic
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables