As an example when taxonomy and paragraphs integration is enabled with Gatsby preview, saving taxonomy terms redirects to a /jsonapi/ endpoint confusing the user. I have looked through the module and am uncertain where the logic is that causes the erroneous redirect.

CommentFileSizeAuthor
#7 gatsby-redirect_error-3157849-7.patch3.27 KBVitalyM

Issue fork gatsby-3157849

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

    Support from Acquia helps fund testing for Drupal Acquia logo

    Comments

    drupalninja99 created an issue. See original summary.

    VitalyM’s picture

    Yeah, same issue happens for the unpublished nodes also.

    codekarate’s picture

    Assigned: Unassigned » codekarate

    I can't seem to replicate this problem. Can you send me a screenshot or two of how the Gatsby settings and fields are set up so I can try to replicate and then fix?

    Thanks!

    Greg__’s picture

    I had the same problem. We end up patching jsonapi_extras.
    Please see if this resolve your issue : https://www.drupal.org/project/jsonapi_extras/issues/3135950

    codekarate’s picture

    Thanks @Greg__, I forgot about that issue I originally opened in jsonapi_extras. If that patch does get merged I will likely need to update the Gatsby module to remove the workaround I currently have in place to work with Ajax forms.

    @drupalninja99 and @VitalyM can you check to see if the patch to jsonapi_extras that @Greg__ linked fixes your issue. If not, let me know and I will do some additional digging.

    Thanks!

    VitalyM’s picture

    Thanks @Greg__ and @codekarate for letting me know about the patch. I can confirm that it does solve my issue - no more "strange" redirects.

    VitalyM’s picture

    Status: Active » Needs review
    Related issues: +#3135950: EntityToJSONAPI subrequest can break AjaxForms
    FileSize
    3.27 KB

    Actually, it is not enough to have json_api patched only. It is needed to patch the gatsby instantpreview as well to have the issue completely solved. And here is a patch for that.
    Make sure you have applied both: one from https://www.drupal.org/project/jsonapi_extras/issues/3135950 and this one.

    bbrala’s picture

    I plan to merge the change to json:api when I get back from vacation coming Monday evening (cet).

    bbrala’s picture

    The change has been committed to the dev branch in jsonapi_extra's.

    Jacine’s picture

    Priority: Major » Critical

    Not having the patch from #7 bit me over the weekend.

    A new version of jsonapi_extras has been released as of 9/3. I updated that last week, and didn't have this patch (wasn't experiencing issues in the title). However, as soon as we deployed it, we started seeing AJAX 500 server errors when uploading images at /media/add/image, with the upload widget.

    Applying this patch resolved the issue. It would be good to revisit this ASAP, and either commit this patch, or otherwise address it somehow. Also, bumping this to critical, as it literally makes it impossible to add content.

    VitalyM’s picture

    Status: Needs review » Reviewed & tested by the community

    I think it worth to set the RTBC now. @codekarate

    • codekarate committed c39f535 on 8.x-1.x authored by VitalyM
      Issue #3157849 by VitalyM: Redirect error after saving users, taxonomy...
    codekarate’s picture

    Status: Reviewed & tested by the community » Fixed

    This was added in rc3. Thanks everyone!

    codekarate’s picture

    Status: Fixed » Closed (fixed)