When using the "Set as anonymous front page" or "Set as authenticated front page" from the drop down in the admin content section, I get this error:
Notice: Undefined offset: 0 in frontpage_set() (line 307 of /var/www/htlongstay.jp/htdocs/sites/all/modules/frontpage/frontpage.module).
Notice: Trying to get property of non-object in frontpage_set() (line 313 of /var/www/htlongstay.jp/htdocs/sites/all/modules/frontpage/frontpage.module).
It seems to be that $node is not being correctly passed to this function. It would seem like quite a basic problem, so maybe something with my set up is causing this.
It's a fresh install of drupal 7. The only 3rd party modules I installed is this and it's requirements and the Locale updater.
| Comment | File | Size | Author |
|---|---|---|---|
| #20 | frontpage_set_fix-1023948-20.patch | 833 bytes | aaronott |
| #8 | Screen shot 2011-02-06 at 2.21.30 PM.png | 23.29 KB | DrupalMage |
| #8 | Screen shot 2011-02-06 at 2.22.09 PM.png | 38.43 KB | DrupalMage |
| #8 | Screen shot 2011-02-06 at 2.22.40 PM.png | 58.71 KB | DrupalMage |
| #8 | Screen shot 2011-02-06 at 2.22.54 PM.png | 104.53 KB | DrupalMage |
Comments
Comment #1
Anonymous (not verified) commentedI could not reproduce this issue on my test site.
I noticed, anyway, that the last update function was
frontpage_update_6105(), and that a menu callback was wrongly set for a menu. I fixed both these issues.Comment #2
Anonymous (not verified) commentedI created a new official release of the module. I suggest you to update to the latest available version of Variables API.
Comment #3
Anonymous (not verified) commentedI am sorry; I didn't read well what the issue was.
The problem is when the
frontpage_set()function is used as node operation. The code tries to access$node[0](where$nodeis the first argument passed to a node operation), but it seems that the index 0 doesn't exist. Probably the array passed to the function uses the node ID as index; I will check this.Comment #4
Anonymous (not verified) commentedComment #5
Anonymous (not verified) commentedI have fixed the code, and committed it to the development snapshot. I will create a new official release the next week.
Thank you for your report.
Comment #6
Anonymous (not verified) commentedFor who was using the development snapshot, these are the patch to apply for the changed files: frontpage.install, frontpage.module.
Comment #7
Anonymous (not verified) commentedI have marked #1042624: Compatibility with Domain Access module -- doesn't work w/ alpha3 as duplicate of this report.
Comment #8
DrupalMage commentedHello
I have basically the same error as above. I installed Variable API 7.x-2.0-alpha4 and then Frontpage 7.x-1.0-alpha3. Since I am new, I am sure I did something wrong.
I have attached four section shots and I have attached them to this email. I hope it helps.
Jesse
Comment #10
Anonymous (not verified) commentedComment #11
mkmagu commentedI'm getting the same problem on this module getting this error when trying to assign an authorized user front page
Notice: Undefined offset: 0 in frontpage_set() (line 405 of /home/marem07e/public_html/candle4b.com/sites/all/modules/frontpage/frontpage.module).
Notice: Trying to get property of non-object in frontpage_set() (line 407 of /home/marem07e/public_html/candle4b.com/sites/all/modules/frontpage/frontpage.module).
Comment #12
robciu commentedI'm getting the same messages too:
Notice: Undefined offset: 0 in frontpage_set() (line 405 of F:/www/fcpoppel1/sites/all/modules/frontpage/frontpage.module).
Notice: Trying to get property of non-object in frontpage_set() (line 407 of F:/www/fcpoppel1/sites/all/modules/frontpage/frontpage.module).
Furthermore, I don't get the 2 links at the end of the node body.
Comment #13
ziemendorf commentedI'm getting the same error.
Any action on this?
Comment #14
halefxSame error:
Comment #15
hollyh commentedsame
Comment #16
jessico commentedSame:
Notice: Undefined offset: 0 in frontpage_set() (line 405 of /sites/all/modules/frontpage/frontpage.module).
Notice: Trying to get property of non-object in frontpage_set() (line 407 of /sites/all/modules/frontpage/frontpage.module).
Frontpage - version = "7.x-1.0-alpha3"
Vars - version = "7.x-2.0-alpha10"
Comment #17
Anonymous (not verified) commentedSame +
Fatal error: Class 'FrontpageVars' not found in /home/kennis/domains/dekenniskompenie.nl/public_html/sites/all/modules/frontpage/frontpage.install on line 42
when deinstalling
Comment #18
mintuz commentedsame issue
Comment #19
Anonymous (not verified) commentedSame issue here..
Notice: Undefined offset: 0 in frontpage_set() (line 405 of /home2/queueonc/public_html/sites/all/modules/frontpage/frontpage.module).
Notice: Trying to get property of non-object in frontpage_set() (line 407 of /home2/queueonc/public_html/sites/all/modules/frontpage/frontpage.module).
Is this something I can correct manually?
Many Thanks for your advice.
JM
Comment #20
aaronott commentedLooks like the function is expecting $node to be either a node object or an array of node objects. When I tried it, I found that it's actually getting an array of nids so with that, created this patch for this issue.