There is no mechanism for reporting on installed versions of libraries and checking for updates like Drupal core does for modules and themes. Thus the job is done inconsistently by modules that attempt it. For example, jQuery UI used to add an item to the status report with the installed version. WYSIWYG has it's own report-like interface. HTML Purifier used to poll the vendor web site and display a message on admin pages when it was out-of-date. But there's no single place to go to see the installed versions of all libraries registered with the system with latest available versions for each.

Proposed resolution

I propose the addition of a two things:

  1. A report, similar to Drupal core's "Available updates", that displays version information for all libraries registered in the system with links to vendor web sites and such.
  2. A mechanism for checking for and alerting administrators to available updates, probably a status report item and optional email notifications, like core does.

I think these would improve the site builder/administrator experience and help keep sites more stable and secure.

Remaining tasks

  1. Get feedback on the proposal.
  2. Agree upon a solution, including API additions.
  3. Write a patch implementing the solution!
  4. Write tests.
  5. Update documentation.

User interface changes


API changes


Original report by tstoeckler

This patch implements a UI for Libraries at /admin/reports/libraries.
The code can probably be cleaned up a bit, but I guess the basic layout/design needs to be decided upon first.
This depends on #719896: Add a hook_libraries_info().
Screenshot attached. I just enabled the test module from #719896: Add a hook_libraries_info() and visited /admin/reports/libraries and that's what you see.


sun’s picture


There has been some discussion around Wysiwyg's UI already: #487690: Improve installation instructions

tstoeckler’s picture

Great, will look into that. I hadn't looked into WYSIWYG at all so far. Initially I just wanted something to test #719896: Add a hook_libraries_info(), but then I liked it enough to roll a patch =).

tstoeckler’s picture

new14.23 KB

I know this isn't particularly high on the list currently, but I needed to do something soothing :)

This implements the concept of one centralized libraries overview at admin/reports/libraries (similar to drush libraries-list) and detailed per-library installation instructions.

Just turn on libraries_test.module and visit admin/reports/libraries.

I could of course provide screenshot, if needed.

drwierdo’s picture

a screenshot would be nice...

1kenthomas’s picture

Bump. Anything more on this? A UI seem critical to end-user troubleshooting...

RobLoach’s picture

Status:Active» Needs work

Patch broken... I think it should be the module defining the Library to provide the UI on this. I could be convinced other-wise though.

tstoeckler’s picture

new38.06 KB
new20.27 KB
new36.24 KB
new12.91 KB

Here's a re-roll (wow, this was still a CVS patch...).

I also attached some screenshots, which, at this point, are more important than the patch.
There are a bunch of things wrong with the patch code-wise, but I think we should settle on something desing-wise first, and then we can nit-pick the code.

I attached a screenshot of the Libraries overview, and two example screens of a library that is installed, and one that is missing. There are similar screens for libraries that e.g. have an unsupported version.

RobLoach’s picture

Don't really have time to test this right now, but just wanted to say THIS IS AWESOME!!! :-)

TravisCarden’s picture

Category:task» feature
Issue tags:+DX (Developer Experience)

At @sun's request, I've updated this issue with the summary I originally submitted as #1679840: Add mechanism for finding and reporting on available library updates. Hopefully it adequately represents the original efforts here. It probably broadens the scope a bit. If anyone has concerns, please voice them. Thanks for inviting me to the party. ;)

tstoeckler’s picture

Version:7.x-1.x-dev» 7.x-2.x-dev
Issue tags:-DX (Developer Experience)

This is 7.x-2.x material at least. Also don't know why it's tagged DX.

Note that we have plans for completely revamping Libraries API for 7.x-3.x. The plans also include a UI, for automatically (!) installing Libraries directly, but that's a ways off.

Also, when we have the ability to download libraries directly, we'll have to rethink our UI efforts. Instead of a "passive" status report like the one proposed above, we'll probably need something rather resembling the Modules page.

Just leaving the note for now, not sure whether and how to tag this in light of the new plans.

klonos’s picture

Version:7.x-2.x-dev» 7.x-3.x-dev

Seconding Rob's excitement from back in February: THIS IS AWESOME!!!

I'm surprised that I haven't spotted this issue earlier. Do you think early adoption from certain modules with willing maintainers would help in order to have actual testing grounds instead of having to use test libraries? Just asking because one comes to mind.

tstoeckler’s picture

Do you mean early adoption of 7.x-3.x? Sure, early adoption always helps.

With regards to this issue, as I tried to explain in #10, I think we need to take a step back and clearly define what we want. Since automatic installs from the UI is on the plate for 7.x-3.x, we really need to think how this all should look and what the use-cases are.

tstoeckler’s picture

Issue summary:View changes
jimmyko’s picture

So now we only plan to add this feature on 7.x-3.x branch? At this moment, 7.x-3.x do not have dev version but 8.x-3.x have. May I try to start this idea on 7.x-2.x?

Rob Holmes’s picture

new909.99 KB

Thought i should mention I have been using this UI proposal in my library pack module for quite some time now, it might be a good place to do the work separate from the libraries main module?