Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
glass.dimly CreditAttribution: glass.dimly commentedIt 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.)
Comment #2
SwapS CreditAttribution: SwapS commented@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
Comment #3
David Hernández CreditAttribution: David Hernández as a volunteer commentedAs 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...