Skip to content

Mapping endpoint call fails with 500 #1828

@Firefox2100

Description

@Firefox2100

URL address of the page where you encountered the problem

A concept page, for example /myvocab/en/page/001?clang=en-GB

Description of the problem

Open the browser to one concept in the vocabulary. The box underneath the main concept display box shows a loading icon and never loads anything. The underlying concept URI in the SKOS data is https://my.skosmos.domain/myvocab#001.

Additional information (e.g. screenshots) about the problem

Checking the request sent, I have this:

https://my.skosmos.domain/rest/v1/myvocab/mappings?uri=https://my.skosmos.domain/myvocab

The URI parameter looks incomplete, and does not contain the term ID. Further checking the log:

PHP Fatal error:  Uncaught TypeError: Vocabulary::getConceptInfo(): Argument #2 ($clang) must be of type string, null given, called in .../src/controller/RestController.php on line 703 and defined in .../src/model/Vocabulary.php:452
Stack trace:
#0 .../src/controller/RestController.php(703): Vocabulary->getConceptInfo('https://my.skosmos...', NULL)
#1 .../src/rest.php(63): RestController->mappings(Object(Request))
#2 {main}
  thrown in .../src/model/Vocabulary.php on line 452

Actual domain and file paths have been redacted. I think the issue is that my SKOS vocabulary uses hashtag style namespace, and when sending the request for getting mapping, skosmos did not escape the hashtag correctly, causing the browser to truncate everything after the hashtag, which caused the backend to not receive parameters like clang, or the term ID itself.

The browser you used when the problem appeared

Chromium: 140.0.7339.186

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions