Jump to content
thirty bees forum
  • 0

Uninstalled a Module then Site crashed


Question

Posted

I am running Thirty Bees 1.7. I uninstalled the module "Call for Price" because it wasn't sending emails anymore. After uninstalling the module the front site and admin area are now displaying a 500 error. Does anyone know what i can do to fix this? Maybe some entries were not removed from the database? I went in and deleted the hooks i found but that did not fix the issue. 

24 answers to this question

Recommended Posts

  • 0
Posted

Thank you for the reply! Datakick has fixed the issue. It seems the module didn't uninstall fully. It's completely uninstalled now. I have purchased and downloaded a new call for price module for prestashop version 1.6.1. https://addons.prestashop.com/en/price-management/18929-call-for-price-ask-price-for-products.html Will this work with my Thirty bees 1.70? I really need this functionality as the old one wouldn't send the email after submitting the request. Any advice would be greatly appreciated on what version would work best with Thirty Bees 1.70

  • 0
Posted

its hard to tell because I am not familiar with the module.

I recommend getting the latest available version of the module that suitable for prestashop v1.6.

if you are using PHP 8 and the module is compatiable with PHP 8 than you might get lucky.

test the module and if you get any errors post the error log and I am sure we will be able to help you fix it.

  • 0
Posted

@WayneB This module from Prestashop addons is not even worth 1 EUR. It only redirects from the product page to the contact form without sending any data about which product the customer is asking about.
Such a button in the product.tpl template can be made in 5 minutes for free.

  • 0
Posted

Yes you are right. I had another one installed that sent all the product info but it stopped sending emails after upgrading to Thirty Bees 1.7 and  php 8.2. This one: https://addons.prestashop.com/en/support-online-chat/8697-call-for-price-call-back-product-button.html

How am i able to get this module updated to work with Thirty Bees 7.0 on PHP 8.2? Is there anyone that i can pay to fix it? I have attached the module if someone can take a look? it worked very well before it stopped sending out the email. I can download all the versions if needed. This is the one for 1.6 attached.

callforprice.zip

  • 0
Posted

i just downloaded the latest version for prestashop 1.6 and attached it to this post. If there is anyone who can do the fixes if possible please let me know as i really need this to work.

v3.4.5-callforprice.zip

  • 0
Posted

I*f it helps oi am seeing this error after installing. The button doesn't show either uder the product i have set up.

 

Message:

Trying to access array offset on value of type bool

Location:

modules/callforprice/callforprice.php line 381

  • 0
Posted

Here is the error i get when trying to send the email from the product. I have the button showing and the form opening now but it says message not sent. The error log is showing the error below.

 

Message:

PHPMailer\PHPMailer\Exception: SMTP Error: data not accepted.

 

Location:

modules/tbphpmailer/vendor/phpmailer/phpmailer/src/PHPMailer.php line 2097

  • 0
Posted

are you able to send other email from your tb shop?

I just installed the module you posted here on my local bleeding edge version of tb 1.7 on PHP 8.3, setup the hooks for the product.tpl and the form submission works fine.

I did get an email and a valid confirmation message.

I just used the basic configuration of the module.

Use global settings for all products, = yes 

Send notification for = my email,  

Activate for all products = yes, 

Show "Call For Price" button = yes

  • 0
Posted

Thank you for the help.Yes I receive emails from the site and the contact form with no errors. All system emails are sending are working ok. Did you use v3.4.5 of the module I posted? That is what I have installed.  Is there a secure what to send you my login info for you to test?

  • 0
Posted

Yes, I've used v3.4.5 from your post here.

Did you try with the basic configuration?

can you try to add this code to `sendMessage` function at the beginning.

file_put_contents(
	__DIR__.'/../../log.txt',
	'template_vars => '.implode(PHP_EOL, $template_vars).PHP_EOL.'send_to => '.$send_to.PHP_EOL.'email => '.$email.PHP_EOL
);

the sendMessage function located at modules/callforprice/controllers/front/AjaxForm.php file at line 68. just add it before this line ```

$mail = Mail::Send(

so you will have something like this.

public function sendMessage($template_vars, $send_to, $email =  false){

file_put_contents(
    __DIR__.'/../../log.txt',
    'template_vars => '.implode(PHP_EOL, $template_vars).PHP_EOL.'send_to => '.$send_to.PHP_EOL.'email => '.$email.PHP_EOL
);

$mail = Mail::Send(

once you try to submit a new call for price form in product page you will see a new file called `log.txt` inside the module folder.

paste the content of the file here.

  • 0
Posted

I tried using the settings you suggested but it still won't send. I pasted the code in the file and here is the output from the log.txt file:

 

template_vars => <div style="width:100%;">
    <div id="templateMailTableWrapper" style="
                                            width: 633px;
                                            background-color: #FBFBFB;
                                            border: 1px solid #dadada;
                                            min-height: 520px;
                                            margin: 0 auto;
                                            -moz-box-shadow: 0 0px 15px #898A8E;
                                            -webkit-box-shadow: 0 0px 15px #898A8E;
                                            box-shadow: 0 0px 15px #898A8E;
                                        ">

        <div id="templateMailTableLogo" style="
                                                min-height: 100px;
                                                text-align: center;
                                          ">
            <a href="https://www.extractorking.com/" style="
                                                                min-height: 100px;
                                                                width: 100%
                                                            ">
                <img  src="{shop_logo}">
            </a>
        </div>
        <div style="
                    margin-top: 25px;
                    min-height: 45px;
                    text-align: center;
            ">
            <span class="title" style="
                                        font-weight:normal;
                                        font-size:22px;
                                        color: #000000;
                                        line-height:25px
                                ">
            Call For Price
            </span>
            <br/>
        </div>
        <div>
        <table id="templateMailTable" style="
                                            margin-top: 15px;
                                            margin-bottom: 20px;
                                            width: 590px;
                                            min-height: 240px;
                                            margin-left: 20px;
                                            border-radius: 7px;
                                            background-color: #fefdfd;
                                            border: 1px solid #b1b0af;
                                            border-collapse: collapse;
                                      ">
            <thead>
                <tr style="
                            border: 1px solid #b1b0af;
                            border-collapse: collapse;
                           ">
                    <th colspan="2" style="
                                            text-align: center;
                                            font-size: 17px;
                                            background-color: #f0f0f0;
                                            padding: 15px;
                                            height: 20px;
                                    ">
                        Report</th>
                </tr>
            </thead>
            <tbody>
                            <tr style="
                           border: 1px solid #b1b0af;
                           border-collapse: collapse;
                         ">
                    <td class="templateMailTable" style="
                                                            border: 1px solid #b1b0af;
                                                            border-collapse: collapse;
                                                            min-width: 150px;
                                                            font-size: 17px;
                                                            background-color: #fefdfd;
                                                            padding: 15px;
                                                            min-height: 20px;
                                                            word-break: break-all;
                                                ">
                        Product
                    </td>
                    <td class="templateMailTable" style="
                                                            border: 1px solid #b1b0af;
                                                            border-collapse: collapse;
                                                            min-width: 150px;
                                                            font-size: 17px;
                                                            background-color: #fefdfd;
                                                            padding: 15px;
                                                            min-height: 20px;
                                                            word-break: break-all;
                                                ">
                        <a href="https://www.extractorking.com/chillers-heaters/363-magnetic-stirrer-heater-12-220v.html">Magnetic Stirrer Heater 12&quot; 220v</a></td>
                </tr>
                                        <tr style="border: 1px solid #b1b0af;
                    border-collapse: collapse;">
                    <td class="templateMailTable" style="
                                                            border: 1px solid #b1b0af;
                                                            border-collapse: collapse;
                                                            min-width: 150px;
                                                            font-size: 17px;
                                                            background-color: #fefdfd;
                                                            padding: 15px;
                                                            min-height: 20px;
                                                            word-break: break-all;
                                                ">
                        Name
                    </td>
                    <td class="templateMailTable" style="
                                                            border: 1px solid #b1b0af;
                                                            border-collapse: collapse;
                                                            min-width: 150px;
                                                            font-size: 17px;
                                                            background-color: #fefdfd;
                                                            padding: 15px;
                                                            min-height: 20px;
                                                            word-break: break-all;
                                                    ">
                        Wayne Burkart
                    </td>
                </tr>
                                        <tr style="border: 1px solid #b1b0af;
                    border-collapse: collapse;">
                    <td class="templateMailTable" style="
                                                            border: 1px solid #b1b0af;
                                                            border-collapse: collapse;
                                                            min-width: 150px;
                                                            font-size: 17px;
                                                            background-color: #fefdfd;
                                                            padding: 15px;
                                                            min-height: 20px;
                                                            word-break: break-all;
                                                ">
                        Phone number
                    </td>
                    <td class="templateMailTable" style="
                                                            border: 1px solid #b1b0af;
                                                            border-collapse: collapse;
                                                            min-width: 150px;
                                                            font-size: 17px;
                                                            background-color: #fefdfd;
                                                            padding: 15px;
                                                            min-height: 20px;
                                                            word-break: break-all;
                                                ">
                        8886095464
                    </td>
                </tr>
                                        <tr style="border: 1px solid #b1b0af;
                    border-collapse: collapse;">
                    <td class="templateMailTable" style="
                                                            border: 1px solid #b1b0af;
                                                            border-collapse: collapse;
                                                            min-width: 150px;
                                                            font-size: 17px;
                                                            background-color: #fefdfd;
                                                            padding: 15px;
                                                            min-height: 20px;
                                                            word-break: break-all;
                                                ">
                        E-mail
                    </td>
                    <td class="templateMailTable" style="
                                                            border: 1px solid #b1b0af;
                                                            border-collapse: collapse;
                                                            min-width: 150px;
                                                            font-size: 17px;
                                                            background-color: #fefdfd;
                                                            padding: 15px;
                                                            min-height: 20px;
                                                            word-break: break-all;
                                                ">
                        [email protected]
                    </td>
                </tr>
                                                    <tr style="border: 1px solid #b1b0af;
                    border-collapse: collapse;">
                    <td class="templateMailTable" style="
                                                            border: 1px solid #b1b0af;
                                                            border-collapse: collapse;
                                                            min-width: 150px;
                                                            font-size: 17px;
                                                            background-color: #fefdfd;
                                                            padding: 15px;
                                                            min-height: 20px;
                                                            word-break: break-all;
                                                ">
                        Message
                    </td>
                    <td class="templateMailTable" style="
                                                            border: 1px solid #b1b0af;
                                                            border-collapse: collapse;
                                                            min-width: 150px;
                                                            font-size: 17px;
                                                            background-color: #fefdfd;
                                                            padding: 15px;
                                                            min-height: 20px;
                                                            word-break: break-all;
                                                ">
                        Call me if this is working
                    </td>
                </tr>
                        </tbody>
        </table>
    </div>
</div>
send_to => [email protected]
email => [email protected]
 

  • 0
Posted

Here is the stack trace from the error log inThirty Bees admin if it helps:

 

#0  modules/tbphpmailer/vendor/phpmailer/phpmailer/src/PHPMailer.php(2097)
#1  modules/tbphpmailer/vendor/phpmailer/phpmailer/src/PHPMailer.php(1689): PHPMailer\PHPMailer\PHPMailer->smtpSend(string(560): "Date: Fri, 14 Mar 2025 00:39:28 -0700\r\nTo: [email protected]\r\nFrom: "E"..., string(68094): "--b1=_mGgj3tTrUfmYj8ufxhb4VpSkSAnngbINHOtj7oZ6SzQ\r\nContent-Type: text/plain; c"...)
#2  modules/tbphpmailer/vendor/phpmailer/phpmailer/src/PHPMailer.php(1523): PHPMailer\PHPMailer\PHPMailer->postSend()
#3  modules/tbphpmailer/src/PhpMailerTransport.php(159): PHPMailer\PHPMailer\PHPMailer->send()
#4  classes/Mail.php(217): TbPhpMailerModule\PhpMailerTransport->sendMail(1, 1, Thirtybees\Core\Mail\MailAddress#1, array(1), array(1), Thirtybees\Core\Mail\MailAddress#1, "[Extractor King Industries Inc.] Call For Price", array(2), array(8), array(0) [])
#5  modules/callforprice/controllers/front/AjaxForm.php(69): MailCore::Send(1, "callforprice", "[Extractor King Industries Inc.] Call For Price", array(8), "[email protected]", null, "[email protected]", null, null, null, "/home/extracto/public_html/modules/callforprice/controllers/front/../../mails/")
#6  modules/callforprice/controllers/front/AjaxForm.php(37): callforpriceAjaxFormModuleFrontController->sendMessage(array(1), "[email protected]", "[email protected]")
#7  classes/controller/Controller.php(228): callforpriceAjaxFormModuleFrontController->displayAjax()
#8  classes/controller/FrontController.php(264): ControllerCore->run()
#9  classes/Dispatcher.php(865): FrontControllerCore->run()
#10 index.php(33): DispatcherCore->dispatch()
  • 0
Posted

Exeption showing is:

Message:

PHPMailer\PHPMailer\Exception: SMTP Error: data not accepted.

Location:

modules/tbphpmailer/vendor/phpmailer/phpmailer/src/PHPMailer.php line 2097

  • 0
Posted (edited)

Based on the line of the error in PHPMailer.php it seems like its failing when its trying to check/validate your email address in your server (email mx).

Can you try different email addresses? preffered gmail.

I am talking about the email you set under the module configuration page "Send notification for".

btw: you can also log to file the results of phpmailer similar to what you did before.

file_put_contents('email_log.txt', json_encode($bad_rcpt));

this will write the file to the root folder of your shop and the file name will be 'email_log.txt'

you should see in the file 'to' and 'error'

Edited by yaniv14
  • 0
Posted

I tried it with my Gmail address but it didn't work. I added the code you sent to the phpmailer.php and the only contents i see in the  email_log.txt is the word, null on line 1.

  • 0
Posted

After adding the code i see a new warning. Did i add it to the wrong place? I added it to the end of the file.

file_put_contents('email_log.txt', json_encode($bad_rcpt));

Undefined variable $bad_rcpt

Location:

modules/tbphpmailer/vendor/phpmailer/phpmailer/src/PHPMailer.php line 5253

  • 0
Posted

sorry i forgot to mention, you need to put it between lines 2096-2097.

before this line 

throw new Exception($this->lang('data_not_accepted'), self::STOP_CRITICAL);
  • 0
Posted

Ok thank you. i added the where specified and tried the form 3 more times. The only thing in the email log file now are 2 brackets like this, []

  • 0
Posted

Hello, Yes i have that enabled. See screenshot. Still nothing in the email)log file also. Just the brackets [] Very odd all other site emails work except for this one module.

Screenshot 2025-03-18 132458.png

  • 0
Posted

Is there a secure way i can send you admin and cPanel login info's? I am willing to pay you to get this working and appreciate the time spent on this so far.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...