There's an option to use PHP code in preparing the Arguments for the weight field, there's no explanation for this field.

In any other module I've seen, whenever there's a PHP code field, there's help text to indicate the following:

  1. what, if any, variables are available
  2. if <?php and ?> should be used
  3. what, if anything, should be returned

It would be great to see this under the PHP code field. I have no idea what I'm supposed to do with this field.

Worse yet, is that if I guess, and put something incorrect into that field, the field handler is broken beyond repair. (Ajax errors prevent editing and fixing of the field setting)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nagy.balint’s picture

I've just ran into this issue today.

Please include a help text there.

ygerasimov’s picture

I can see following help text under php field:

Enter the php code to prepare the arguments. Do not enter <?php ?> tags. The following variables are available - $view (the view), $arguments (existing arguments - manipulate these to alter the arguments used to sort).

Please advise how to change it so it is more understandable. Also see README.txt for more documentation.

iStryker’s picture

Added "See README.txt for more details" and updated README.txt file. README.txt include additional updates in this patch.

Committed 9513d79

Comment and/or reopen if not satisfied.

Status: Fixed » Closed (fixed)

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

Chris Gillis’s picture

Category: Support request » Task
Priority: Normal » Minor
Issue summary: View changes
Status: Closed (fixed) » Active

An example would be helpful. Would be good to let the user know they are supposed to end with return $arguments;.

iStryker’s picture

Message to add with or without patch is welcomed.

Chris Gillis’s picture

iStryker’s picture

Thanks, updated the patch. I did not change any wording, just moved stuff around to be easier to read.

iStryker’s picture

Status: Active » Fixed

Committed.

  • iStryker committed 7948010 on 7.x-2.x authored by Chris Gillis
    Issue #1878164 by iStryker, Chris Gillis: Prepare arguments with PHP...

Status: Fixed » Closed (fixed)

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