Drupal 4.7.2
PHP Version 5.1.2
MySQLi 5.0.18
Apache 1.3.33

I just discovered this errror on a production site. Several modules are enabled though category module is not enabled on this site. I am not sure if this is my error, a pathauto error, or a drupal error.

I used pathauto module to "bulk update" the "node paths" all of the "event nodes" on the site using the following "node path setting":

[eventyyyy]/[eventmon]/[eventdd]/[cat]

"Create index aliases" was/is checked in the pathauto "General Settings".

The bulk update resulted in aliases such as these:


2005
2005/aug        
2005/aug/23        
2005/aug/23/informational_meeting

When I browse to aliases of the actual nodes, the node is displayed as expected (i.e. http://example.com/2005/aug/23/informational_meeting).

When I browse to "index aliases" such as http://example.com/2005 there are database errors:


Warning: preg_replace() [function.preg-replace]: Unknown modifier 'a' in /home/drupal/includes/database.inc on line 283

Warning: mysqli_query() [function.mysqli-query]: Empty query in /home/drupal/includes/database.mysqli.inc on line 102

Warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 0, 8' at line 1 query: LIMIT 0, 8 in /home/drupal/includes/database.mysqli.inc on line 121 

Although a page titled "List" is displayed below the errors, there is no list of nodes on the page.

Comments

greggles’s picture

I'm frankly more than a little confused about the motivation for the index alias function.

If most people agree that it isn't useful then I'd be happy to simply remove it. If someone can enlighten me on the purpose then I would certainly appreciate it.

pcwick’s picture

I created the index aliases when I was building the site just to see what they were, then I promptly forgot about them. Index aliases are obviously not important to the operation of this site, ha, ha. I thought I would report the error when I discovered it.

I use Views Module to do something similar to what I believe index aliases are intended to do, which is provide a list of nodes for display. Views provides much more control over flitering and sorting of lists of nodes than can index aliases. I'm trying to imagine a circumstance in which I would choose index aliases over Views Module and I cannot. It might be useful to be able to see a subset of a list of nodes based on the path, for example to see all events that occurred in November 2005. However, a search can provide that functinality. My two cents... index aliases are obsolete.

jo1ene’s picture

Just FYI, I got a similar error series when I made a typo in the filers area and it bulk generated a bunch of bizzare paths. Deleting the unindended paths (and fixing the typo) solved the problem.

pcwick’s picture

Thanks Jolene. What do you mean by "filers area"?

greggles’s picture

pcwick, I think that jolene meant to say "filters area".

So, does anyone have a good use of the index aliases?

greggles’s picture

Status: Active » Closed (fixed)

also, FYI I plan on removing the index alias functionality. The argument for doing so is here: http://drupal.org/node/91105

Please provide your feedback on the idea in that issue if you'd like.