[ec5.x-4.x-dev] Call to undefined function store_mail_types() in ec_mail.module on line 458

Phillip Mc - March 22, 2008 - 15:03
Project:e-Commerce
Version:5.x-4.x-dev
Component:store
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

Just reporting the following error when trying to install ecommerce-5.x-4.x-dev (march 20th version).

Call to undefined function store_mail_types() in /ec_mail.module on line 458

#1

Phillip Mc - March 24, 2008 - 09:36

Just updating this issue...the same problem exists in the march 24th version of 5.x-4.x-dev.

#2

Phillip Mc - March 25, 2008 - 15:05

Just updating this issue...the same problem exists in the march 25th version of 5.x-4.x-dev.

#3

Phillip Mc - March 26, 2008 - 13:03
Priority:normal» critical

just updating this issue and marking as critical...

the same problem exists in the march 26th version of 5.x-4.x-dev, but this time you can't get past the error..i.e. everytime you try and install any module (even non ec related modules), you get a white screen with the error about store_mail_types().

#4

Phillip Mc - March 26, 2008 - 14:33

By moving the following lines from store.manage.inc to store.module before installing will get you past theCall to undefined function store_mail_types() in ec_mail.module on line 458 error message.

My only guess is that the store.manage.inc file seems to be ignored for some reason during the install process.

You will find the following lines in the store.manage.inc file (starting about line number 695). You need to copy these to the store.module and then delete them from the store.manage.inc before installing the store.module.

function store_mail_types() {
  return array(
    ECMAIL_TYPE_CUSTOMER_INVOICE => t('Customer invoice'),
    ECMAIL_TYPE_PROCESSING_ERROR => t('Processing error notification'),
    ECMAIL_TYPE_CANCEL_TXN => t('Transaction cancelled notice'),
    ECMAIL_TYPE_ASK_CUSTOMER => t('Query to customer'),
  );
}

No idea if that impacts later...but, at least it gets you past the ecommerce installation process

#5

Phillip Mc - March 27, 2008 - 12:55
Component:ec_mail» store

Hi guys,

just flagging the same error with the march 27th download of 5.x-4.x-dev.

It's a showstopping error - you can't install 5.x-4.x-dev for testing because of it. unless users use the #4 workaround above.

changing the component to be for the store.module (not the ec_mail.module)

cheers

#6

Phillip Mc - March 27, 2008 - 13:01

attaching modified store.module and store.manage.inc files so you can get past the installation errors for the store.module

Note: I've no idea if this impacts on other elements of the ecommerce suite..but, at least it allows you to install for testing. just remove the .txt extension and replace the store.module and store.manage.inc file in your /ecommerce/store/ folder.

AttachmentSize
store.module.txt 42.16 KB
store.manage.inc_.txt 28.15 KB

#7

open-keywords - March 28, 2008 - 15:09

I used files provided in #6 and seems to work as far as I know

#8

Phillip Mc - March 28, 2008 - 15:54

hi open keywords

can u do me a favour and look to see if your account page has an edit / view tab? When i enable the store.module the edit/view tabs disappear.

thanks.

#9

svilen - March 31, 2008 - 17:45

PhilK

After using the patch my account tabs disappear.

#10

Phillip Mc - March 31, 2008 - 18:13

thanks svilen.

were you able to install the store.module without the patch?

#11

andrejusc - April 3, 2008 - 07:35

No, taking dev snapshot of March 31 I can't install Store. What do they think? From your thread it seems that it's not fixed for at least 3 weeks by now.

#12

andrejusc - April 3, 2008 - 07:55

Actually problem lies in fact that store.manage.inc is not loaded by any code.

What I believe is that somewhere you should have:

include_once drupal_get_path('module', 'store') .'/store.manage.inc';

#13

andrejusc - April 3, 2008 - 10:44

I think you could try this workaround instead. For ec_mail module have one line added:

function ec_mail_implementor_list($types = array(), $module = false) {
include_once drupal_get_path('module', 'store') .'/store.manage.inc';

at least for me it works then without any error/warning. But what I can't understand is to how deal with product attributes. Only via Subproduct? Why it's so user unfriendly?

#14

Phillip Mc - April 3, 2008 - 11:39

Thanks andre. good catch with the missing include line.

quick question. when you install the store.module after applying that patch...do you lose the VIEW/ EDIT tabs on your MY ACCOUNT page?

#15

Phillip Mc - April 3, 2008 - 13:55

answering my own question (#14) ...

yep. the View and Edit tabs for the my account page do disappear after installing the store.module regardless of which patch is used..i.e. #13 or #6.

#16

gbear - April 9, 2008 - 20:34

Thanks for the post - just confirming that #13 patch worked for me also to get through the install process.

#17

nicholasThompson - April 25, 2008 - 12:28

I've just found this - I posted my solution in #251150: Fatal error during instal in 'ec_mail_implementor_list', tries to call 'store_mail_types'

My solution was simply to wrap the offending foreach which called $function with a function_exists condition.

#18

Phillip Mc - April 25, 2008 - 12:37

thanks Nicholas...I think solution #13 above is the correct/better way to solve the problem.

Anyone know how to create a patch for this, to save the ecommerce developers some time?

#19

gordon - April 25, 2008 - 12:37
Status:active» fixed

This has been fixed now. See http://drupal.org/node/251150

#20

Anonymous (not verified) - May 9, 2008 - 12:41
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.