When Libraires module is enabled, we don't need to call drupal_add_js() directly to include the TimeAgo library. Removing the redundant call resolved a console error in the latest dev version of Commons 3.x.

Members fund testing for the Drupal project. Drupal Association Learn more


ezra-g’s picture

ezra-g’s picture

Status: Fixed » Needs review

I updated the wrong issue :P.

But as long as I'm here, I wanted to elaborate and point out that the current call can actually add the JS and point to 2 different versions of the file, or a missing path to the file, if a site uses Libraries and does not have timeago library in sites/all/modules/timeago.

IceCreamYou’s picture

Status: Needs review » Closed (duplicate)

Patch in #1897816: Add more detail about Libraries module in installation directions should fix it, awaiting testing for commit.

IceCreamYou’s picture

Status: Closed (duplicate) » Needs review

Actually, I misread this issue. I think this is valid, but conflicts with #1897816: Add more detail about Libraries module in installation directions. Will need to find a little time to test.

pixelula’s picture


My issue was that the configuration file (sites/all/modules/timeago/timeago.js where jQuery.timeago.settings.strings it's initialized) was beign loaded before jquery.timeago.js, then the timeago function did not exists. I tested the patch but the js configuration (sites/all/modules/timeago) is not loaded then is not initialized. I merged this patch with patch in #1897816 and the configuration file is loaded at the end.

Devin Carlson’s picture

Status: Needs review » Fixed

This was reported to not be the case in #1996706: Timeago Patch Breaks functionality.

Status: Fixed » Closed (fixed)

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