The Libraries API module version 2 and 2.x-dev seem to break the Module Filter 1.7 module when installed together. The filter and tabs of Module Filter stop working when I installed Libraries. However, if I uninstall Libraries, the Module Filter module immediately starts working again. I don't see any errors on the screen or in the dblog.

Module Filter 1.7 was included as part of Drupal Commons 7 beta. I don't know if this module is *actually* incompatible with Libraries API or if it is some sort of weird combination of modules causing the problem. The only other module installed beyond what is included in Commons 7 beta is Admin Menu.

Comments

greenskin’s picture

What libraries are you using? It sounds like a JavaScript error. If you have a JavaScript library being loaded by the Libraries API that contains an error, it could prevent Module Filter from functioning correctly.

jlea9378’s picture

The only library is grammar_parser-7.x-1.2
also using the module grammar_parser_lib-7.x-1.1
I need them for using Coder Upgrade.

greenskin’s picture

Do you get any JavaScript errors? What browser are you using?

jlea9378’s picture

Category: bug » support

So I have another site that uses the same versions of Grammar Parser and Libraries. I installed Module Filter on there just now and it works perfectly fine. So it seems to be something with Commons 7. The problem only appeared when I enabled Libraries on there, and would disappear when I disabled Libraries.

Our Commons 7 site is down at the moment, so I can't check the Firefox Error Console for JS errors right now, but once the site is back up I will try to recreate the problem and check for you.

Using Firefox 17.0.1 on Win7 x64.

jlea9378’s picture

The only errors I see are these:
--
[21:15:02.842] TypeError: jQuery.timeago is undefined @ http://comm7.he2236.vps.webenabled.net/profiles/commons/modules/contrib/...
[21:15:03.618] TypeError: jQuery(...).timeago is not a function @ http://comm7.he2236.vps.webenabled.net/profiles/commons/modules/contrib/...

But those errors were present before I enabled Libraries. And Module Filter only breaks after I enable Libraries. I can't disable Timeago because it is required by a dozen other modules (Commons modules).

greenskin’s picture

Does your other site you mentioned present those same JavaScript errors (jQuery.timeago errors)?

jlea9378’s picture

Nope it isn't a Commons 7 site, and thus does not have the Timeago module. It's just an ordinary Drupal 7 site.

greenskin’s picture

Title: Not compatible with Libraries API module? » Missing timeago.js library
Project: Module Filter » Drupal Commons
Version: 7.x-1.7 » 7.x-3.0-beta1
Component: User interface » Code

Do you have the file /profiles/commons/modules/contrib/timeago/timeago.js? This is a necessary step for Timeago to work, and not something Commons can necessarily include in it's download. It depends on what license the library uses.

jlea9378’s picture

yes, timeago.js and jquery.timeago.js both exist, at that location.

greenskin’s picture

This might actually need to be moved to Timeago's project issue queue. Either the jquery.timeago.js file is not getting included in the page or it's being included after timeago.js. Do you see the jquery.timeago.js file in the document head?

geigerg’s picture

Chipie’s picture

I had the same error as soon I enabled the library module. #11 fixed my problem. Thank you.

ezra-g’s picture

Title: Missing timeago.js library » Timeago integration breaks when Libraries module is enabled
jlea9378’s picture

I installed the patch mentioned in #11 but the errors haven't gone away. Is there something I need to do after running the patch command? The file modified was a make file, so I'm thinking there is another step...

Topcheese’s picture

@jlea9378, sorry I haven't had a chance to get back to this issue. I was wondering when you say you installed the patch, did you also move the location of the file as mentioned?

Timeago latest DEV, moved jquery.timeago.js to /sites/all/libraries/timeago/

Edit: Also forgot to note that it says to use the latest Timeago DEV version.

jlea9378’s picture

I just updated to:
commons-7.x-3.0-beta1+12-dev

I haven't installed the patch again. Is that still necessary? Will that get rid of the errors below?

I also installed timeago library to the correct location.

I still see this on the Status Report page:

Warning: fopen(): http:// wrapper is disabled in the server configuration by allow_url_fopen=0 in timeago_get_version() (line 114 of /home/clients/websites/w_comm7/public_html/comm7/profiles/commons/modules/contrib/timeago/timeago.install).
Warning: fopen(http://timeago.yarp.com/jquery.timeago.js): failed to open stream: no suitable wrapper could be found in timeago_get_version() (line 114 of /home/clients/websites/w_comm7/public_html/comm7/profiles/commons/modules/contrib/timeago/timeago.install).

Despite these errors that appear on the Status Report, I AM able to enable the Module Filter module now, and it DOES work.

ezra-g’s picture

Status: Active » Postponed

I'm working to integrate Libraries module into Commons and CKEditor as part of #1879036: Replace Aloha with CKEditor via CKEditor project, which should resolve the present issue.

Folks who want to help with that effort can work on #1063482: Use Libraries API for CKEditor.

ezra-g’s picture

Status: Postponed » Fixed

I believe this is fixed by #1879036: Replace Aloha with CKEditor via CKEditor project, which introduced the Libraries module into Commons and changed the location of the TimeAgo library.

Status: Fixed » Closed (fixed)

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