notice: Undefined property: stdClass::$path

Freso - June 10, 2008 - 12:26
Project:Pathauto
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

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]".

#1

greggles - June 10, 2008 - 17:09

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

Freso - June 10, 2008 - 18:59

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

greggles - June 19, 2008 - 19:24

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...

AttachmentSize
268875_pathauto_notice.patch 992 bytes

#4

greggles - June 19, 2008 - 19:24
Status:active» needs review

#5

Freso - June 19, 2008 - 21:49

Well, the patch looks good, but I haven't tested it. I haven't even tested whether I'm still getting the error.

#6

samirnassar - June 19, 2008 - 23:08

I can't seem to get that error. pathauto, token are from CVS, Drupal is 6.2.

#7

greggles - June 19, 2008 - 23:17

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

samirnassar - June 19, 2008 - 23:29

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

samirnassar - June 19, 2008 - 23:30
Status:needs review» reviewed & tested by the community

#10

greggles - June 19, 2008 - 23:37

@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

samirnassar - June 19, 2008 - 23:40

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

Freso - June 19, 2008 - 23:44

@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

samirnassar - June 19, 2008 - 23:52

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

Freso - June 20, 2008 - 01:00
Status:reviewed & tested by the community» fixed

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

samirnassar - June 20, 2008 - 02:25

For patch testers (like me) it makes it easier to report back when we know what it is you are looking for. :)

#16

Anonymous (not verified) - July 4, 2008 - 02:32
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.