I'm getting a 406 error rather frequently now that I've patched the database schema. It occurs when I go to edit a template from the Site Building>Mail templates by clicking 'Add en'. If I reload the page, it will load properly. I'm happy to help with a patch, if you can direct me in some way.

Anyone else having this issue?

Comments

chiddicks’s picture

I'm getting the following error as well - not sure if it's related.

warning: Invalid argument supplied for foreach() in /home/csps/public_html/sites/all/modules/mail_edit/mail_edit.module on line 104.

litwol’s picture

hmm i am not sure what the problem may be.

however try to find this line

  drupal_alter($mailkey_obj->id, $tokens);    //allow other modules to alter tokens for specific mailkey id

and replace it with this
drupal_alter('token_'. $mailkey_obj->id, $tokens); //allow other modules to alter tokens for specific mailkey id

chiddicks’s picture

I'm not sure if this is related, but since enabling the mail_edit module, any user action (registration, account deletion, etc.) has resulted in an array (representing the form or user object or something) dumping to the drupal_set_message area after submission. I think it might have something to do with the !username variable.

After disabling the module, the problem stopped. I'll try experimenting with the above suggestion later tonight when no one is using the site.

Array
(
    [id] => user_status_deleted
    [to] => ckdjs@lskdjfalsk.com
    [from] => admin@xxxxxx.ca
    [language] => stdClass Object
        (
            [language] => en
            [name] => English
            [native] => English
            [direction] => 0
            [enabled] => 1
            [plurals] => 0
            [formula] => 
            [domain] => http://xxxxx.ca
            [prefix] => 
            [weight] => 0
            [javascript] => 
        )

    [params] => Array
        (
            [account] => stdClass Object
                (
                    [uid] => 27
                    [name] => lsakdjfalskj
                    [pass] => 2dec1a985f70dc97a6780864b6ed12d8
                    [mail] => ckdjs@lskdjfalsk.com
                    [mode] => 0
                    [sort] => 0
                    [threshold] => 0
                    [theme] => 
                    [signature] => 
                    [created] => 1215718943
                    [access] => 0
                    [login] => 0
                    [status] => 0
                    [timezone] => -14400
                    [language] => 
                    [picture] => 
                    [init] => ckdjs@lskdjfalsk.com
                    [data] => a:2:{s:3:"rid";a:1:{i:5;i:5;}s:13:"form_build_id";s:37:"form-028098aa42cc7850127ee9fb37b13c45";}
                    [timezone_id] => 0
                    [rid] => Array
                        (
                            [5] => 5
                        )

                    [form_build_id] => form-028098aa42cc7850127ee9fb37b13c45
                    [roles] => Array
                        (
                            [2] => authenticated user
                        )

                    [profile_usertype] => Member of the Public
                    [profile_name] => sdfasdf
                    [profile_tos] => 0
                    [profile_usehandle] => 0
                )

        )

    [subject] => Account details for lsakdjfalskj at xxxxxx.ca (deleted)
    [body] => Array
        (
            [0] => lsakdjfalskj,

Your account on xxxxxxx.ca has been deleted.

If you have any questions, please send an email to: admin@xxxxx.ca .
        )

    [headers] => Array
        (
            [MIME-Version] => 1.0
            [Content-Type] => text/plain; charset=UTF-8; format=flowed; delsp=yes
            [Content-Transfer-Encoding] => 8Bit
            [X-Mailer] => Drupal
            [Errors-To] => admin@xxxxxx.ca
            [Return-Path] => If you have any questions, please send an email to: admin@xxxxxx.ca .
        )

    [headers] => Array
        (
            [MIME-Version] => 1.0
            [Content-Type] => text/plain; charset=UTF-8; format=flowed; delsp=yes
            [Content-Transfer-Encoding] => 8Bit
            [X-Mailer] => Drupal
            [Errors-To] => admin@xxxxxx.ca
            [Return-Path] => admin@xxxxxx.ca
            [Sender] => admin@xxxxxx.ca
            [Reply-To] => admin@xxxxxx.ca
            [From] => admin@xxxxxx.ca
        )

)

            [Sender] => admin@xxxxxx.ca
            [Reply-To] => admin@xxxxxx.ca
            [From] => admin@xxxxxx.ca
        )

)

litwol’s picture

@chiddicks: Thanks for pointing out. i forgot to disable some of my debugging information. now it will be gone. to get rid of it right away. remove this line from the very end of the file
delete this > > drupal_set_message('<pre>' . print_r($mail, 1) . '</pre>'); located 3 lines before the end of file

litwol’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

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