Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example breaks with latest JSON:API Extras #1

Open
benjifisher opened this issue Nov 25, 2018 · 1 comment
Open

Example breaks with latest JSON:API Extras #1

benjifisher opened this issue Nov 25, 2018 · 1 comment

Comments

@benjifisher
Copy link

Following your tutorial, I simplified a little:

composer require -o drupal/jsonapi_extras
...
  - Installing justinrainbow/json-schema (5.2.7): Loading from cache
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing e0ipso/shaper (1.2.2): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing drupal/jsonapi (1.23.0): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
  - Installing drupal/jsonapi_extras (2.11.0): Downloading (100%)         
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup
...

I got these errors when I tried to restart Gatsby:

gatsby develop
...
⠂ source and transform nodesStarting to fetch data from Drupal
⠈ source and transform nodesFailed to fetch http://drupalviews.lndo.site/jsonapi/language_content_settings/language_content_settings Request failed with status code 500
undefined
error Plugin gatsby-source-drupal returned an error

  Error: Request failed with status code 500
...

Switching to my Drupal site (d is an alias for lando drush):

d ws 156
 ID         :  156                                                                                                                                                                                                                              
 Date       :  25/Nov 13:51                                                                                                                                                                                                                     
 Type       :  php                                                                                                                                                                                                                              
 Severity   :  error                                                                                                                                                                                                                            
 Message    :  Error: Call to a member function get() on null in Drupal\jsonapi_extras\ResourceType\ConfigurableResourceType->includeCount() (line 118 of /app/modules/contrib/jsonapi_extras/src/ResourceType/ConfigurableResourceType.php)

(stack trace omitted).

It seems to be related to this bug: Update to 2.11 no work.

I downgraded jsonapi_extra:

composer require -o drupal/jsonapi_extras:2.10.0
@benjifisher
Copy link
Author

Do we really need JSON:API Extras? The current version does not seem to work with the 8.x-2.x version of JSON API, and I do not want to be stuck on the 8.x-1.x branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant