Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I received the message in the Status Report about installing Respond.js for use with Libraries API. It said it was using the copy from the module's folder. The sub text/description says "Please install Respond.js in ." There's no path specified. When I install the linked file "respond.min.js" into sites/all/libraries/respondjs/lib/respond.min.js, I then get the error "Respond.js is not correctly installed. Please install Respond.js in the repsondjs folder under /lib.
Couple issues here:
- Minor typo: should be "the respondjs folder" and not "the repsondjs folder"
- What IS the correct path? Should be specified in the help text.
- Is respond.js suppose to be "respond.js" or "respond.min.js"?
Comment | File | Size | Author |
---|---|---|---|
#12 | 2014807-12-libraries-api-path.patch | 1.31 KB | rupl |
#11 | respondjs-installation-location-2014807-8.patch | 1.06 KB | zet |
Screen Shot 2013-06-07 at 10.57.43 AM.jpg | 19.23 KB | shawnrosspeters | |
Screen Shot 2013-06-07 at 10.57.23 AM.jpg | 23.51 KB | shawnrosspeters |
Comments
Comment #1
ruplThe correct path for installing libraries in Drupal is never in a module's directory. If I made a note saying otherwise then you're right I need to change that.
As for your error can you confirm that you actually enabled the Libraries API module? This might be similar to #1919796: Modernizr module chokes on Libraries API 1.x where respondjs.module needs to more thoroughly check that Libraries is up to date and enabled.
Comment #2
muppel CreditAttribution: muppel commentedGot the same problem. Libraries API enabled. Installed "respond.min.js" in "sites/all/libraries/respondjs/lib" and in "sites/all/libraries/respondjs". Same error messages. Where do I have to install the library and what's the correct name???
Comment #3
muppel CreditAttribution: muppel commentedSolved. The respond.js file was named respond.js.htm ... After correcting this error, the files where recognized propperly.
Comment #4
nkraftHI,
I just spent like 20 minutes trying to figure out the correct path / file name to place the respond.min.js script -- can i offer to write some instructions on the project page for you, so we spare others the same issue?
I know its a small thing, but when the status page error message still is written incorrectly, and there are no specific instructions on the project page, it can be terribly irksome to do something which should be very simple and straightforward.
Let me know. I'd be happy to coontribute a bulleted list set of directions to the Project page.
thanks!
Nathaniel
Comment #5
nkraftPS.
For posterity, in Drupal 7:
1. download and install the module.
2. download the Respond.js script here: https://github.com/scottjehl/Respond/blob/master/respond.min.js
3. Save the js file (and it should be named respond.min.js) to /sites/all/libraries/respondjs/ (respondjs is a new folder you create inside the libraries folder)
4. Check your Drupal Status Report page again (/admin/reports/status)
5. The respond.js message on the Status Report page should now be green, and it should say "Respond.js script enabled"
If you're still experiencing problems, make sure you've set the correct permissions for the module on your Drupal permissions page:
/admin/people/permissions#module-respondjs
Comment #6
ruplBy all means create a documentation page! If you are registered on drupal.org you are eligible to create/edit them.
I have created a documentation stub and the module's homepage now links to it. Feel free to update the content however you please.
As an aside, it's way simpler to install using Drush. Here are the instructions I always use to install this module, which is why the mistakes in the admin UI went unnoticed for so long:
And that's it. Drush installs the library for you ;)
Comment #7
hwasem CreditAttribution: hwasem commentedThank you, nkraft, for the explanation! I've been looking all afternoon for this.
Comment #8
zet CreditAttribution: zet commentedI've done the same steps as nkraft described above, but the warning persists
I've even put respond.main.js, Respond.main.js, Respond.js, respond.js in all the 3 folowing directories: sites/all/libraries ,
sites/all/libraries/respondjs, sites/all/libraries/respondjs/lib
Everything is the same.
Yes, I flushed all the caches.
Later edit: I see the code that gives the above warning in the admin/reports/status page is :
from sites/all/modules/respondjs/respondjs.install
and the empty path is given by the
libraries_get_path('respondjs')
functionComment #9
ruplLooking at that .install code, I also misused the
t()
function pretty bad too. I'm pretty busy at DrupalCon Prague this week but if someone posts a patch I'll review it and cut a new release of the module.I think the conditional might be wrong. I don't have time to sit and test this but could someone negate the following conditional on a Drupal site that is having problems?
Change it to:
For the record, here are the steps I would use if I did this manually:
sites/all/libraries/respondjs
. Do not create a/lib
folder.<link>
tags and cannot process@import
directives.Thanks for the error reports, everyone!
Comment #10
zet CreditAttribution: zet commentedrupl, seems that you are right.
Negation of that conditional and reinstall seems to solve the problem of the wrong warning.
Comment #11
zet CreditAttribution: zet commentedHere is a small patch to make it work.
Comment #12
ruplI tried this out and realized that changing the conditional makes the warning go away, but it isn't properly representing what the user needs to do if Libraries API is enabled. Here's the patch
that I committed to dev, let me know if this works by giving an RTBC:edit: whoops, I did not commit this to dev. please review then I will commit.
Comment #13
nkraftGood to know about the Drush install! I use Drush for personal projects, but am unable to for my professional projects through my companies, hence I tend to run into things like this. I'll see if I can add a page at some point... i had completely forgotten about this till today!
Comment #14
nkraftZet, i know your post is several weeks old. Did you get everything working?
Comment #15
rupl@nkraft, his patch was actually removing the warning entirely, if you could test #12 I will commit
Comment #16
dovran CreditAttribution: dovran commentedThank you rupl your coment
I have made as have been described above comments number 9
All it has turned out
Thanks
Comment #17
ruplWould have been cool to get someone experiencing the problem to test and confirm the patch, but I committed to dev anyway.
And again, if someone wants to really help out your fellow Drupal devs, please write some docs. Even if you just transcribe other peoples' comments from this issue it helps a lot. We're all in this together.
Comment #18
hwasem CreditAttribution: hwasem commentedI updated the docs at the link provided in #17. Thanks!
Comment #19
rupl@hwasem you are a cool person. thank you!
Comment #20
RPilkington CreditAttribution: RPilkington commentedThe 'respond.min.js' that needs to exist at 'sites/all/libraries/respond' is . . .
HERE: "https://github.com/scottjehl/Respond/blob/master/dest/respond.min.js"
NOT here: "https://raw.github.com/scottjehl/Respond/master/respond.min.js"
---
I'm new at this, but I just
Result: Respond.js script -----> Enabled
I did NOT test Config/Media usage. I don't even know what it's for (yet), but I did install via Make. ;-)
Cheers, Rick
Here is the [clipped] make I used. Note: Directory 'respondjs' instead of 'respond' [no consequence, I think.]
Comment #21
rupllol thanks for the report. This is why testing patches is part of open source software, per my comment in #17. I'm gonna let someone else fix this and post a patch. It's an utterly trivial change, so it's a great opportunity for someone to try their hand at contribution. Have at it!
Comment #22
RPilkington CreditAttribution: RPilkington commentedUpdated Respond.js Install Doc at https://drupal.org/node/2032637; revised as noted at #20 above https://drupal.org/comment/8602221#comment-8602221.
Comment #23
RPilkington CreditAttribution: RPilkington commentedDocumentation Error. Fixed.
Comment #24
RPilkington CreditAttribution: RPilkington commentedThe comment at this link answers why this is a Documentation error.
https://drupal.org/comment/8701505#comment-8701505.
Comment #25
ruplThanks for updating the docs, yes this can be closed AFAICT :)