opis/json-schema dependency missing

Created on 23 May 2022, over 2 years ago
Updated 3 April 2024, 9 months ago

Error: Class 'Opis\JsonSchema\Validator' not found in Drupal\opigno_scorm\Controller\OpignoScormController->scormCommit() (line 84 of /code/web/modules/contrib/opigno_scorm/src/Controller/OpignoScormController.php)

๐Ÿ› Bug report
Status

RTBC

Version

3.0

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States cornifex

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • ๐Ÿ‡จ๐Ÿ‡ฆCanada Liam McDermott

    Liam McDermott โ†’ made their first commit to this issueโ€™s fork.

  • @liam-mcdermott opened merge request.
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada Liam McDermott

    I created an MR that adds the dependency, and tested it.

    Hey cornifex, thanks for the patch. Unfortunatelly it doesn't work for me and I'm still getting the error.

    This would be due to patches being applied after composer has resolved dependencies, because of this, adding new dependencies in patches doesn't work.

    Instead, if you add this to your project's `composer.json` as the first item under `repositories`:

            {
                "type": "vcs",
                "url": "git@git.drupal.org:issue/opigno_scorm-3281986.git"
            },
    

    And put this under your `composer.json`'s `require` section:

            "drupal/opigno_scorm": "dev-3281986-json-schema-dep-missing",
    

    It should fix the issue. Or you can add it as a direct dependency, like saurabh-2k17 suggested, but that won't help test the fix for this issue. If the above works for anyone else, please come and mark this as 'Reviewed and tested by the community'.

    To reproduce this issue, install Opigno SCORM without any of the other Opigno modules, then upload a SCORM file to some content, load that content in the browser, then open the browser console and interact with the loaded SCORM content. When moving between steps this error should be shown in the console (it's a JS http request).

  • Issue was unassigned.
  • Status changed to RTBC 9 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States kurttrowbridge

    Hi! I followed the instructions in #7 while also excluding this module from the standard Drupal repository (see snippet below), and that installed the dependencies successfully and fixed the errors. Marking RTBC. Thanks!

        "repositories": [
            {
                "type": "composer",
                "url": "https://packages.drupal.org/8",
                "exclude": [
                    "drupal/opigno_scorm"
                ]
            },
            ...
            {
                "type": "vcs",
                "url": "git@git.drupal.org:issue/opigno_scorm-3281986.git"
            }
        ],
    
Production build 0.71.5 2024