Posted By

tgbdad on 01/29/09


mysql drupal

Versions (?)

Fix screwy URL aliases for project_issue nodes

 / Published in: MySQL

I currently have project_issue nodes set for replacement pattern issues/issue[nid] in Drupal 5.x PathAuto. This query fixes all of the URL aliases for entries created before this was set correctly.

  1. UPDATE url_alias SET dst = REPLACE(src,'node/','issues/issue') WHERE src IN (SELECT CONCAT('node/', CAST(nid as CHAR)) FROM node WHERE type = 'project_issue') AND dst NOT LIKE 'issues/issue%';

Report this snippet  

You need to login to post a comment.