When I run casper.drupalVariableGet('cc_paywall_article_limit', 0);

I get 0.

When I run

variable_get('cc_paywall_article_limit', 0);

From devel/php I get 3.

Should I be logged in as the administrator for this to work?

Comments

glass.dimly’s picture

It is probably relevant to note that I'm on a Drupal 6 site. Possibly not supported/working in D6?

(It's a legacy site exhibiting strange behaviors. Hence, CasperJS testing.)

SwapS’s picture

Status: Active » Postponed

@glass.dimly module support is only for 7.x .
Would be good , if you can check/confirm if you are facing same behaviour on Drupal 7 site as well.

Cheers,
SwapS

David Hernández’s picture

Status: Postponed » Closed (works as designed)

As far as I know, drupalVariableGet doesn't actually get a drupal variable. Is a function to load variables from the system environment, the "drupal" part at the begining of the function name is to specify that is provided by the Drupal command: http://cgit.drupalcode.org/casperjs/tree/includes/common.js?h=7.x-1.x#n186

I was confused about this function name too. Maybe it should be renamed...