Hi,
I am encountering the below error when creating a view that has a menu local tab. The view is on the path of user/%/backing. I am using the latest views 3 dev.
warning: Missing argument 2 for views_arg_load(), called in /Users/reecemarsland/Sites/sponsume/includes/menu.inc on line 410 and defined in /Users/reecemarsland/Sites/sponsume/sites/all/modules/base/views/views.module on line 342.
warning: Missing argument 3 for views_arg_load(), called in /Users/reecemarsland/Sites/sponsume/includes/menu.inc on line 410 and defined in /Users/reecemarsland/Sites/sponsume/sites/all/modules/base/views/views.module on line 342.
warning: Missing argument 4 for views_arg_load(), called in /Users/reecemarsland/Sites/sponsume/includes/menu.inc on line 410 and defined in /Users/reecemarsland/Sites/sponsume/sites/all/modules/base/views/views.module on line 342.
The above error appears to be linked to this #796910: Missing argument 2,3,4 for views_arg_load.
Thanks
Reece
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | tabtamer-views-arg-error.patch | 1 KB | reecemarsland |
Comments
Comment #1
reecemarsland commentedTo add to above: The error only occurs when I create a view that uses the argument of "Ubercart order: Order User ID: The {user}.uid of the customer that placed the order." which is available via the uc_views module. At this point I'm not sure if this is an error with the way uc_views is loading the %view_arg or the tab tamer module. If I turn the tab tamer module off this error doesn't occur and the view loads as expected.
Thanks
Reece
Comment #2
reecemarsland commentedOK, I've found the source of the error.
My existing view was showing up in the menu router as views/%view_arg/backers but I then edited this and changed the argument settings, AFTER I had set the settings in tab tamer to change it's weight etc. After editing the argument on the view the menu router entry effectively changed to views/%/backers which was then different to the item stored by tab tamer in the variable array 'tabtamer_tab_settings'. When tab tamer iterates over these items it was then creating an entry for the old menu item with just a weight (or whatever settings I had set for the tab in the tab tamer admin). My menu router items then looked something like:
views/%/backers = array(
weight => 10
title => My backers
type => 128
access callback
etc
);
views/%view_arg/backers = array(
weight => 50
)
This was effectively overwriting my original menu router entry. The way to get around this problem is to go back and re-save your settings in the tab tamer UI as, effectively, the menu router path has changed but tab tamer is still storing old records. To prevent the error from happening I've submitted a patch which checks if the menu router item exists before it attempts to add it's own settings. Maybe it should give a drupal_set_message if it attempts to add settings but doesn't find a match in the menu router items array? This way you could prompt the user to re-save their settings in the tabtamer UI.
Thanks
Reece
Comment #3
coreyp_1 commentedThanks for tracking this down! I've included it in the 1.1 release.