User warning: Table 'db_drupal.advagg_files' doesn't exist query: SELECT * FROM advagg_files in _db_query() (line 148 of /var/www/virtual/peterbowey.com.au/includes/database.mysqli.inc)
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mikeytown2’s picture

That code runs when the module is disabled.

function advagg_disable() {
  // Make sure the advagg_flush_caches function is available.
  drupal_load('module', 'advagg');

  // Flush advagg caches.
  $cache_tables = advagg_flush_caches();
  foreach ($cache_tables as $table) {
    cache_clear_all('*', $table, TRUE);
  }
}

/**
 * Implementation of hook_flush_caches().
 */
function advagg_flush_caches() {
  // Try to allocate enough time to flush the cache
  if (function_exists('set_time_limit')) {
    @set_time_limit(240);
  }

  global $_advagg;
  // Only one advagg cache flusher can run at a time.
  if (function_exists('lock_acquire')) {
    if (!lock_acquire('advagg_flush_caches')) {
      return;
    }
  }

  // Find files that have changed.
  $needs_refreshing = array();
  $results = db_query("SELECT * FROM {advagg_files}");
  while ($row = db_fetch_array($results)) {
...

Now the interesting thing is in hook_install I create the db tables.

/**
 * Implementation of hook_install().
 */
function advagg_install() {
  drupal_install_schema('advagg');

  // Make sure we run last.
  db_query("UPDATE {system} SET weight = 250 WHERE name = 'advagg'");
}

So my question is how did you test this? Was hook_install not ran when the module was enabled?
module_enable() only runs hook_enable(); drupal_install_modules() will run _drupal_install_module() which runs hook_install()

Peter Bowey’s picture

# Steps used:
Disabled all 4 [advagg] modules; then used Drupal GUI module [uninstall] to [DB] clear the four (4) advagg modules.

Then, because if the above [user warning], I then manually search and delete the MySQL database for advagg 'bits'. I usually find 5 (I delete all 5)

mikeytown2’s picture

On install I create the advagg_files table. In the disable function I run this database query SELECT * FROM advagg_files. This query doesn't run on uninstall.

admin/build/modules/uninstall is how I uninstall a module; and if you use this, all the advagg tables will be destroyed via advagg_uninstall.

This the module?
http://drupal.org/project/gui
I don't see how to use this for the administration of your site.

Peter Bowey’s picture

This the module?
http://drupal.org/project/gui
I don't see how to use this for the administration of your site.

No, I just meant the Drupal 'GUI' interface (web) - as apposed to say a 'command' line TUI!

mikeytown2’s picture

Status: Active » Fixed
FileSize
462 bytes

So what your telling me is after uninstalling the advagg module these database tables still exist
advagg_bundles
advagg_files
cache_advagg
cache_advagg_bundle_reuse
cache_advagg_files_data
This I can not repo.

Uninstalling multiple advagg modules at the same time will cause the error you reported though. This should fix it & it has been committed.

Peter Bowey’s picture

I will test and report!

Not sure how this will paste - as code (from phpMyAdmin):
After normal drupal disable + uninstall, I goto the DB...

1) Search 'advagg' all -> drupal DB

+ Options
Partial Texts
Full Texts
Show binary contents
Show BLOB contents
Show binary contents as HEX
Hide Browser transformation
Full Texts 	filename 	name 	type 	owner 	status 	throttle 	bootstrap 	schema_version 	weight 	info
	Edit 	Delete 	sites/all/modules/advagg/advagg_bundler/advagg_bun... 	advagg_bundler 	module 	  	0 	0 	0 	-1 	0 	a:8:{s:4:"name";s:14:"AdvAgg Bundler";s:11:"descri...
	Edit 	Delete 	sites/all/modules/advagg/advagg_css_compress/advag... 	advagg_css_compress 	module 	  	0 	0 	0 	-1 	0 	a:8:{s:4:"name";s:19:"AdvAgg Compress CSS";s:11:"d...
	Edit 	Delete 	sites/all/modules/advagg/advagg_js_cdn/advagg_js_c... 	advagg_js_cdn 	module 	  	0 	0 	0 	-1 	0 	a:8:{s:4:"name";s:21:"AdvAgg CDN Javascript";s:11:...
	Edit 	Delete 	sites/all/modules/advagg/advagg_js_compress/advagg... 	advagg_js_compress 	module 	  	0 	0 	0 	-1 	0 	a:8:{s:4:"name";s:26:"AdvAgg Compress Javascript";...
	Edit 	Delete 	sites/all/modules/advagg/advagg.module 	advagg 	module 	  	0 	0 	0 	-1 	250 	a:8:{s:4:"name";s:27:"Advanced CSS/JS Aggregation"...
With selected: Check All / Uncheck All With selected:

and....

+ Options
Partial Texts
Full Texts
Show binary contents
Show BLOB contents
Show binary contents as HEX
Hide Browser transformation
Full Texts 	name 	value
	Edit 	Delete 	advagg_css_compress_agg_files 	i:1;
	Edit 	Delete 	advagg_css_compress_inline 	i:1;
	Edit 	Delete 	advagg_css_compressor 	s:1:"1";
	Edit 	Delete 	advagg_js_compress_url_key 	i:1182193272;
	Edit 	Delete 	cache_flush_cache_advagg_bundle_reuse0 	i:1305853304;
	Edit 	Delete 	cache_flush_cache_advagg_files_data0 	i:1305853304;
	Edit 	Delete 	cache_flush_cache_advagg0 	i:1305853304;
With selected: Check All / Uncheck All With selected:
Peter Bowey’s picture

Here is a 'better' DB dump of the above:

Print SQL result

Host: localhost
Database: db_drupal
Generation Time: May 20, 2011 at 10:50 AM
Generated by: phpMyAdmin 3.3.8.1 / MySQL 5.1.56-log
SQL query: SELECT * FROM `db_drupal`.`system` WHERE (`filename` LIKE '%advagg%' OR `name` LIKE '%advagg%' OR `type` LIKE '%advagg%' OR `owner` LIKE '%advagg%' OR `status` LIKE '%advagg%' OR `throttle` LIKE '%advagg%' OR `bootstrap` LIKE '%advagg%' OR `schema_version` LIKE '%advagg%' OR `weight` LIKE '%advagg%' OR `info` LIKE '%advagg%') LIMIT 0, 30 ;
Rows: 5
filename 	name 	type 	owner 	status 	throttle 	bootstrap 	schema_version 	weight 	info
sites/all/modules/advagg/advagg_bundler/advagg_bundler.module 	advagg_bundler 	module 	  	0 	0 	0 	-1 	0 	a:8:{s:4:"name";s:14:"AdvAgg Bundler";s:11:"description";s:89:"Provides intelligent bundling of CSS and JS files by grouping files that belong together.";s:7:"package";s:27:"Advanced CSS/JS Aggregation";s:4:"core";s:3:"6.x";s:12:"dependencies";a:1:{i:0;s:6:"advagg";}s:10:"dependents";a:0:{}s:7:"version";N;s:3:"php";s:5:"4.3.5";}
sites/all/modules/advagg/advagg_css_compress/advagg_css_compress.module 	advagg_css_compress 	module 	  	0 	0 	0 	-1 	0 	a:8:{s:4:"name";s:19:"AdvAgg Compress CSS";s:11:"description";s:60:"Compress CSS with a 3rd party compressor, CSSTidy currently.";s:7:"package";s:27:"Advanced CSS/JS Aggregation";s:4:"core";s:3:"6.x";s:12:"dependencies";a:1:{i:0;s:6:"advagg";}s:3:"php";s:3:"5.0";s:10:"dependents";a:0:{}s:7:"version";N;}
sites/all/modules/advagg/advagg_js_cdn/advagg_js_cdn.module 	advagg_js_cdn 	module 	  	0 	0 	0 	-1 	0 	a:8:{s:4:"name";s:21:"AdvAgg CDN Javascript";s:11:"description";s:74:"Use a shared CDN for javascript libraries, Google Libraries API currently.";s:7:"package";s:27:"Advanced CSS/JS Aggregation";s:4:"core";s:3:"6.x";s:12:"dependencies";a:1:{i:0;s:6:"advagg";}s:10:"dependents";a:0:{}s:7:"version";N;s:3:"php";s:5:"4.3.5";}
sites/all/modules/advagg/advagg_js_compress/advagg_js_compress.module 	advagg_js_compress 	module 	  	0 	0 	0 	-1 	0 	a:8:{s:4:"name";s:26:"AdvAgg Compress Javascript";s:11:"description";s:66:"Compress Javascript with a 3rd party compressor, JSMin+ currently.";s:7:"package";s:27:"Advanced CSS/JS Aggregation";s:4:"core";s:3:"6.x";s:12:"dependencies";a:1:{i:0;s:6:"advagg";}s:10:"dependents";a:0:{}s:7:"version";N;s:3:"php";s:5:"4.3.5";}
sites/all/modules/advagg/advagg.module 	advagg 	module 	  	0 	0 	0 	-1 	250 	a:8:{s:4:"name";s:27:"Advanced CSS/JS Aggregation";s:11:"description";s:101:"Aggregates multiple CSS/JS files, serves them with gzip encoding and smart client-side cache headers.";s:7:"package";s:27:"Advanced CSS/JS Aggregation";s:4:"core";s:3:"6.x";s:12:"depend
Peter Bowey’s picture

Keep in mind that I have memcache enabled at two levels; PHP Core + Drupal

Peter Bowey’s picture

To #8

Actually, come to think of it, it is three levels of memcache..:
Linux Daemon 'memcache', then PHP core 'memcache', and finally the Drupal 'memcache'

mikeytown2’s picture

The 3 cache_flush_cache tables get variable_set in the cache_get function. There appears to be no API for removing these from the variables table through the cache api. Looks like your using the latest memcache with this patch applied #1155006-10: Invalid argument supplied for foreach() . I don't see a clean way of removing these variables other than running this query DELETE FROM variable WHERE name LIKE 'cache_flush_cache_advagg%'.

The other 4 can be removed in those modules uninstall hooks. I'll search around for any other variable_del's I might have missed.

mikeytown2’s picture

FileSize
2.32 KB

This patch has been committed.

Status: Fixed » Closed (fixed)

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

paulgemini’s picture

Status: Closed (fixed) » Active

I'm still having this problem. Uninstalled Advag and then reinstalled it and I'm getting that error.

Are you saying I should delete that cache tables?

mikeytown2’s picture

@paulgemini
Which table do you get the error on? advagg_files or cache_advagg_*?

mikeytown2’s picture

Status: Active » Closed (fixed)

Moving this back to closed @paulgemini has not replied to this thread.