Settings: drupal v 8.0.2
Theme: Bartik v8.0.2

It seems that the library is not recognised.
I installed the necessary (Tried both sources: https://github.com/dimsemenov/Magnific-Popup
and https://github.com/dimsemenov/Magnific-Popup/releases) files in the demanding folder in libraries/magnific-popup

folder

But whatever i do, i keep getting a "Not Installed" in the status page.

library

I have no problem with colorbox, that is working fine, but i like the magnific slider more.
What do i oversee?

CommentFileSizeAuthor
snip_20160119202650.png6.32 KBVBN
snip_20160119202441.png14.71 KBVBN

Comments

VBN created an issue. See original summary.

typotraum’s picture

Same structure, same issue.

The Browser tries to load the requiered files but end up with 404 Errors:

GET
http://server.martinthink.de/libraries/magnific_popup/jquery.magnific-po... [HTTP/1.1 404 Not Found 109ms]
GET
http://server.martinthink.de/libraries/magnific_popup/magnific-popup.css

It is possible to load:

http://server.martinthink.de/sites/all/libraries/magnific_popup/jquery.m...

So "sites/all/"or "sites/YOURSITE/" is missing in the path.

Editing magnific_popup.libraries.yml inside the module Folder was a solution for me.

  • Eric115 committed ab5e8e8 on 8.x-1.x
    Added a readme file and better installation instructions for Issue #...
eric115’s picture

Version: 8.x-1.1 » 8.x-1.x-dev
Status: Active » Closed (works as designed)

The Drupal 8 version of the module looks for the magific popup library in the DRUPAL_ROOT/libraries/magnific_popup folder as typotraum mentioned. This is done intentionally and follows convention of many other modules such as Colorbox, although if I understand correctly the libraries module for Drupal 8 is still receiving quite a bit of attention at the moment, so there seem to be a few different conventions floating around in regards which libraries folder to use. This might be settled in the Drupal 8.1 release.

I have added in a readme.txt file and edited the "not installed" message on the status page to hopefully clarify this some more. As typotraum mentioned, this can be changed in magnific_popup.libraries.yml if you need a custom location.

VBN’s picture

Thank you for the quick reply.

Can I remark that in the installation description here, you mention the installation folder libraries/magnific-popup/dist

Based on the info I found in the magnific_popup.libraries.yml file, I created a new folder in my ROOT/libraries/magnific_popup [mind the underscore between magnific and popup] and put the necessary files in there.
A flush cache and now it's working.

So the v8.x-1.1 version is working as designed, but the info on the main page is not updated (yet).
Can you update the install guide setting for drupal 8?

VBN’s picture

Oh, i forgot to mention there's no need for the Libraries nor Jquery module in drupal v8.x.
It's working out of the box

jay.dansand’s picture

Title: Magnific Popup Library - Not installed » Update Installation Instructions for 8.x-1.x
Assigned: Unassigned » jay.dansand
Status: Closed (works as designed) » Closed (fixed)

Good point about the installation instructions - those were written before the 8.x branch. I've added notes for the 8.x branch.

VBN’s picture

I don't want to be annoying, but in the documentation now, you mention libraries/magnific-popup, BUT in the .yml file the path searches for libraries/magnific_popup
Is it possible you switched the hyphen and underscore?

eric115’s picture

Maybe it is worth changing the 8.x version to use the same folder name as the 7.x version? That was my mistake in creating the 8.x module, I didn't see this inconsistency. This would be a backwards compatibility breaking change, but as the 8.x version of the module is fairly new, maybe now is a good time to make this change.
Thoughts?

VBN’s picture

It is what you want it to be off course, but it's indeed important in relation for future updates.
imagine you update to another version and the path is broken.
Then the search begins, why the hell the library is not loaded.
Who's going to think about a simple hyphen-underscore error, right?

My five cent, keep the underscore for v8, it's more like normal use in drupal to use underscore, and i see that you used in the fieldformatter MagnificPopup.php also the underscore in the path to adress the library.

jay.dansand’s picture

Assigned: jay.dansand » Unassigned
Status: Closed (fixed) » Active

I initially chose the hyphen because it's what the third party Magnific Popup uses when you download it, but I'm not wed to any specific solution.

I vote for standardizing the name; it could be a bit confusing otherwise. Can it be done in a way that doesn't cause a ton of confusion for the 30 current users of 8.x?

I'm going to rewrite the installation instructions and just completely split the 7.x/8.x instructions. I'm not running 8.x so it's entirely possible I'll get those instructions wrong; please feel free to correct as necessary!

jay.dansand’s picture

Dumb question: do you still need File Entity in 8.x, or are there no dependencies at all now?

VBN’s picture

There are no dumb questions Jay!

I just installed drupal v8.0.2 and any other modules I'm running now are:
Admin Toolbar 8.x-1.11
Colorbox 8.x-1.x-dev
Nothing more...

NO Libraries API
NO File Entity
NO Jquery Update

So for Drupal 8, it's very easy.
Just install the module and drop the library in the right folder. Done!

Look, i'm not a coder at all, but happy to help here.

eric115’s picture

Confirming what VBN said, there are no module dependencies at this point (yay for having the latest version of jQuery in D8!). The video popups requires video_embed_field, but that is completely optional to have.

I agree with changing the libraries folder, I think I will change the libraries to look for the magnific-popup folder. I will take a look tomorrow at making this a painless transition for the existing users when they update the module.

@jay.dansand I have also added some basic instructions into the readme.txt of the 8.x-1.x-dev branch if that helps with your updates to the documentation.

jay.dansand’s picture

Alright, I've taken a stab at updating the instructions on the project page. I literally have not used D8 at all yet, so I've no idea how accurate "manage the display of ... fields" and "choose 'Magnific Popup' as the formatter" are.

Eric115, I think you've got access to modify the project page; you're absolutely welcome to fix as necessary, since I don't have anything intelligent to contribute when it comes to 8.x.

VBN’s picture

Looking good guys! ;)

  • Eric115 committed ae15884 on 8.x-1.x
    Issue #2653026 by VBN, jay.dansand, Eric115: Update libraries folder...
eric115’s picture

Status: Active » Closed (fixed)

I have created an 8.x-1.2 release with the changes to the libraries folder as discussed. The message on the status page will specifically mention to rename the folder to 'magnific-popup' if 'magnific_popup' is detected in the libraries folder. Hopefully this won't be too much of a pain for the existing users.

Nice work everyone and thanks for your help! :)

jay.dansand’s picture

Thanks for editing the project page! While we're discussing library paths and consistency and whatnot, I noticed the 8.x path doesn't have "dist/" in it; is there a reason that the thing users should drop in libraries/ isn't the same as the thing they download from https://github.com/dimsemenov/Magnific-Popup, which has the JS and CSS in a "dist/" subdirectory? Does that break module installers that try to automatically download and install library dependencies (e.g. Drush)? Just some thoughts.

VBN’s picture

Just followed the update procedure to 8x-1.2 to confirm all working well as described in#18.

Thx Erik, glad to be at help.

rewted’s picture

I am using Drupal 8.2.7 with Module magnific_popup-8.x-1.2 and third-party Magnific Popup library v1.1.0 in root/libraries/magnific-popup seeing a Not Installed Error in Status Report: Please download the Magnific Popup Library from https://github.com/dimsemenov/Magnific-Popup/releases and install in DRUPAL_ROOT/libraries/magnific-popup.

  • Any advice as to what could be wrong?
  • Also, in a future release would it make sense to have this Drupal module install directory as root/sites/all/libraries/?