After latest update i've much got errors like:
Warning: file_get_contents(sites/all/modules/navbar/js/navbar-tableheader.js): failed to open stream: No such file or directory in _locale_parse_js_file() (line 1488 of /var/www/uksusoff/data/www/rock63.ru/includes/locale.inc).
This module removed but still try get their js.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

UksusoFF created an issue. See original summary.

Frank.dev’s picture

same.

many, many messages "Warning: file_get_contents(xxx): failed to open stream: No such file or directory in _locale_parse_js_file() (line 1488 of xxx)."

mikeytown2’s picture

Category: Bug report » Support request

@UksusoFF
There are still references to that js file in your code base most likely. AdvAgg is now more verbose with issues like this.

@Frank.dev
Your issue is with similar but the error Warning: file_get_contents is getting thrown in core and thus out of my control. You're doing a drupal_add_js to a file that no longer exists.

UksusoFF’s picture

Where it can be checked?
I've not include most of this files. It's from other modules but now their disabled and removed.

mikeytown2’s picture

@UksusoFF
Unfortunately there is no way to tell where the js came from. You can use hook_js_alter to search for sites/all/modules/navbar/js/navbar-tableheader.js and remove it before advagg processes it.

function custom_js_alter(&$javascript) {
  if (isset($javascript['sites/all/modules/navbar/js/navbar-tableheader.js'])) {
    unset($javascript['sites/all/modules/navbar/js/navbar-tableheader.js']);
  }
}
bredy73’s picture

I see the database and this file are in the advagg_files. I think to remove it.

mikeytown2’s picture

Cron will remove it in 2 weeks. You can adjust this time with the advagg_remove_missing_files_from_db_time variable; default is 1209600. Reason for keeping it around is aggregates referencing it will fail; it meas something is requesting an old aggregate for some reason (usually an external page cache).

UksusoFF’s picture

I found old non exists file names in "advagg_files" table. Can clean this table for regenerate it?

UPD: Also found in "variable" table with "javascript_parsed" name.

mikeytown2’s picture

AdvAgg will regenerate the advagg_files table if you truncate it. Just be aware that you might get some 404's for css/js files for a little while.

javascript_parsed is part of core; core will also regenerate it.

UksusoFF’s picture

Looks like after clean table all works as expected.

mikeytown2’s picture

So looks like I should add a truncate advagg_files table and clear javascript_parsed as a button on the operations page.

  • mikeytown2 committed cee3123 on 7.x-2.x
    Issue #2698919 by mikeytown2: Error with removed modules
    
mikeytown2’s picture

Status: Active » Fixed
FileSize
1.79 KB

This patch has been committed.

mikeytown2’s picture

Title: Error with removed modules » Error with removed modules - truncate advagg_files table

Status: Fixed » Closed (fixed)

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