Magento cant make an order - magento

I have an installation of Magento 1.9.2. I am using a custom theme, and anytime I try and place an order it kicks off the Ajax on the page and then stops with no error messages, but does leave a log:
ERR (3): User Error: Some transactions have not been committed or rolled back in /html/lib/Varien/Db/Adapter/Pdo/Mysql.php on line 4039
I have spent 2 days trying to get to the bottom of this with no joy. It doesn't matter what payment method I use its always the same.

You should try to log all MySQL queries to see what wrong here. lib/Varien/Db/Adapter/Pdo/Mysql.
Open the file lib/Varien/Db/Adapter/Pdo/Mysql.php and change the value of the protected property $_debug to true. You can also change the value of $_logQueryTime which is especially handy when debugging slowdowns. Once you make this change all queries will be logged in the file var/debug/pdo_mysql.log
Hope this will help you. Please put your corrupted query here if you fixed it.

I had today the same problem. Magento 1.9.2.4 with a custom theme. Everything worked fine, expect the checkout-process. The custom theme used the PHP short open tag <? php code ?> . After enabling short_open_tag in the php.ini, everything works fine.

Related

Magento Admin Backend Blank Page after login

i have a serious problem in Magento Admin Backend. After login its shows a BLANK Page. i used the same files and database in different server, there it was working fine but when i have transferred files into LIVE then Admin issues came. Please help me over this as i got frustrated from last some dayz. If you need any more dertails then plz ask but i need to resolve this soon. Link: http://studywings.com/index.php/admin/
Magento ver: 1.7
flush your magento root /var/cache folder and /var/session folders, It may have previous server session that may cause problems.
Otherwise disable all third party modules and try again. I think this will help
I had the Same problem,
i have also debug the any errors occured, i tried index.php file
ini_set('display_errors', 1);
error_reporting(E_ALL);
$_SERVER['MAGE_IS_DEVELOPER_MODE'] = true;
pleced above code in index.php file. after that i have tried admin login.
showing the errors are session related, header already send errors.
i have to add the code in root/index.php file in top add the following line.
ob_start();
after that tried the login its worked.
Cheers..!
Is url changes to this after click login button or not?
http://yourdomain.com/index.php/admin/index/index/key/(key value)/
if url changes but not not show the dashboard page then go to
app/code/core/Mage/Core/Model/Session/Abstract/Varien.php
make copy of this file
Find the code for setting session cookie parameters these started on line 77
Comment out the final three lines and be sure to remove the comma after $this->getCookie()->getPath(). You should end up with this:
// set session cookie params
session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath()
// $this->getCookie()->getDomain(),
// $this->getCookie()->isSecure(),
// $this->getCookie()->getHttponly()
also line 104 comment out :
//call_user_func_array('session_set_cookie_params', $cookieParams);
If there is no change in url after click login then try to uncomment display error and see error_log file of your server
I think this problem is due to file permissions. As you added files from one server to another, permissions might be get changed.. Try to give the permissions to all the files. Check this http://www.mage-shop.com/forum/threads/3-Magento-Admin-Backend-Blank-Page-Error
There are a number of things that can cause it, but it's most common after migrating to a new server, last time it happened to me it was an excessively low php memory_limit setting on the new server - the Admin part of the site uses a lot more resources per user than the frontend.
In general when having this issue:
Flush out your cache by emptying var/cache
Clear out sessions by emptying var/sessions
Check the magento error logs/reports for an error code in var\logs and var/reports
Turn on magento error logs in mysql if logging isn't already on! (look in core_config_data for WHERE path like 'dev/log/active'
Check if your php configuration is displaying errors
Check your apache/php error logs for more clues - memory errors will show up here for example
Try this solution
It sounds like you want to enable Developer mode. Add this to your .htaccess file:
SetEnv MAGE_IS_DEVELOPER_MODE "true"
You may also want to enable display errors in index.php:
ini_set('display_errors', 1);
The best way I have found to debug is with X-Debug in a local environment. You can also use log files to help debug in a production environment, if your unable to run X-Debug in the environment.
I've got a more detailed posting here:
http://www.molotovbliss.com/debugging-tips-and-tricks-with-magento-commerce
Consider also installing XDebug
Hope this helps you!
Just to complete the other answers....
I am upgrading a magento install, and got the same problem, in the end I had another folder inside of var/
magento/var/minifycache
Only worked after clear deleting the files inside of this folder.
I had the same problem after uninstalling an extension. I thought that clearing cache would be enough, and I did without success... later speaking with the technical team, they commented me that it did not work because I hace memcache installed, and needed to be done the cleaning via system - backend (that i coudl not see...)

Magento can't save new products anymore

Everything was fine 'til this morning. I've tried clearing cache, re indexing, all tips I could find on the internet.
Here is the message I'm getting
Fatal error: Call to a member function getId() on a non-object in /home5/rockbott/public_html/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php on line 578
here is line 577 and 578:
if (Mage::app()->isSingleStoreMode()) {
$product->setWebsiteIds(array(Mage::app()->getStore(true)->getWebsite()->getId()));
A newly created product gives me Fatal Error message. Duplicated product gives me the same, but when I go to manage products it appears, but without SKU# and 0 stock count. When I try to edit that product again - I get Fatal Error.
Please help me with my problem.
Thanks in advance.
Thanks for your response.
Someone suggested that I clear log file and I did. I'm sorry I don't have the log file. Compiler is disabled as well. Would you be kind enough to take a look here: http://www.magentocommerce.com/boards/viewthread/347764/ I've posted more information there including reports.
Thank you
Anna
I realize this is old, but on a Magento 1.9.0.1 install i was having the same problem. I'm not sure what is happening but enabling the cache allowed it to work for me. Weird.
What appears to be causing it in my case is a remnant logging line in Mage.php that I was using to track events.
On line 447 I had:
Mage::log($name, null, 'events.log');
Removing this logging line resolved the issue.
With your informations is difficult to find the problem.
Can you paste your system.log file?
One question: Do you have the compiler enabled? Try to disable it.
I had the same error. Solution turned out to be very simple: you need to replace getStore(true) to getStore(1).
Its very strange because in PHP true same as 1 ... but in this it was a mistake. If you make a "more correct" and write:
$product->setWebsiteIds(array(Mage::app()->getStore(Mage::app()->getStore()->getId())->getWebsite()->getId()));
Magento give you not true website. Was too lazy to look for, as well as programmers Magento (getStore (true)) :)) so I decided to leave it

My Joomla component not displaying anything

I have build my own component. I know very well about these stuff but all of sudden I wonder that the joomla request to my custom component is not displaying anything. Its displaying blank page.
See this:
http://designsoft.bestplacestestserver.com/index.php?option=com_marketplacemanager
Here is the very initial code of 'marketplacemanager.php' file of component where the request is not arriving. Don't know why.
Code - marketplacemanager.php
defined('_JEXEC') or die;
jimport('joomla.application.component.helper');
echo 'aa'; exit; // should have something displayed as here
Go to global configuration. On the server tab turn error reporting to development. Reload the page. Most likely you will now see the error.
Try this, replace the first line of your code with:
defined('_JEXEC') or die('why is blank?');
If still does not show anything it means displaying errors on your server is locked, so checking the error log would be the only option.
The problem has been resolved. Actually MVC naming pattern or something else was wrong. I didn't properly renamed my existing component that I was reusing.

I can't enable or disable modules. I'm getting "An error occurred while saving this configuration"

I have a new fairly fresh install of Magento 1.7.0.2. I installed two custom payment method modules that are working fine. But now whenever I try to disable or enable any Payment Method or Shipping Method it gives me an error like this:
An error occurred while saving this configuration: Warning:
preg_match() expects parameter 2 to be string, array given in
/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Encrypted.php
on line 57
Do you have any idea why?
EDIT 2:
I found the problem. It was caused by a patch I applied to fix to a previous BUG. :P
EDIT:
So I disabled all custom modules and I was still getting the same error. I logged what was happening and it seems that some core modules are sending an array to be saved.
Like PayPal Express Checkout for instance. One of the config options is the Time of Day in the SFTP credentials for Settlement Report Settings. It's composed by three different drop-downs and it's sending an array to be saved!
In the Shipping Methods, UPS has a config options called Allowed Methods, and it's also sending an array!
I still don't know why it wasn't happening before and now it is. They shouldn't be encrypting everything. Any clues?
I had the same issue, its a known bug, try this around line no. 135 on code/core/mage/Adminhtml/model/config/data.php
// add this code
$backendClass=false;
if (isset($fieldConfig->backend_model)) {
$backendClass = $fieldConfig->backend_model;
} // before this
if (!$backendClass) {
$backendClass = 'core/config_data';
}
This actually is a reported bug in Magento that seems to affect encrypted config settings (passwords, API keys, etc.).
http://www.magentocommerce.com/bug-tracking/issue?issue=14217
Try disabling the first of the modules, log out of the admin panel, clear /var/cache and see if the problem still exists. If it does, do the same with the second module.
The problem should be gone. Now that you know which module causes the problems you can either decide to try another module instead or debug to see whats going wrong.
Put a breakpoint on line 57 in /app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Encrypted.php to see what goes wrong. It seems that the second parameter is not a string (might be null for example due to wrong configuration or something) when its given to the preg_match function. Maybe this helps you to identify the problem.
Regards
Disabling modules through the back office isn't a good idea as it only disables the block output, if you would like to disable a module you should go to app/etc/modulesand there you should find Module_Name.xmlfile - in this file just put false in active node.

Magento 1.5.0.1 checkout issue on IE over ssl

Magento checkout is working fine, on all other browsers except IE, it gets stuck over billing section [STEP-2], and when I click continue it does not proceed further?
I tried with both account checkout / guest checkout, none of them works in IE.
Turn on Javascript error reporting for Internet Explorer and/or install an Internet Explorer javascript debugger. You're running into a Javascript error that breaks all the other javascript on the page, and prevents the checkout from proceeding. There's myriad reasons this could be happening, and without seeing your error messages it's impossible to debug. Once you see your error messages, you'll be able to answer.
I looked many internet articles and found that people solved this kind of issue with introducing div col-right block, but in my case it was not helping out, I checked for ajax reload progress url and progress.phtml file too, but in Magento 1.5.0.1 this file does not exist. so none of the solution worked that I read about IE magento checkout issue.
The fix which saved me is this
Go to File :
/app/code/community/Jira/MageBridge/Model/Rewrite/Url.php
around line 89:
change the line below
protected function isSecurePage($routePath = null){
To
protected function isSecurePage($routePath = null)
{
$routePath = preg_replace('/\*\//',
Mage::app()->getRequest()->getRequestedRouteName().'/', $routePath);
$routePath = preg_replace('/\/\*\//',
Mage::app()->getRequest()->getRequestedControllerName().'/', $routePath);
This fixed actually https SSL issue. that was got blocked by IE. I hope it will help someone.

Resources