Closed pesseyjulien closed 3 years ago
Thanks will look into this shortly. The latest version is 0.0.11 though FYI.
Can you tell me what you're using locally and in prod? i.e. XAMP / WAMP? Linux / Windows? php version?
Cheers,
Thanks for the quick reply.
I updated to 0.0.11 and then I had to rename the 'functions.php' file and modify the include_once accordingly in the inc.php file and then it worked !
So i'm guessing there is a conflict somewhere but I do really know where :/
Best, Julien
OK, weird, this version fixed a similar issue, I don't get why it's happening and haven't been able to reproduce it myself.
Would you mind letting me know about the environments you're using?
No pb, running a managed hosting server on OVH with php7.0.33 (need to update..)
And locally running through MAMP v6 and php7.4
Thanks, Julien
Thanks @pesseyjulien, I can't reproduce this still, but I'm guessing that in some environments doing things like...
include_once( 'functions.php' );
...is failing to load the file if there is already one loaded with that name, even from another DIR.
Since I can't reproduce the error, would you mind testing this for me please? Looking at how other plugins include files it looks like they use the __DIR__
constant, so, could you please try updating the inc.php file to this:
<?php
include_once( __DIR__ . '/functions.php' );
include_once( __DIR__ . '/api/api.php' );
include_once( __DIR__ . '/class/class.php' );
With that functions.php file renamed back to functions.php of course. I think this should force php to include the file using it's full path, which should be unique...
Cheers,
Hi,
Yep it's working now :)
I guess specify the path helps to prevent any conflict. Good catch ;)
Just weird that locally there was no issue, but well, programming mystery !
Best, Julien
Yeah it is weird, like I said, for me locally and on a few different servers and IDEs I don't get the issue. I will sort that and push a new version to wp.org in a mo.
I've just pushed 0.0.12 to wp.org so will close this for now, but please do let me know of any further issues!
Hi again,
Quick suggestion, when the email is not found, the error code should be 404 and not 500 :)
{
"code": "bad_email",
"message": "No user found with this email address.",
"data": {
"status": 500
}
}
Best, Julien
Yes you're right have updated that on here and will go into the next version whenever that is!
Hi,
Getting the following error in production while it’s working fine locally :
WordPress 5.6.2 and plugin v0.0.8
Tried to disabled 'JWT Authentication for WP-API' plugin but still the same issue.
Any idea what could be wrong ?
Thanks in advance, Julien