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.
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.
Comment | File | Size | Author |
---|---|---|---|
#5 | timeago-libraries-1945942-5.patch | 1.27 KB | pixelula |
timeago-libraries-a.patch | 491 bytes | ezra-g |
Comments
Comment #1
ezra-g CreditAttribution: ezra-g commentedhttp://drupalcode.org/project/commons.git/commit/24c126d
Comment #2
ezra-g CreditAttribution: ezra-g commentedI 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.
Comment #3
IceCreamYou CreditAttribution: IceCreamYou commentedPatch in #1897816: Add more detail about Libraries module in installation directions should fix it, awaiting testing for commit.
Comment #4
IceCreamYou CreditAttribution: IceCreamYou commentedActually, 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.
Comment #5
pixelula CreditAttribution: pixelula commentedHi,
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.
Comment #6
Devin Carlson CreditAttribution: Devin Carlson commentedThis was reported to not be the case in #1996706: Timeago Patch Breaks functionality.