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.
After a fresh install of both drupal and ubercart attempting to reach the checkout settings page results in a fatal error with token module installed:
Fatal error: Call to undefined function Drupal\uc_cart\Form\theme() in /path/to/web/modules/ubercart/uc_cart/src/Form/CheckoutSettingsForm.php on line 261
if (\Drupal::moduleHandler()->moduleExists('token')) {
$form['completion_messages']['token_tree'] = array(
'#markup' => theme('token_tree', array('token_types' => array('uc_order', 'site', 'store'))),
);
Issue seemed to cease to exist after uninstalling token.
if this is a token issue I apologize.
Comment | File | Size | Author |
---|---|---|---|
#3 | token-tree.patch | 638 bytes | TR |
|
Comments
Comment #2
TR CreditAttribution: TR commentedYes, this is a problem in uc_cart/src/Form/CheckoutSettingsForm.php, where we display the list of available tokens if the Token module is enabled. Core Drupal has a lot of the Token functionality, but doesn't have a function to print this list, which is why we do it only when Token is enabled.
It looks like that line of code never got ported to D8. We should be able to fix this quickly...
Comment #3
TR CreditAttribution: TR commentedTry this:
Comment #4
TR CreditAttribution: TR commentedCommitted.
Comment #6
sushichris CreditAttribution: sushichris commentedAwesome! its working fine, thanks!