Error message when you add or edit a ms_product_kit

Location .../admin/structure/ms_products/list/test67/edit
Referrer .../admin/structure/ms_products/ms_product_kit
Message Theme hook token_help not found.

Comments

vlooivlerke created an issue. See original summary.

Farreres’s picture

what is ms_product_kit used for?

vlooivlerke’s picture

iF ms_product_kit is installed you can:

Create a set of ms_products entities.
They can do various things from just a simple product, to recurring and even trail periods.
You can also add plan options like a tickbox to add extra $50 to the total
You can then add a ms_product_reference field to any content type.
When you create a node with a ms_product_reference field you can select to reference any of your ms_products entities.

from moneyscript website

Product Kit
With the new Product Kit, you can create your own generic products. Set them up as Recurring or Non-Recurring, and specify optional Trial Periods. Use Rules integration to take any actions necessary once a user purchases the product. Using this module, it is possible to sell ANYTHING on your site, not just Memberships or Files.

Farreres’s picture

Aha, so it's a generic product module supporting more than memberships or files. Never used it. Well, it is in the issue queue, will look at it.

Farreres’s picture

Regarding this token_help issue I have found this post https://www.drupal.org/node/1325136 where we can read "The D7 token module provides a token tree UI, and no longer supports the token_help theme item". Upon more investigation I arrived to this page https://www.drupal.org/documentation/modules/token/update/6/7 showing differences between d6 and d7 regarding token.

In particular there is one place within moneysuite where the d6 method is being used. In file ms_check.module line 158 we can find

'#value' => theme('token_help', array('ms_core_order', 'user'))

and according to the new token in d7 it should be

'#value' => theme('token_tree', array('token_types' => array('ms_core_order', 'user')));

or

'#value' => $form['tokens'] = array(
'#theme' => 'token_tree',
'#token_types' => array('ms_core_order', 'user'),
);

It is very strange that you found this error. Is it maybe that you were using check payment method?

Could you please test that this correction is solving the problem and it can be uploaded into dev?

vlooivlerke’s picture

Status: Active » Reviewed & tested by the community

Hi thanks it works.

With your help here is how it looks.

  $form['recurring']['ms_check_payment_overdue_mail_token_help']['help'] = array(
-   '#value' => theme('token_help', array('ms_core_order', 'user')),
  );

to

  $form['recurring']['ms_check_payment_overdue_mail_token_help']['help'] = array(
+    '#value' => theme('token_tree', array('token_types' => array('ms_core_order', 'user'))),
  );

This also fix an issue I had with the affiliate autocomplete field in the user profile edit page that did not show before.

thanks

Farreres’s picture

Ok, then I am going to apply this to dev right away.

Farreres’s picture

Please test the new dev and if the problem is solved mark it as closed.