Noticed a similar issue to the 7.x version with the 8.x version. Will attach a patch.

Comments

welly created an issue. See original summary.

welly’s picture

Status: Active » Needs review
StatusFileSize
new1.42 KB
fdverwoerd’s picture

Hi,

The patch works. I was struggling with this issue too.

I'm using magnific popup library version 1.1.0 and installing with composer. (Drupal `magnific_popup` module version 1.2)

"repositories": [
    {
      "type": "composer",
      "url": "https://packages.drupal.org/8"
    },
    {
      "type": "package",
      "package": {
        "name": "dimsemenov/magnific-popup",
        "version": "1.1.0",
        "type": "drupal-library",
        "dist": {
          "url": "https://github.com/dimsemenov/Magnific-Popup/archive/1.1.0.zip",
          "type": "zip"
        }
      }
    }
  ]
kyvour’s picture

Status: Needs review » Reviewed & tested by the community

The patch works nice for me (drupal 8.4.x-dev)

Voting for RTBC :)

ergophobe’s picture

Thanks for the patch.

Similar problem here - managing the Magnific Popup library with Composer + Bower

composer.json like this (showing just the relevant parts)

    "require": {
        "drupal/magnific_popup": "1.x-dev",
    },
   "scripts": {
        "post-install-cmd": [
            "DrupalProject\\composer\\ScriptHandler::createRequiredFiles",
            "bower install"
        ],
        "post-update-cmd": [
            "DrupalProject\\composer\\ScriptHandler::createRequiredFiles",
            "bower install"
        ]
    },

And bower.json like this

{
    "name": "myprojectname",
    "dependencies": {
        "magnific-popup": "*"
    }
}

Had the same problem with the "dist" path. This patch fixes it. Works great.

eric115’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new3.29 KB
new1.88 KB

Thank you for the patch, it looks good but doesn't maintain backwards compatibility.

I have added a hook_library_definitions_alter in this patch to switch back to the legacy library for existing sites.

Marking as needs review, please leave any feedback :)

  • Eric115 committed ea3892e on 8.x-1.x
    Issue #2857287 by Eric115, welly: Incorrect path for magnific library
    
eric115’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.