I was testing CDN on a bare-bones D7 install and got a WSOD every time I tried to visit the "Other"-tab on the CDN configuration pages.

PHP Fatal error:  Call to undefined function ctools_dependent_process() in includes/form.inc on line 1766

It seems that CDN currently expects ctools to be enabled:


  if (variable_get(CDN_MODE_VARIABLE, CDN_MODE_BASIC) == CDN_MODE_BASIC) {
    $form['https'][CDN_BASIC_MAPPING_HTTPS_VARIABLE] = array(
      '#type'          => 'textarea',
      '#title'         => t('CDN mapping for HTTPS'),
      '#description'   => t('If your CDN supports HTTPS, but requires you to
                            use different URLs, then you can define an
                            alternative CDN mapping here. This overrides the
                            "regular" CDN mapping completely, when using
                            HTTPS.'),
      '#size'          => 35,
      '#default_value' => variable_get(CDN_BASIC_MAPPING_HTTPS_VARIABLE, ''),
      '#process'       => array('ctools_dependent_process'),
      '#dependency'    => array('edit-cdn-https-support' => array('1')),
    );
  }

So it seems we should either set ctools as a dependency (patch attached), or replace the ctools_dependent_process()-functionality with standard Drupal-ajax.

CommentFileSizeAuthor
cdn-wsod-ctools.patch306 bytesmr.baileys

Comments

wim leers’s picture

Assigned: Unassigned » wim leers
Status: Needs review » Reviewed & tested by the community

Oh, no, that's something that must've been carried over accidentally! (This functionality was originally written for D6.) It probably doesn't fail on my set-up because I do have ctools. The #process callback should simply be removed.

wim leers’s picture

Worse, I apparently forgot to port it from ctools to Drupal 7's #states at all.

wim leers’s picture

Status: Reviewed & tested by the community » Closed (duplicate)