Posted by Freso on June 10, 2008 at 12:26pm
3 followers
| Project: | Pathauto |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
I just went to play with #262774: Code (style) normalisation and "0", and was told this on "node/add/page":
notice: Undefined property: stdClass::$path in /srv/http/localhost/htdocs/drupal6/sites/all/modules/pathauto/pathauto.module on line 304.
I tried to unpatch the code, but the error was still there (actually, the 304 is the non-patched line number - 301 with the code style patch). I'm pretty certain it wasn't there a few days ago, but I haven't given it much time to look into what changes could have caused this.
Oh, then only non-default setting is the node path, which was set to "[title-raw]".
Comments
#1
I'm unable to reproduce this...which version of core are you using? I'm using a cvs checkout from just after 6.2 was released.
#2
Latest 6.x CVS of both core, Token, Pathauto, and everything else on that test install. (Only Pathauto and dependencies are/were enabled of non-default core modules though, IIRC.)
#3
Ok, now I've seen it! I'm not sure why this started showing up or if my fix is appropriate but at least it fixes the problem...
#4
#5
Well, the patch looks good, but I haven't tested it. I haven't even tested whether I'm still getting the error.
#6
I can't seem to get that error. pathauto, token are from CVS, Drupal is 6.2.
#7
If you use Drupal6.2 then you won't see the error because notices are turned off.
Take a look at includes/common.inc and at this diff to see what needs to be changed in order to see the notices.
#8
Ah hah! Confirm bug. Applied patch. Bug gone. Bug-B-Gone!
coder.module is also happy, except for a camelcase issue in tests/pathauto.test which I'll file a patch against.
#9
#10
@steamedpenguin - did you run this through other tests? That code is related to editing a node with an existing alias and (I think) previewing it. Can you confirm that it doesn't break that?
Thanks for your help with this.
#11
I follow Freso's example and ran a plain node/add/page and got that error as advertised, after removing E_NOTICE.
Is there another method of accessing the error that I missed?
#12
@steamedpenguin: I think what Greg wants you to do, is to make sure that making this error go away doesn't introduce other errors. :)
#13
To test further:
1 - Created page => was assigned alias of content/lorem-ipsum
2 - Reassigned pages to get pattern of page/[title-raw]
3 - Deleted old alias
4 - Regenerated alias => new alias is page/lorem-ipsum
No issue to report.
Are there other ways I should test this?
#14
In addition to steamedpenguin's testing, I also did a test of this myself, and Pathauto still remembered whether the "automatic alias" was ticked or not and generally worked as it should. The SimpleTest also runs perfectly with the patch. So I committed it.
Steamedpenguin, thank you for testing! It definitely made it easier to commit this! :)
#15
For patch testers (like me) it makes it easier to report back when we know what it is you are looking for. :)
#16
Automatically closed -- issue fixed for two weeks with no activity.