Breaks views when me argument handling is not enabled.

John Money - April 9, 2009 - 16:12
Project:me aliases
Version:6.x-2.2
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Appears to break views php code validator for user name arguments. The php code never appears to run.

Test case:

  • create a view with a user name argument
  • select the php code validator
  • enter the following code:

    drupal_set_message('php validator executed');
    return TRUE;

  • load the view with a username argument (example: test/some_user_name)
  • you should see the message displayed... if not, its borked

Commenting out me_views_api() fixes the issue.

#1

cdale - April 10, 2009 - 01:38
Status:active» postponed (maintainer needs more info)

I am not able to replicate this problem. I followed each of the steps you laid out above, and I see the message just fine. Could it potentially be a clash with another module?

I'm about to release an update which adds the patch in #422042: Add views 'me' argument redirection for uid and name argument handlers., so download 2.2 later today, and see if that fixes the problem for you. (Though I'm not sure how it would, as it only adds new features). If the problem is still there, then we might need to dig a little deeper.

What version of views are you using?

#2

John Money - April 10, 2009 - 05:36

Me 2.1, tested with both Views 2.3 and 2.4 (which I upgraded today).

Edit: upgraded to Me 2.2 and problem persists. Confirmed to be issue with me alias, disabling the module entirely and the problem goes away.

Screenshots of View config

http://vvcap.net/db/vKFaKEw9xxCOqI6xCAEd.htm
http://vvcap.net/db/GzJ4bwLR2Q_fbgefXR-I.htm

I am positive the function os_blog_view_arg_handler() never runs, (e.g. putting stop there, drupal_set_message, whatever). As I suggested, changing that code to something that just displays a message and returns TRUE also never runs.

#3

cdale - April 10, 2009 - 06:56
Version:6.x-2.1» 6.x-2.2

Ok. I've finally been able to reproduce this by turning off the "Let users enter the 'me' alias instead of their user name." option. It seems when that is not selected, that the view breaks. I'll dig into that and see what I can find.

Thanks for the report.

#4

cdale - April 10, 2009 - 07:06
Title:Breaks views php argument validator» Breaks views when me argument handling is not enabled.
Status:postponed (maintainer needs more info)» fixed

Ok, so now that I've worked that out, I feel quite stupid as it's such a trivial bug that should never have happened, but there you go. I've commited the attached patch, and have made a new release. Should be ready in about 10mins.

AttachmentSize
me-429080.patch 2.1 KB

#5

John Money - April 10, 2009 - 18:48

Appreciate you addressing this so quickly... me aliases is a great little module that improves usability.

Thanks. :)

#6

System Message - April 24, 2009 - 18:50
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.