Drupal 7 links duplicate subdirectory in url

by Wolfe   Last Updated February 11, 2019 10:07 AM

I have an odd bug that isn't on other drupal install for other domains on my server.

Basically, menus work fine.

However links in the content will look like this: http://site.com/content/content/node/123

instead of this http://site.com/content/node/123

which is how it should be.

Interestingly enough this persists in using the l() function in drupal 7 templates or in views even if I use rewrite output.

This doesn't happen on another drupal 7 install with a different domain and webdirectory.. I've changed base_url in settings.php and it does nothing and Rewrite base in .htaccess and it does nothing. I flushed all caches. I even changed to a basic theme. None if it made any difference. I'm stumped and about to resort to outputting variables from core. help?

With the duplicate sub directory in the URL, or without it, confusingly enough, the node does display and everything works. What is going on.

Tags : 7 uri

Answers 1

I figured it out. I installed pathauto to try and force it to work and realized that the url aliases set on every node had content/ prepended to them as part of a mass import.

I ran this in the mysql console to update them correctly:

update url_alias set alias = REPLACE(alias,'content/node','node');

And problem fixed.

August 01, 2013 18:00 PM

Related Questions