Hi,
I'm using me aliases along with case tracker (http://drupal.org/project/casetracker). Casetracker, when adding a case, executes a view called casetracker_project_options using $view->execute();.
Now, when I have the me module installed, it's impossible for me to add a new case. Each time I try to access the page that contains the form to add a new case, I get redirected to the home page of my website. I looked further into the problem and it appears that, when $view->execute() is called by case tracker, it executes the me_views_pre_execute hook, which for some reason redirects to the home page using a drupal_goto. Commenting out the drupal_goto in the me_views_pre_execute function makes the page work.
As I do not understand exactly what that me_views_pre_execute function is for, I don't see how this bug could be fixed, but if someone could tell me more about the me_views_pre_execute function...
Thank you !
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | me-views_embed.patch | 1.95 KB | guillaumev |
Comments
Comment #1
guillaumev commentedSeems like the me_views_pre_execute is wrongly called with do_redirect = TRUE from the method validate_argument of the me_plugin_argument_validate_me_alias...
Comment #2
guillaumev commentedOk so more explanations concerning this issue:
- I have a menu which contains a link to user/me/store, which is a view with an argument User:UID and a Me validator with the option 'Redirect to the user's uid when me is entered as an argument' checked
- when entering node/add/task, drupal loads the store view (I guess in order to check if the user has access to the menu item), which triggers the validate_argument method and sets the $do_redirect to TRUE.
- finally, when casetracker tries to embed its views, the $do_redirect is already set to TRUE and the redirection takes place
Comment #3
guillaumev commentedI'm proposing the following patch to fix this problem...