Title: Plugin not working?
Last modified: August 22, 2016

---

# Plugin not working?

 *  Resolved [invisigoth99](https://wordpress.org/support/users/invisigoth99/)
 * (@invisigoth99)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/plugin-not-working-243/)
 * Hi,
 * I recently upgraded to the new version of the plugin and noticed that (when I
   added debug information) the following error message is being generated:
 * Request: [https://api.mendeley.com/documents?group_id=0&view=all&order=desc&sort=created&limit=500](https://api.mendeley.com/documents?group_id=0&view=all&order=desc&sort=created&limit=500)
 * Response: HTTP/1.1 404 Not Found Content-Type: application/json Date: Fri, 26
   Dec 2014 18:25:28 GMT X-Mendeley-Trace-Id: zVIzhnXckA0 Content-Length: 0 Connection:
   keep-alive
 * Any ideas how I can fix this? I regenerated the secret code for the API on dev.
   mendeley.com, but this has not helped.
 * Thanks.
 * [https://wordpress.org/plugins/mendeleyplugin/](https://wordpress.org/plugins/mendeleyplugin/)

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

 *  Plugin Author [kochm](https://wordpress.org/support/users/kochm/)
 * (@kochm)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/plugin-not-working-243/#post-5612275)
 * Well, it is correct that a request asking for documents from the group with uuid“
   0” returns “404 not found” – You have to set the correct group id (this has to
   be updated from earlier versions of the plugin / api since Mendeley now asks 
   for the UUID-Code – see readme.txt).
 *  Thread Starter [invisigoth99](https://wordpress.org/support/users/invisigoth99/)
 * (@invisigoth99)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/plugin-not-working-243/#post-5612347)
 * I’ve read readme.txt and it says I have to find out the uuid’s via “Request collection
   ids”. This unfortunately gives the output below.
    It appears that it is not sending
   the right request (i.e. without an authorisation code). Any ideas?
 * _Request: [https://api.mendeley.com/groups/?limit=500](https://api.mendeley.com/groups/?limit=500)_
 * Response: HTTP/1.1 200 OK Content-Type: application/vnd.mendeley-group.1+json
   Date: Sat, 27 Dec 2014 08:15:07 GMT Vary: Accept-Encoding Vary: Accept-Encoding
   X-Mendeley-Trace-Id: 776m4nyv47c Content-Length: 2 Connection: keep-alive []
 * Groups
 * Request: [https://api.mendeley.com/folders/?limits=500](https://api.mendeley.com/folders/?limits=500)
 * Response: HTTP/1.1 200 OK Content-Type: application/vnd.mendeley-folder.1+json
   Date: Sat, 27 Dec 2014 08:15:08 GMT Vary: Accept-Encoding Vary: Accept-Encoding
   X-Mendeley-Trace-Id: RdtHZHU6GtM Content-Length: 2 Connection: keep-alive []
 * Folders
 *  Thread Starter [invisigoth99](https://wordpress.org/support/users/invisigoth99/)
 * (@invisigoth99)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/plugin-not-working-243/#post-5612351)
 * Some additional information – when I press “Request and authorize access token”
   all is fine, but when I then press “Update settings” the message at the top is:
 * Failed retrieving OAuth2 access token: {“error”:”invalid_grant”,”error_description”:”
   Invalid access code”}
 * so something seems to be going wrong here…
 * Thanks.
 *  Thread Starter [invisigoth99](https://wordpress.org/support/users/invisigoth99/)
 * (@invisigoth99)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/plugin-not-working-243/#post-5612352)
 * Final bit of information – for the request:
 * [mendeley type=”own”]
 * the debug information shown is:
 * [https://api.mendeley.com/documents?group_id=0&view=all&order=desc&sort=created&limit=500](https://api.mendeley.com/documents?group_id=0&view=all&order=desc&sort=created&limit=500)
 * I’ve managed to perform the group_id query myself by manually adding the required
   access_code tag, but this information is empty. So the problem seems to be:
 * * I don’t have any groups in my Mendeley profile – how do I add them, and is 
   this required?
    * The access code doesn’t seem to be added to the request – or
   perhaps this is something that is simply not shown in the debug information, 
   in which case this is a red herring.
 * Thanks.
 *  Thread Starter [invisigoth99](https://wordpress.org/support/users/invisigoth99/)
 * (@invisigoth99)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/plugin-not-working-243/#post-5612380)
 * Hi – I’ve now learned that I have to edit all the ways in which I access my plugin,
   so something like [mendeley type=”own”] won’t work.
 * I’ve managed to almost get it to work as it did before, however – filtering by
   tag does not work. So filter=”tag=xxx” does not seem to do the trick, the plugin
   doesn’t crash, but the filtering somehow does not seem to happen. Could you let
   me know if the syntax is wrong?
 *  Thread Starter [invisigoth99](https://wordpress.org/support/users/invisigoth99/)
 * (@invisigoth99)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/plugin-not-working-243/#post-5612398)
 * Hi Michael,
 * Seems to be the case that the plugin doesn’t handle the case of a single tag 
   properly – simply changing the code to:
 *     ```
       case "tag":
       			   case "tags":
                                      	$tag_arr = $doc->tags;
       				if (is_array($tag_arr)) {
       				   	$ismatch = 0;
                                      		for($i = 0; $i < sizeof($tag_arr); ++$i) {
                                      			if (!(stristr($tag_arr[$i], $filterval) === FALSE)) {
                                      				$ismatch = 1;
       						}
                                      		}
                                      	} else {
                                      			if (!(stristr($tag_arr, $filterval) === FALSE)) {
                                      				$ismatch = 1;
       						}
       				}
       				if ($ismatch == 0) {
       					return 0;
       				}
       				break;
       ```
   
 * does the trick. Happy to attempt to make the changes via code.google.com, but
   I don’t know if you support more contributors. Will also look into the groups/
   folders type, as it appears that the API supports requests resembling your previous“
   own” type (via the documents API, empty group_id and setting authored=true).
 * Thanks.
 *  Plugin Author [kochm](https://wordpress.org/support/users/kochm/)
 * (@kochm)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/plugin-not-working-243/#post-5612508)
 * Sorry for the delayed response (some family holidays …) – and thank you very 
   much for your code for correcting the problem with the tag filtering and the 
   suggestion for reproducing the “own” functionality (I myself searched the Mendeley
   API documentation for quite some time without finding a clue …).
 * I included both fixes in a new Version 1.0.1.
 * For the future you are very welcome to contribute to the code (on the GIT repository)–
   I just have to do uploads to WordPress myself.

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

The topic ‘Plugin not working?’ is closed to new replies.

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

 * 7 replies
 * 2 participants
 * Last reply from: [kochm](https://wordpress.org/support/users/kochm/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/plugin-not-working-243/#post-5612508)
 * Status: resolved