-
Notifications
You must be signed in to change notification settings - Fork 173
When things go wrong
There are a number of common (and some not-so-common) issues that can trap even seasoned developers. If you're tearing your hair out, have a glance through the following potential issues. We've attempted to order them with the most likely problems first.
--
Your new custom classes and RESTful plugins must be discovered by Drupal, and any resource endpoints they define must be stored in the menu cache.
$ drush rr
$ drush cc all
--
RESTful requires that entity.module be patched with https://drupal.org/node/2086225#comment-8768373.
--
Do things work locally but do not when pushed to a production server? If your local filesystem is not case-sensitive (e.g. OS X with the default HFS+ filesystem), you might have capitalised one of the plugin folders incorrectly. e.g. spelling "Resources" as "resources". This will still work locally, but break on a filesystem which does not ignore capitalisation.
--
If you're extending a resource that RESTful provides out-of-the-box (e.g. users) but you haven't incremented your version number, RESTful may not use your resource, instead using the default one. e.g. if you're extending RESTful's users v1.0, be sure to call yours users v1.1 or higher.
--
If you are attempting to authenticate using the token auth resource in conjunction with CORS (i.e. from another domain) there is a known issue you should be aware of. See A warning regarding CORS and authenticated resources for more.