Title: [Plugin: JSON API] External Controller Path Error
Last modified: August 20, 2016

---

# [Plugin: JSON API] External Controller Path Error

 *  Resolved [bennybobw](https://wordpress.org/support/users/bennybobw/)
 * (@bennybobw)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-json-api-external-controller-path-error/)
 * So in order to activate my external plugin I have to do this:
 *     ```
       function set_howry_controller_path() {
         return "../wp-content/themes/howry/includes/json.php";
       }
       add_filter('json_api_howry_controller_path', 'set_howry_controller_path');
       ```
   
 * Then I get an error when I try to access the controller. The path isn’t found
   on line 29 of json-api/singletons/api.php
 *     ```
       if (file_exists($controller_path)) {
       ```
   
 * I have to change the path in my function to this:
 *     ```
       return "wp-content/themes/howry/includes/json.php";
       ```
   
 * And it works, but it appears in the admin screen as broken…
 * Has anyone found a fix to this or patched the json-api code?
 * [http://wordpress.org/extend/plugins/json-api/](http://wordpress.org/extend/plugins/json-api/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Rohan](https://wordpress.org/support/users/rohanrehmangmailcom/)
 * (@rohanrehmangmailcom)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-json-api-external-controller-path-error/#post-2516505)
 * For my custom controller path I just gave the path an absolute value as opposed
   to a relative one.
 *  Thread Starter [bennybobw](https://wordpress.org/support/users/bennybobw/)
 * (@bennybobw)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-json-api-external-controller-path-error/#post-2516593)
 * Ah right. This works for me without fail:
 *     ```
       return get_template_directory() . "/includes/json.php";
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: JSON API] External Controller Path Error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/json-api.svg)
 * [JSON API](https://wordpress.org/plugins/json-api/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/json-api/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/json-api/)
 * [Active Topics](https://wordpress.org/support/plugin/json-api/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/json-api/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/json-api/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [bennybobw](https://wordpress.org/support/users/bennybobw/)
 * Last activity: [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-json-api-external-controller-path-error/#post-2516593)
 * Status: resolved