I'm guessing that token changed how it worked since this was last worked on. I get a PDO Exception when attempting to access "admin/store/products/power-tools/[my-product-name]";

In uc_product_power_tools.admin.inc, around line 202, I changed the following:

    $form['power_tools']['autosku']['token_help']['help'] = array(
      '#markup' => theme('token_tree', array('token_types' => 'all', 'click_insert' => FALSE, 'show_restricted' => TRUE)),
    );

to this:

    $form['power_tools']['autosku']['token_help']['help'] = array(
      '#theme' => 'token_tree',
      '#token_types' => array('all'),
    );

.. and everything seemed to work fine.

Comments

dave reid’s picture

Side note that I would highly recommend *not* using #token_types => array('all') when in fact this module is only performing token replacement using a node. This should be '#token_types' => array('node'),.

stefan.r’s picture

Issue summary: View changes
Status: Active » Fixed

  • stefan.r committed 9590533 on 7.x-1.x
    Issue #1568074 by Coyote: PDO Exception on settings page - due to method...

Status: Fixed » Closed (fixed)

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