url alias
Drupal 7: Bulk update taxonomy url aliases
Submitted by vinayras on Wed, 07/20/2011 - 14:49Yesterday, we showed how to Bulk update node url aliases. Now we faced similar problems while generating bulk url aliases for taxonomy terms. For some reason the admin interface was not able to generate them. The screen just struct up.
define('DRUPAL_ROOT', getcwd());
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
// menu_execute_active_handler();
set_time_limit(0);
error_reporting(E_ALL);
$tid = (int) variable_get("url_alias_last_tid",0);
- vinayras's blog
- Read more
- 9840 reads
Drupal 7: Bulk update node url aliases
Submitted by vinayras on Tue, 07/19/2011 - 11:04eBharatBase.com has more than 2, 60,000 nodes. We changed the pattern of url aliases to be generated for each node. We tried to generate from admin interface of pathauto module, the system hangs everytime.
The reason - query to fetch node was taking much longer to execute, and php/drupal used to show error message since they were not receiving any response.
To tackle this problem, i started writing small but effect piece of code to generate the url alises of all 2,60,000+ nodes.
1) Created script named "generate_url_alias.php" in drupal root folder
- vinayras's blog
- Read more
- 12825 reads