Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing file called CustomerCommunicationEmailAddr.php #310

Open
rstoeber opened this issue Apr 5, 2022 · 14 comments
Open

Missing file called CustomerCommunicationEmailAddr.php #310

rstoeber opened this issue Apr 5, 2022 · 14 comments

Comments

@rstoeber
Copy link

rstoeber commented Apr 5, 2022

We've been using quickbooks-php for years and never had this problem. Today we suddenly started getting errors saying:

require_once(/var/www/workglue/qbo/quickbooks-php/QuickBooks/IPP/Object/CustomerCommunicationEmailAddr.php): failed to open stream: No such file or directory in /var/www/workglue/qbo/quickbooks-php/QuickBooks/Loader.php on line 56

There is no file with that name, and it looks like there never was (I don't see it in this GitHub repository). However, there is a file called CustomerCommunicationAddr.php

I was desperate and trying anything so I simply copied that file and made a small change to the content like this and the error went away:

@ve7tcc
Copy link
Contributor

ve7tcc commented Apr 5, 2022

It might be a case sensitivity issue, compare the full paths.

Did you upgrade PHP? I saw it happen when I upgraded previously.

@rstoeber
Copy link
Author

rstoeber commented Apr 5, 2022 via email

@stevemcquinn
Copy link

I got the exact same error today, before that everything was working fine for a few years.

I'm also copied CustomerCommunicationAddr file and made a small changes, but this leads to new errors.

@ve7tcc
Copy link
Contributor

ve7tcc commented Apr 5, 2022

The case sensitivity might be on a directory name, not a file.

@rstoeber
Copy link
Author

rstoeber commented Apr 5, 2022

Nothing was renamed, and the problem is not case sensitivity. For some reason that I don't understand at all, a file is trying to be loaded, but that file does not exist. Look for yourself, it's not here in the official repository.

After some very quick testing it seems I was able to fix the problem, for myself at least. Not getting any other errors right now and my QuickBooks Online interaction is working again.

In case this helps anyone, I added a file called CustomerCommunicationEmailAddr.php with this content:

QuickBooks_Loader::load('/QuickBooks/IPP/Object.php');

class QuickBooks_IPP_Object_CustomerCommunicationEmailAddr extends QuickBooks_IPP_Object
{

}

@stevemcquinn
Copy link

Thanks, this actually fixed this issue.
I agree that this file does not exist and has never been in this repository...

@rstoeber
Copy link
Author

rstoeber commented Apr 5, 2022

I wish I could explain what happened, but so far I have not figure out what triggered this change. If that php file never existed in the first place, why did the code suddenly try to load it this morning after years of not using it?

@jerry-knight
Copy link

Just found this. Thanks so much for the fix. I'm guessing something changed on the QuickBooks API that triggered this extra include.

@carlbobtx
Copy link

The same happened to me - and my fix was the same. I also think it was a back end change on the API side that broke things - since my code never changed, and that file was never part of this Repo...

@zaden1
Copy link

zaden1 commented Apr 25, 2022

We have had the same result. For us, the timing perfectly aligned with issues with our product key from the Application questionnaire. This fix also worked of us. Thank you.

@tangofour
Copy link

tangofour commented Apr 28, 2022 via email

@aik099
Copy link
Contributor

aik099 commented May 9, 2022

I've created PR #313.

It started to fail because QuickBooks response to the CompanyInfo API call now contains an undocumented CustomerCommunicationEmailAddr XML node. Internally this library is creating a class for every XML node, that has child nodes. That's why you've got an error about the missing PHP file.

@WiredWonder
Copy link

@aik099 Shouldn't the fix be to only auto-create classes where there are objects defined in the library already? That way if the API changes, existing code won't break with random errors.

@aik099
Copy link
Contributor

aik099 commented May 30, 2022

@aik099 Shouldn't the fix be to only auto-create classes where there are objects defined in the library already? That way if the API changes, existing code won't break with random errors.

@galapogos01 , that sounds logical.

Since some (if not most of them) classes for XML parsing are in fact identical (just a blank sub-class of the QuickBooks_IPP_Object class), except for their name, then in class instantiation place (wherever that is) we can create return instance of that QuickBooks_IPP_Object class for cases, when a more specific class is absent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants