Magento Bug In Mage_Paypal_Model_Ipn - magento

I am using Magento Community 1.5.0.1 and when I receive a PayPal IPN message to /paypal/ipn, the transaction information in coming in successfully, and the order is automatically moved to paid and a invoice is generated.
However, in my PHP logs I get this message:
[28-Jul-2011 06:42:36] PHP Fatal error: Call to a member function getIncrementId() on a non-object in /app/code/core/Mage/Paypal/Model/Ipn.php on line 390
[28-Jul-2011 06:42:36] PHP Fatal error: Class 'Mage' not found in /app/code/core/Mage/Core/Model/Mysql4/Session.php on line 0
Also, a email is sent to our admin email (since I have it enabled to have invoices sent to us), however, a email is not sent to the customer.
I imagine these are related.
Any ideas on how to fix this? It makes no sense for a error to be returned since when I echo $creditmemo->getIncrementId(); just before the line causing the error, the ID is clearly being returned!
This is bad because as a fatal error, it

Obviously it is not a good idea to modify core files, but see if it works by changing the following line:
if ($invoice = $payment->getCreatedInvoice() && !$this->_order->getEmailSent()) {
to the following:
if (($invoice = $payment->getCreatedInvoice()) && !$this->_order->getEmailSent()) {

Related

Google Authentification Laravel Socialite gives 403 Error when asking for 'profile' scope

As the title says, I'm getting a 403 Forbidden Error when asking for the 'profile' scope.
Here's my code
// routes/web.php
Route::get('google', 'Auth\GoogleAuth#auth')->name('google-signup');
Route::get('googlecallback', 'Auth\GoogleAuth#callback');
// Auth/GoogleAuth.php methods
public function auth()
{
return Socialite::driver('facebook')->redirect();
}
public function callback()
{
$socialUser = Socialite::driver('facebook')->user();
dd($socialUser);
}
The reason I know it's the 'profile' scope is because when I tried
public function auth()
{
return Socialite::driver('facebook')->setScopes(['email','openid'])->redirect();
}
Everything worked, prefectly, I get the email and the id, only I don't get user info without the 'profile' scope. and I need said information (name, first name, last name ..etc).
I tried the stateless() solution but I kept getting the same 403 Error.
I saw some similar questions here and in github but the solutions didn't work for me either.
Laravel version 7.x
Laravel Socialite version 4.4
I'd appreciate any help.
Okay... This question is out there a lot with few (or wrong) answers. I happened to run into this on 2 different Amazon Lightspeed instances with the exact same code installed and on one server Google login/callback worked fine and on the other 403.
This is MOD SECURITY issue. It's blocking the use of .profile which is in the Laravel code apparently or perhaps required to pull down the Google user data. What you need to be able to do to fix this is turn off the ID for this rule in mod-sec. For me that was 210580.
Message: Access denied with code 403 (phase 2). Matched phrase
".profile" at ARGS:scope. [file
"/etc/apache2/modsecurity.d/rules/comodo_free/08_Global_Other.conf"]
[line "57"] [id "210580"] [rev "2"] [msg "COMODO WAF: OS File Access
Attempt||aeroscale.net|F|2"] [data "Matched Data: .profile found
within ARGS:scope: email profile openid
https:/www.googleapis.com/auth/userinfo.profile
https:/www.googleapis.com/auth/userinfo.email"] [severity "CRITICAL"]
[tag "CWAF"] [tag "Other"] Apache-Error: [file "apache2_util.c"] [line
273] [level 3] [client 73.238.35.209] ModSecurity: Access denied with
code 403 (phase 2). Matched phrase ".profile" at ARGS:scope. [file
"/etc/apache2/modsecurity.d/rules/comodo_free/08_Global_Other.conf"]
I added that to my Plesk exception list in Mod Security and it started working on this server. Ironically I don't have that rule installed on the other server and it works fine. It's a slightly lower end server though so perhaps Amazon runs a different rule set on them.

VerifyCsrfToken error with no status or message on line 82 Laravel

In Exceptions/Handler.php i added some logic to send an email with every exception from my flow ( i added this to report method ).
In my flow i have severals forms and from time to time i get an email with an error on line 82 in file: Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php . At this line is this "throw new TokenMismatchException ".
After reading some questions & answers i added csrf token to my forms.
The thing is i can't reproduce this error and the exception doesn't have any error code or message.
Beside that, in laravel.log there's no error about csrf.
My questions are:
Is this error flow breaking? I've made the flow several times and i didn't get any error, but if this exception will be throwed when a customer is in the flow, it will break the flow ( i mean it will be redirected to an error page ) or the client will know nothing?
Why this error is not in laravel.log?
Do you have any idea what can i do to fix this error?

Magento - blank homepage and "Fatal error: ../app/code/core/Mage/Captcha/Block/Captcha.php on line 43" in admin

My Magento site has suddenly stopped working. The homepage loads a blank page, and when I go to the admin I get the following error:
Fatal error: Call to a member function getBlockName() on a non-object in ../app/code/core/Mage/Captcha/Block/Captcha.php on line 43
I have deleted the cache and session files but this didn't have any effect.
Make sure your Var folder has proper permission.
When captcha image are created they first get store in var folder.
Due to improper permission images will not be saved.This will result in a NULL object hence that error.
If your store doesn't use captcha, then rename the folder ./app/code/core/Mage/Captcha/ to something other like ./app/code/core/Mage/Captcha_old/ then you can access the site.

Call to undefined method VirtueMartControllerInvoice::getInvoicePDF()

i'm using joomla 2.5.11 and virtuemart 2.0.26a
getting a error in virtuemart when a order is changed to Confrimed Status..
Call to undefined method VirtueMartControllerInvoice::getInvoicePDF()
sometimes i'm getting
500: Internal Server Error
but when the order status is changed to Pending or something else..And mail to client is delivered without PDF.

"Server Error" when users try to create a new account - Magento 1.7

I'm setting up our Magento 1.7 store, hoping to be ready for launch soon. I've noticed a problem:
When users try to create a new account, they fill out their info on /customer/account/create page just fine, then when they click submit, they get this 500 Error:
The website encountered an error while retrieving
http://example.com/customer/account/createpost/.
the account is actually created, however.
Similar deal on when users submit their email on the Forgot Password page, they press submit and get this:
The website encountered an error while retrieving
http://example.com/customer/account/forgotpasswordpost/.
no email is sent.
If you see this and know how to help with this prob, your advice would be much appreciated, truly.
In case it helps, we are using a theme, rather than default.
EDIT - (I was asked if I had checked server error)
My server errors show as this, for the above situations:
Forgot Password submit shows this error:
Fatal error: Call to undefined method Mandrill_API::addTo() in
D:\Magento\app\code\core\Mage\Core\Model\Email\Template.php on line
438
and
Create Account submit shows this error:
Fatal error: Call to undefined method Mandrill_API::addTo() in
D:\Magento\app\code\core\Mage\Core\Model\Email\Template.php on line
438
as well.
Here is 6 lines(437-442) of that Template.php file:
foreach ($emails as $key => $email) {
$mail->addTo($email, '=?utf-8?B?' . base64_encode($names[$key]) . '?=');
}
$this->setUseAbsoluteLinks(true);
$text = $this->getProcessedTemplate($variables, true);
[UPDATE]
I've learned that when I enter a random, fake email for Forgot Password, and press submit, a confirmation appears, saying something like "If this email exists, then a new email was sent to that email!", but when I submit an email of a real existing customer, then it gives me the 500 error I've mentioned.
Still nothing - if anyone out there sees this, and you have a bit of time to help solve this perhaps, may Talos bless you!
[SOLVED]
I turns out this was a problem with transaction emails.
Cause by an extension, Mandrill, which is added to magento when I installed the MailChimp extension, called "MageMonkey - MailChimp Integration by ebizmarts"
Once I enabled Mandrill, in config, advanced, all transactions and transaction emails work perfectly fine!
It's possible that it's a .htaccess or server configuration problem. Where is it hosted? Do you have a .htaccess file in the root of the installation?

Resources