Documentation: Unable to access json/xml/jsonld via rest

Created on 5 Oct 2016  路  15Comments  路  Source: Islandora/documentation

Steps to reproduce:

  • Clone/Vagrant up -
    https://github.com/Islandora-CLAW/CLAW/commit/fffb6b2d1f88fe924448b218829a65dca89b28f8 (latest)
  • Go to http://localhost:8000/admin/config/services/rest and and enable rest json/xml/jsonld for content -> node (with base_auth)
  • Go to http://localhost:8000/admin/people/permissions (Here there are no options to set permissions to allow for REST operations on drupal resources as before)
  • Create a node (either basic page or article)
  • Go to a REST client such as POSTMAN and do a GET request: http://localhost:8000/node/1?_format=json. Ensure to provide authentication.
    You will get a 403 permission error or 406 Not Acceptable error.
  • The errors can be reviewed in the Drupal log.

Expected behavior:

  • http://localhost:8000/admin/people/permissions should have options to set REST operations permissions
    (and/or)
  • REST requests should work for json/xml/jsonld

The actual, incorrect behavior:

  • User is unable to see options to set REST services permissions in http://localhost:8000/admin/people/permissions
  • REST requests does not return response in the requested format

All 15 comments

This seems to be related to the drupal version. I modified the vagrant to install Drupal 8.1.8 and I could once again see the permissions entries for the various REST endpoints.

...and it looks like 8.2.0 was released today. https://www.drupal.org/blog/drupal-8-2-0

So, that should explain why 8.2.0 is getting installed. I was confused for a moment :smile:

And RESTUI is not ready for it.
https://www.drupal.org/node/2758563

@whikloj @ruebot if RESTUI is not ready (and 8.2 is different, some libraries changed) REST API can be set using configuration YAMLl file. Do you want me to do that?

IMHO that is just going to make it harder for anyone to learn how to use. So if you all want to do that, I wouldn't argue. But I think we should just move back to 8.1.8 and wait. Then people can see how it _should_ work.

@whikloj ok i agree. 8.1.8 until A) RESTUI gets an update or B) we update RESTUI!

@whikloj @ruebot To avoid issues such as this in the future, should we always target a specific version of drupal and other major components for vagrant? Or Is it ok since this is the development environment and we want to find out potential issues at the earliest?

@Natkeeran hard to say, if the plan is that these permissions are disappearing for good. Then we should switch and configure as @DiegoPino suggests. But if not then we just seem to be a little ahead of the curve and waiting until they get an update completed makes the most sense.

That being said, perhaps we should try using the dev version.

@Natkeeran yes for Drupal. The HUGE difference with Drupal 8 is that changes between mayor versions are deprecating/replacing the guts of it. So 8.2 is really different that 8.1. That did not happen in Drupal 7.x which since was mostly procedural. So we just need more experience with Drupal.

I say we always target a specific version. Best to be explicit.

And I'd wait on everything else to catch up and we deal with 8.2 when it's just our stuff that needs to be updated.

399 won't fix restui, but it will keep us from getting suprised by a new version. Can someone check it out?

I'm running a fresh vagrant up to test the install of a fix that upgrades us to Drupal 8.2.2 and installs a rest config entity for fedora resources. I'll keep everyone posted.

LOL, and while waiting for my vagrant up to go.... the REST UI module pushed a release for 8.2!

Bump https://github.com/Islandora-CLAW/CLAW/pull/416

I need a test and merge.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DiegoPino picture DiegoPino  路  5Comments

dannylamb picture dannylamb  路  3Comments

acoburn picture acoburn  路  5Comments

jonathangreen picture jonathangreen  路  4Comments

acoburn picture acoburn  路  4Comments