After installing the update to 7.24 (former version was 7.23) Drupal finds no library anymore! See the appending files before and after update.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

iceman2202 created an issue. See original summary.

perpignan’s picture

Same issue..

Maverick0412’s picture

Same issue. Downgraded to 7.23 and all libraries work.

ron_s’s picture

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

I think the issue is libraries_update_7202 fails.

Give users the new permission of "access library reports" and see if it works. It did so for me.

The first time I ran the update I got the following:

Libraries  7202  Grant the "View library reports" permission to roles with the "View site reports" permission.
Do you wish to run all pending updates? (y/n): y
exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1003' for key 'PRIMARY'' in /includes/database/database.inc:2227              [error]
Stack trace:
#0 /app/includes/database/database.inc(2227): PDOStatement->execute(Array)
#1 /app/includes/database/database.inc(697): DatabaseStatementBase->execute(Array, Array)
#2 /app/includes/database/mysql/query.inc(36): DatabaseConnection->query('INSERT INTO {ba...', Array, Array)
#3 /home/.composer/vendor/drush/drush/commands/core/drupal/batch.inc(66): InsertQuery_mysql->execute()
#4 /home/.composer/vendor/drush/drush/includes/batch.inc(80): _drush_backend_batch_process('updatedb-batch-...', Array, Array)
#5 /home/.composer/vendor/drush/drush/commands/core/drupal/update_7.inc(304): drush_backend_batch_process('updatedb-batch-...')
#6 /home/.composer/vendor/drush/drush/commands/core/drupal/update_7.inc(235): drush_update_batch(Array)
#7 /home/.composer/vendor/drush/drush/commands/core/core.drush.inc(462): update_main()
#8 [internal function]: drush_core_updatedb()
#9 /home/.composer/vendor/drush/drush/includes/command.inc(422): call_user_func_array('drush_core_upda...', Array)
#10 /home/.composer/vendor/drush/drush/includes/command.inc(231): _drush_invoke_hooks(Array, Array)
#11 [internal function]: drush_command()
#12 /home/.composer/vendor/drush/drush/includes/command.inc(199): call_user_func_array('drush_command', Array)
#13 /home/.composer/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#14 /home/.composer/vendor/drush/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#15 /home/.composer/vendor/drush/drush/drush.php(12): drush_main()
#16 {main}

Then I ran drush updatedb a second time and it completed successfully.

iceman2202’s picture

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

This issue has nothing to do with the development version!

There aren't any errors during update/installation. Only the downgrade to 7.23 works.

ron_s’s picture

I'm not going to argue with you, but a problem in 2.4 is a problem in -dev. It's the latest release, and therefore it matches whatever exists in -dev. And if any patch is going to be written, it certainly is not going to be done against 2.4.

After updating permissions (since 7.x-2.4 adds a new permission), it works for me without issue.

kjuro’s picture

I have the same problem on some of my sites (not for all, with the same code). Libraries like Colorbox are not recognized. DB upgrade shows no problem. How to fix this?

iceman2202’s picture

After I granted the permission "View library reports" in 7.24 to all users, including anonymous users:

Libraries do not work. The issue has nothing to do with permissions.

kjuro’s picture

I found problem for my site. I had some old install profile from Drupal 6 migration. Libraries module uses profile for finding directories. I executed:

DELETE FROM variable WHERE `name` = 'install_profile';

and after cache was cleared then libraries was recognized.

iceman2202’s picture

Had also an old install profile (drupalcenter), probably since Drupal 6 migration.

I changed the installtion profile with profile switcher to "standard" and afterwords deleted this old profile with module missing message fixer.

Now it seems to work fine.

bharat.kelotra’s picture

I have a site on Acquia and for me the libraries_get_libraries function return empty due to a condition

$searchdir = array();
  $profile = drupal_get_path('profile', drupal_get_profile());
  $config = conf_path(); 
if (!$profile || !$config) {
    return array();
  }

I tried to give that new permission to all roles but libraries are still not working.
Does anyone have this issue?

techwolf12’s picture

#9 also worked for me.

heilop’s picture

#9 works like a charm!

aquaphenix’s picture

I can confirm that by installing Profile Switcher and enabling the current profile then Libraries continue to work normally after clearing the cache.

andyanderso’s picture

#9 also worked for me. Thank you.

Sseto’s picture

#9 also worked for me. Thank you!

AlbionBrown’s picture

I think this could be related to a suspected logic error I found the other day. I made a patch on another thread - https://www.drupal.org/project/mailchimp/issues/2054037
https://www.drupal.org/files/issues/2018-09-25/libraries_7.x-2.4_patch.diff

hmalaboosi’s picture

#9 worked for me. Thank you!

Anghelu’s picture

joseph.olstad’s picture

Status: Active » Fixed

Please try the latest 7.x-2.x dev release
please confirm fix .

Thanks everyone!

joseph.olstad’s picture

ignore the 7.x-3.x branch, use 7.x-2.x

Status: Fixed » Closed (fixed)

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