pathauto does not function for me.

I assume that pathauto needs to have a number of database tables installed in order to function.
I cannot see any tables installed named "pathauto" or similar in my drupal database, so I assume that something is wrong in this respect. I can only see the "url_alias" table.

please let me know if any tables are required specific to the pathauto operation, and all the table specifications, so that I may create the tables manually.

thanks very much in advance.

Comments

AstralP’s picture

Status: Active » Fixed

You can see which tables are created if any by looking at the pathauto.install.

hope this helps

abramo’s picture

thanks for the logical suggestion - pathauto.install 5.x1.0 does not install any tables:

<?php
// $Id: pathauto.install,v 1.1.2.1 2007/01/17 16:53:41 greggles Exp $

/**
 *
 * @file Provides install, updated, and uninstall functions for pathauto.
 *
 */



/**
 * Implementation of hook_uninstall().
 */
function pathauto_uninstall() {
  // Delete all the pathauto variables and then clear the variable cache
  db_query("delete from variable where name like 'pathauto_%'");
  cache_clear_all('variables', 'cache');
}

this is very peculiar: it does not install anything and during uninstall it looks for a table "pathauto_" which has not (apparently) been installed!

does this make any sense?

.

abramo’s picture

Status: Fixed » Active
greggles’s picture

Status: Active » Postponed (maintainer needs more info)

I assume that pathauto needs to have a number of database tables installed in order to function.

It doesn't need any tables. Pathauto uses the drupal variable system to store all its configuration and the actual paths are stored in the drupal core url_alias table. So, this is an incorrect assumption.

pathauto does not function for me.

Can you be a little more specific? :)

I would suggest visiting and submitting the admin/settings/pathauto page as a first step. But just "does not function" is not descriptive enough to really help you.

abramo’s picture

greggles, many thanks for the clarification, really much appreciated !!
the fact that the uninstall tries to delete a table such as "pathauto_" confused me into expecting to find such a table installed in the first place. so, now it is clear that the basic table in order for pathauto to function is "url_alias".

you said: "But just "does not function" is not descriptive enough to really help you."
you are right, and I wish to apologise for the lack of details - but I just did not want to burden anybody with (possibly unnecessary) details prior to clarifying that the database "issue" was not the one causing my (perceived?) problem.

so, the issue is as follows:
- aliases are actually created, and passed to urls, links etc, without issue
- example:
- for category "Europe" url alias created is: http://localhost/drupal/europe (re: node/2 and also taxonomy/term/2)
- for subcategory "UK" within category "Europe" url alias created is http://localhost/drupal/uk (re: node/5 and also taxonomy/term/5)
- for the case of subcategory "UK" a further alias is also created europe/uk
- it was my "perception" that when pathauto would function properly the url for the subcategory "UK" would use the alias europe/uk i.e. the url would be http://localhost/drupal/europe/uk instead of http://localhost/drupal/uk

it was my perception that urls would be determined by the taxonomy alias, and that if that was not the case it would be deemed that pathauto was not functioning properly. I realize now that this perception is (probably) wrong, and the question (rather than issue) now has become:

what must be done so that a url of the sort: http://localhost/drupal/europe/uk
is used rather than http://localhost/drupal/uk - i.e. reflecting the category/subcategory hierarchy and taxonomy?

thanks in advance for bearing with me :)
(but could not find this in any previous support ticket and could not also resolve it in spite of honestly trying . . . .)

abramo’s picture

Status: Postponed (maintainer needs more info) » Active
greggles’s picture

Hi ambro - the delete statement is deleting from the variable table (or at least it should be!).

I think what you want is the [catpath] pattern. Let me know if that works out. If it doesn't work out then there is probably a separate issue related to catpath that this would be a duplicate.

abramo’s picture

many thanks for everything.
it must be a [catpath] issue - I will follow that route . . . .

and also many thanks for making available and supporting a really smart module :)

best, abramo

greggles’s picture

Title: Database tables for pathauto ??? » aliases with catpath not working
Category: support » bug

I actually don't see any issues related to this so I've changed the title and category to reflect the real problem.

abramo’s picture

for any new user accessing this ticket in the future with a similar request and "perceived" issue I sum up as follows:

- the "pathauto" module does not install any database tables of its own, it basically uses table "url_alias". if you want a clean start when using "pathauto", with reference to data, empty the contents of table "url_alias" first.

- if "pathauto" does not perform as you expect it to do, this is not a matter of a database table missing (as it can actually be the case with some other modules, ex. "category" module).

- it is a matter of proper configuration of "pathauto" parameters. this configuration is done (5.x) from administer > by module > pathauto > node path settings > pattern for all . . . .
it is important to determine here the correct settings as per your requirements, and play around with them to see the results, i.e. if they are according to what your little heart desires.

- for example: if you require alias urls of the type reflecting a "nested" taxonomy, i.e. with an alias path reflecting nested categories/subcategories, as is common in a folder/subfolder/subsubforlder/file situation, then I suggest that you configure everything in the section node path settings > pattern for all . . . . as [categorypath], or (even better) as [categorypath].html
I have also found that to get this desired effect (i.e. folder/subfolder/subsubforlder/file) you should leave the configuration at pathauto > category path settings blank

- if you start from scratch, you have to do "bulk update" twice before you get the desired results

hope this helps,

abramo

greggles’s picture

Status: Active » Postponed (maintainer needs more info)

I marked http://drupal.org/node/118756 as a duplicate of this. Note that fax8 found that it was fixed in the 5.x-1.x developer release of pathauto.

abramo - can you test out that version?

abramo’s picture

many thanks :
have tested the latest pathauto dev. release (12 Feb '07) and confirm that I generate perfect aliases with it, including [catpath]. I have also "category pathauto" enabled.

an issue I have encountered is at "Category Path Settings" : when I run bulk update to generate new aliases the pre-existing aliases are not overwritten by any new ones. I have to empty manually the database table url_aliases in order to have the newly generated aliases recorded.

hope this is easy to fix :)

best,
abramo

greggles’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

abramo - thanks for the feedback.

Can you please open a new issue for discussion of the "pathauto adds a new alias instead of replacing one" issue? It's easier to track things that way.

When you do that please take note of the settings you have in the "General Settings > Update action" section of the pathauto settings.

abramo’s picture

thanks, shall do.
best, abramo