Cylon
Member
Dear Friends,
I'm newbie to XF addon development, and I'm having a problem with my first addon. This add-on extends the XF Rest API by adding a couple of custom endpoints for my special needs.
I developed and tested the addon, on my local development environment, consisting of PhpStorm on windows, and a virtual machine that replicates my production server (UBuntu 18.04, PHP 7.2). The only difference between the virtual machine and the production server, is that the virtual machine has the php remote debug features enabled and opcache disabled (well there are a couple of differences more, for example, I'm not using a firewall on the virtual machine, but I don't think this is relevant).
The strange thing is that the endpoint that I developed, is working very well in my local environment. But when I install the addon on the server, it does not work. The addon is installed without errors. The endpoints and custom classes extensions are added (I checked it in the development panel). But when my client app calls the endpoints, I receive following error message:
"errors": [
{
"code": "endpoint_not_found",
"message": "Requested endpoint not found.",
"params": {
"reason": "invalid_route"
}
}
]
}
Of course, the client app is calling the same custom endpoint with the same action verb that it is calling on my development server. I'm not sure, but I think that the routing works and the COntroller is reached, but not the method (function) that I'm calling.
I double-checked the API keys, the permissions of the files in the folder, the url that are called, deleted and installed the addon again... I'm running out of ideas. No error messages are logged neither in XF, or in the Linux log files...
Maybe you can offer me some advice.
Thanks in advance.
I'm newbie to XF addon development, and I'm having a problem with my first addon. This add-on extends the XF Rest API by adding a couple of custom endpoints for my special needs.
I developed and tested the addon, on my local development environment, consisting of PhpStorm on windows, and a virtual machine that replicates my production server (UBuntu 18.04, PHP 7.2). The only difference between the virtual machine and the production server, is that the virtual machine has the php remote debug features enabled and opcache disabled (well there are a couple of differences more, for example, I'm not using a firewall on the virtual machine, but I don't think this is relevant).
The strange thing is that the endpoint that I developed, is working very well in my local environment. But when I install the addon on the server, it does not work. The addon is installed without errors. The endpoints and custom classes extensions are added (I checked it in the development panel). But when my client app calls the endpoints, I receive following error message:
"errors": [
{
"code": "endpoint_not_found",
"message": "Requested endpoint not found.",
"params": {
"reason": "invalid_route"
}
}
]
}
Of course, the client app is calling the same custom endpoint with the same action verb that it is calling on my development server. I'm not sure, but I think that the routing works and the COntroller is reached, but not the method (function) that I'm calling.
I double-checked the API keys, the permissions of the files in the folder, the url that are called, deleted and installed the addon again... I'm running out of ideas. No error messages are logged neither in XF, or in the Linux log files...
Maybe you can offer me some advice.
Thanks in advance.