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

Mirador block throwing errors #2073

Closed
rosiel opened this issue Apr 1, 2022 · 3 comments
Closed

Mirador block throwing errors #2073

rosiel opened this issue Apr 1, 2022 · 3 comments
Labels
Type: bug identifies a problem in the software with clear steps to reproduce

Comments

@rosiel
Copy link
Member

rosiel commented Apr 1, 2022

Getting the following error when trying to use Mirador:

TypeError: NetworkError when attempting to fetch resource.

This happens when using Mirador as a field formatter on a Media, as well as when displayed as an EVA block. It's happening on the Playbook as well as the Sandbox, and ISLE built with the install profile. The full error message in the viewer is:

{
  "manifest": {
    "error": "TypeError: NetworkError when attempting to fetch resource.",
    "id": "http://localhost:8000/node/504/manifest",
    "isFetching": false
  },
  "window": {
    "collectionIndex": 0,
    "companionAreaOpen": true,
    "companionWindowIds": [
      "cw-92e69f66-c72d-4e58-99eb-809fd5f6dd89",
      "cw-3054e291-f518-49c8-93a0-268464a0ea52"
    ],
    "draggingEnabled": true,
    "highlightAllAnnotations": false,
    "id": "window-079edee1-1fad-410d-8f7c-d5e6ef4d5f71",
    "manifestId": "http://localhost:8000/node/504/manifest",
    "maximized": false,
    "rangeId": null,
    "rotation": null,
    "selectedAnnotations": {},
    "sideBarOpen": false,
    "sideBarPanel": "info",
    "thumbnailNavigationId": "cw-3054e291-f518-49c8-93a0-268464a0ea52",
    "thumbnailNavigationPosition": "far-bottom"
  }
}

@kstapelfeldt kstapelfeldt added the Type: bug identifies a problem in the software with clear steps to reproduce label Apr 5, 2022
@rosiel
Copy link
Member Author

rosiel commented Apr 6, 2022

From the tech call (@seth-shaw-unlv thanks) it may be that the config here (localhost:8000) is wrong and there's and isle/playbook issue.

@rosiel rosiel changed the title Mirador block throwing NetworkError Mirador block throwing errors Apr 7, 2022
@rosiel
Copy link
Member Author

rosiel commented Apr 7, 2022

Indeed, it was missing :8000 from the config. That solved the red NetworkError, but led to new errors.
Screen Shot 2022-04-06 at 3 15 06 PM
This "unexpected non-whitespace character after JSON data" appeared as a modal over the viewer, and in the logs i see

Error: Call to a member function id() on null in Drupal\islandora_mirador\Plugin\Block\MiradorBlock->build() (line 111 of /var/www/html/drupal/web/modules/contrib/islandora_defaults/modules/islandora_mirador/src/Plugin/Block/MiradorBlock.php)

#0 /var/www/html/drupal/web/core/modules/block/src/BlockViewBuilder.php(171): Drupal\islandora_mirador\Plugin\Block\MiradorBlock->build()
#1 [internal function]: Drupal\block\BlockViewBuilder::preRender(Array)
#2 /var/www/html/drupal/web/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php(101): call_user_func_array(Array, Array)
#3 /var/www/html/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(772): Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_ren...', 'exception', 'Drupal\\Core\\Ren...')

@seth-shaw-unlv
Copy link
Contributor

It looks like whatever page you were on isn't returning a node as part of the route: https://github.com/Islandora/islandora_defaults/blob/2.x/modules/islandora_mirador/src/Plugin/Block/MiradorBlock.php#L109

@rosiel rosiel closed this as completed May 24, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Islandora Issues Queue May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: bug identifies a problem in the software with clear steps to reproduce
Projects
Development

No branches or pull requests

3 participants