I enabled a module that reveals the followng default email type at ...

Home » administer » store » settings

-> mail

* list of mails (tab)
name type op
Default email confirmation Email address confirmation -> View

When i click op View (http://www.mydomain.com/admin/store/settings/ec_mail/7/view) i get...

Fatal error: Call to undefined function: token_values() in
/modules/ecommerce/contrib/ec_useracc/ec_useracc.module on line 601

I see that the token function is now token_get_values() however, if i simply make that call change i then observe...

Warning: Cannot use a scalar value as an array in
/modules/ecommerce/contrib/ec_useracc/ec_useracc.module on line 606

Warning: Cannot use a scalar value as an array in
/modules/ecommerce/contrib/ec_useracc/ec_useracc.module on line 607

So i have commented out the line for now.

Can anyone shed some light on what this is supposed to be, this bug is still apparent in the 5.x versions too.

Thanks in advance

Comments

p_palmer’s picture

this works ...

suggested change of line 601:

old ...
$values = token_values('user', $account);

new...
$values = array( token_get_values('user', $account) );

p_palmer’s picture

also related...

line 579 reads..
$tokens = token_list('user');

and should be...
$tokens = user_token_list('user');

go to Home » administer » store » settings » mail
then mail tokens
then Email address confirmation to reproduce the bug.

there is still some issues even after doing this, but this is a start for you :)

p_palmer’s picture

Title: Call to undefined function: token_values() in /ec_useracc.module on line 601 » State of issues in Groups.drupal
Version: 4.7.x-3.0-beta4 » master
Component: ec_useracc » -- other --

In groups you have a neat table showing the number of current issues reported for each module etc, i just added a new issue under ec_useracc and yet the counter on this page still shows 0 issues. If you go into the link for the section, however, my report is there. Therefore DONT trust the counters is they say there are 0 issues (of course those values could be by cron some time later which may explain why i saw what i saw)

p_palmer’s picture

Title: State of issues in Groups.drupal » Call to undefined function: token_values() in /ec_useracc.module on line 601
Version: master » 4.7.x-3.0-beta4
Component: -- other -- » ec_useracc

oops! changed title when tryin to creat a new issue bah!

sime’s picture

Status: Active » Closed (works as designed)

Hi

That page is a new one I've added recently. At the moment it is manual - you can see near the top of the page is an indication of when it was updated.

The maintainers see all issues come through the queue, so it's not important that that page is exactly right.

Cheers for the feedback about it.
.s

p_palmer’s picture

curiosity leads me to ask what does "by design", my first post is still true, WITH token installed

djflux’s picture

Version: 4.7.x-3.0-beta4 » 5.x-3.x-dev
Status: Closed (works as designed) » Needs review
StatusFileSize
new792 bytes

I think the "by design" was referring to the page on groups. I doubt the "undefined function" is by design ;)

I've attached a patch that seems to fix the issue (I was having the same problem on 5.x-3.x-dev)

Regards,
Flux.

gordon’s picture

Status: Needs review » Needs work

This patch just takes away the token module from the mix, and gets rid of the additional functionality,

Something is wrong with your install of the token module.

djflux’s picture

The patch doesn't remove any functionality (unless I'm missing something). There are + signs immediately after the - signs in the patch file. I'm not removing the line just editing it.

Maybe I'm just ignorant of something. Could you explain how I'm removing the functionality?

Thanks,
Flux.

gordon’s picture

Instead of calling token values it is calling a few of the processes which token values call independently. Now no other module can add tokens to the emails.

djflux’s picture

Gotcha. What would be the proper way of resolving this issue? Just point me in the right direction and I should be able to figure it out.

Thanks again,
Flux.

djflux’s picture

Status: Needs work » Needs review
StatusFileSize
new782 bytes

OK, hopefully this new patch doesn't remove the tokens from the mix.

brmassa’s picture

Status: Needs review » Fixed

Guys,

fixed on eC4

regards,

massa

Anonymous’s picture

Status: Fixed » Closed (fixed)

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