Closed (fixed)
Project:
Menu Views
Version:
7.x-2.0-rc2
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
29 Oct 2012 at 16:59 UTC
Updated:
9 Dec 2012 at 15:50 UTC
Jump to comment: Most recent file
Notice: Undefined property: stdClass::$nid in _menu_views_form_alter() (line 216 of /.../sites/all/modules/menu_views/menu_views.admin.inc).
I get that message every time I start to create new content (add -> basic page f.ex). Although everything seems to work.
System - D7.16 & modules up to date. No specific menu modules, worth to mention maybe Zeropoint drop-down menu.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | 1826206-menu_views-node_fixes-8.patch | 8.08 KB | markhalliwell |
| #6 | new_node_id_check-1826206-6.patch | 642 bytes | robmc |
Comments
Comment #1
markhalliwellThis is probably because it's a new node and there isn't a node ID yet.
Comment #2
veskimees commentedWell... is there something I can do? Administrators can survive that box with alarming red cross, but average users... ;-)
Comment #3
motomc commentedI have the same notice, have you fixed it?
Comment #4
markhalliwellI haven't had the time yet and it's really just an annoying notice. If these are actual production sites, you should probably lower your displayed error log level to "None" (in /admin/config/development/logging).
You will still get watchdog entries.
Comment #5
markhalliwellComment #6
robmc commentedI ran into a problem with not being able to create webform content as a result of this issue. Here is a patch that seemed to fix the problem.
Hope this helps.
Cheers,
Rob
Comment #7
markhalliwellYes, this will silence the notice. It does not, however, solve the underlying issue that I've discovered: menu items not getting saved on a new node. Not entirely sure whether it is just when it's a view or if it's a menu item as well. Working on it right now, revised patch to come soon.
Comment #8
robmc commentedThanks Mark! I didn't go in depth on the issue as just clearing the message solved my current problem.
Cheers,
Rob
Comment #9
markhalliwellHere is a patch that fixes both issues mentioned above. I also went ahead and committed it to the latest dev branch, would like some feedback from people before marking this as fixed (particularly in creating new nodes with menu view items).
http://drupalcode.org/project/menu_views.git/commit/b2768d0
Comment #10
robmc commentedHi Mark,
Looks great so far, I have been running it all day with no problems. I have a big import of nodes in the next few days that will exercise this code. I'll report if I have any issues.
Best Regards,
Rob
Comment #11
markhalliwellAwesome, glad to hear! Marking as RTBC, will mark this as fixed and probably release 7.x-2.0-rc3 soon after if you don't find any issues.
Comment #12
robmc commentedHi Mark,
I imported a few hundred nodes that directly impacted your code and everything has worked as expected and I haven't encountered any issues.
Cheers,
Rob
Comment #13
markhalliwellAwesome! Thanks Rob.
Comment #14
ahimsauziNicely done Mark! Thank you!
Comment #15
veskimees commentedTNX, seems to work.