Closed (duplicate)
Project:
Pathauto
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
21 Dec 2005 at 03:26 UTC
Updated:
15 Sep 2006 at 00:41 UTC
Jump to comment: Most recent file
Well, what actually happens is that when I put [cat]/[eventdd]/[eventmon]/[eventyyyy]/[title] as the pattern in node path settings (category path settings is simply [cat]) for a flexinode event type, it generates aliases where the year and date are always 31st Dec 1969, even though the correct date and time are set in the node.
When I open the same node from administer>>content>>edit and simply save it it again, it generates the correct alias. Killes confirmed that he does not use pathauto (;-)) and that the event module does not implement the pathauto api.
Is this an event module or pathauto bug?
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | pathauto_node.inc_6.patch | 204 bytes | mikemccaffrey |
Comments
Comment #1
drewish commentedI've had the same problem. I think the path is getting set before the date values are being set/saved.
Comment #2
mikeryanI can't reproduce this issue with the current 4.6 version of pathauto, and event.module revision 1.122.2.19, the alias is correct on node creation. What version of the event module are you using?
Comment #3
(not verified) commentedI found that bug also.. it is not related to event-module(s) anyhow. I don't have those installed and I can reproduce the bug:
1. create new user, let's call it xxx.
2. xxx has role: 'authenticated user'
3. give that role permission to create stories and edit own stories (and 'create url aliases' but I'm not sure this will affect..).
4. log in with new user xxx.
5. create content -> story
6. fill in the title and the body and submit.
7. It will say something 'Created new alias news/2006/testnews for node/60'.
8. now edit the created story and press submit.
-> message will say something: 'news/1970/testnews for node/60, replacing news/2006/testnews'
my pathalias configs:
Update action: Create a new alias, replacing the old one.
Default path pattern: this is empty.
Pattern for all story paths: [catpath]/[yyyy]/[title]
nasty workaround:
give the role 'authenticated user' permission to administer nodes -> the dates and times in pathalias will be correctly created next time you press submit.
Ask if you need more info or my configs..
Comment #4
venkat-rk commentedKimpsu,
Mikeryan no longer maintains pathauto. Kbahey agreed to take on some minimal responsibility for keeping the module going (mainly, upgrading to 4.7), so I don't know if this bug will ever be fixed. But, thanks for sharing this. At least I know it was not due to some fault of mine.
Ramdak
Comment #5
buddaMikeryan no longer maintaining! argh no.
This bug is happening for me too, using the latest CVS version of pathauto with Drupal 4.7
Comment #6
ericatkins commentedCan confirm that this bug also happens for me.
Dec 31, 1969.
Yuck.
Comment #7
mikemccaffreyThis is an error due to some shoddy coding in pathauto_node.inc, and occurs only when you bulk update the node aliases. Instead of loading the nodes properly, it is just running a database query on the node table, which does not include event and other module information.
To fix the problem, find the node_pathauto_bulkupdate() function, and add the following lines right after the
while ($node) { line:
Then the node will contain all the node data from other modules, including the event feilds.
Comment #8
greggles@mcaffry - any chance you can provide a patch?
http://drupal.org/diffandpatch
Comment #9
mikemccaffreyHere is a patch to make the bulkupdate function work with events and other node module data.
Comment #10
gregglesmarking as a dup of http://drupal.org/node/69789
Mccaffry, thanks for your effort on this. If it weren't for the order in which I attacked the issues then this one would be the one I'd be applying (more or less).
Comment #11
gregglesHeh - forgot to actually change the status.