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.
Hi,
We just noticed the whole cache_page table is truncated when we edit a node. We don't necessarily have to save it, just opening the edit form makes us clearing the cache_page table.
This is the stacktrace:
/nl/node/102178/edit (suspended)
cache_clear_all(): /includes/cache.inc at line 133
cache_clear_all(): /includes/cache.inc at line 132
path_redirect_clear_cache(): /sites/all/modules/path_redirect/path_redirect.module at line 470
path_redirect_clear_cache(): /sites/all/modules/path_redirect/path_redirect.module at line 469
path_redirect_delete_multiple(): /sites/all/modules/path_redirect/path_redirect.module at line 507
path_redirect_delete_multiple(): /sites/all/modules/path_redirect/path_redirect.module at line 501
_pathauto_alias_exists(): /sites/all/modules/pathauto/pathauto.inc at line 28
_pathauto_alias_exists(): /sites/all/modules/pathauto/pathauto.inc at line 23
pathauto_create_alias(): /sites/all/modules/pathauto/pathauto.inc at line 334
pathauto_create_alias(): /sites/all/modules/pathauto/pathauto.inc at line 262
pathauto_form_alter(): /sites/all/modules/pathauto/pathauto.module at line 296
pathauto_form_alter(): /sites/all/modules/pathauto/pathauto.module at line 269
drupal_alter(): /includes/common.inc at line 2892
drupal_alter(): /includes/common.inc at line 2862
drupal_prepare_form(): /includes/form.inc at line 551
drupal_prepare_form(): /includes/form.inc at line 476
drupal_get_form(): /includes/form.inc at line 106
drupal_get_form(): /includes/form.inc at line 70
node_page_edit(): /modules/node/node.pages.inc at line 14
node_page_edit(): /modules/node/node.pages.inc at line 12
menu_execute_active_handler(): /includes/menu.inc at line 349
menu_execute_active_handler(): /includes/menu.inc at line 335
/index.php at line 17
Parameters passed to cache_clear_all():
$cid = null
$table = (string:10) cache_page
$wildcard = (boolean) false
Any reasons why you guys clear the whole "cache_page" just to build the edit form?
Caching mode is on "normal". Minimum lifetime = < none >
Comment | File | Size | Author |
---|---|---|---|
#2 | 1341112_lazy_cache_clear.patch | 527 bytes | jsobiecki |
#1 | 1341112.patch | 396 bytes | Jochus |
Comments
Comment #1
Jochus CreditAttribution: Jochus commentedMeanwhile, I created a patch to solve this problem. It's a not a good solution, but I can't figure out why the cache_page needs to cleared :-(
Comment #2
jsobiecki CreditAttribution: jsobiecki commented@Jochus
I can confirm this problem. I made some research, and this behavior is related to this issue: http://drupal.org/node/261615.
I'm not sure if pathauto_alias_exists is best place for such action (like tidy up mess in path_redirect), but it's pathauto issue, not path_redirect.
I think, that simple modification of Your change will be a bit safer approach (clean cache only when at least one entry from path_redirect was removed). Please note - this patch is against 1.0-rc2 version.
Comment #2.0
jsobiecki CreditAttribution: jsobiecki commented< none > replace by < none > (added spaces)