• There is an undefined constant on /includes/class-handlers.php:68. This causes a server 500 error when attempting to hit the admin-ajax.php endpoint with the ?action=narrative&type=info params. Similarly, if the api key is not yet defined in the plugin, the server returns a 422 http response which is an odd thing to validate with from the narrative app.

    There are also 2 functions that have (almost) duplicate functionality in /includes/class-request.php that parse the API request from the narrative app twice and return duplicate responses.

    These issues mean that the narrative app is not ever able to authenticate the plugin’s existence on the server properly as a 422 or 500 response is not a proper way to validate. Likewise, if the narrative app is improperly managing those responses, clients are not able to take appropriate action for troubleshooting the connection.

    TLDR: The narrative app is not ever able to validate the existence of plugin or validate the connection properly based on how the plugin responds to the API requests. Also a 500 error caused by an undefined constant should probably be addressed.

  • The topic ‘Undefined constant, api Issues’ is closed to new replies.