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.

CommentFileSizeAuthor
#4 me-429080.patch2.1 KBcdale
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cdale’s picture

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?

john.money’s picture

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.

cdale’s picture

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.

cdale’s picture

Title: Breaks views php argument validator » Breaks views when me argument handling is not enabled.
Status: Postponed (maintainer needs more info) » Fixed
FileSize
2.1 KB

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.

john.money’s picture

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

Thanks. :)

Status: Fixed » Closed (fixed)

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