Magento - order details are not displayed in the admin panel - magento

We have an ecommerce magento store. Right now, we are experiencing a weird problem, which i am unable to understand and debug.
For some of the orders, no details are displayed in the order details page of magento admin, though the mail is correctly sent to the client and cc'd to our email id.
Screenshot for admin order details page :-
Screenshot for email containing order details :-
Why is this happening ?? I tried to check the pattern but was unable to. Please help me on this issue as i am not a pro in magento and any help from your side will do the work for me.

Try also this, it worked for me (from https://magentary.com/kb/php-syntax-error-after-supee-7405-unexpected/):
Problem description
After SUPEE-7405 patch Sales Order Management screen in Magento Backend is blank or the following error is reported in PHP error log:
PHP Parse error: syntax error, unexpected '[' in app/code/core/Mage/Adminhtml/Helper/Sales.php on line 124
Cause
SUPEE-7405 is prepared with PHP 5.4 in mind, older PHP versions are incompatible with new language constructions used.
Solution
Change line 124 in app/code/core/Mage/Adminhtml/Helper/Sales.php from $links = []; to $links = array();:
--- app/code/core/Mage/Adminhtml/Helper/Sales.php
+++ app/code/core/Mage/Adminhtml/Helper/Sales.php
## -121,7 +121,7 ##
public function escapeHtmlWithLinks($data, $allowedTags = null)
{
if (!empty($data) && is_array($allowedTags) && in_array('a', $allowedTags)) {
- $links = [];
+ $links = array();
$i = 1;
$data = str_replace('%', '%%', $data);

More than likely you have a local or community module causing some kinds of fault, if the page is not rendering all the way for some orders, I would presume these are orders that are using this local and/or community module.
A few things you can try are:
1) disable all local modules via local.xml
2) disable community modules via app/etc/Company_Modulename.xml and set active to false
after disabling each retry viewing the orders until you find the culprit.
Also, viewing the page source may help lead to where the output is stopping and there also may be errors at the very end of the page source.
hope this helps.

I solved this problem when I replace the tax.phtml file in
app/design/adminhtml/default/default/template/sales/order/totals
with my original file. Try it.

I disabled all plugins. It seemed that the apptha one step checkout plugin was responsible for this in my case.

I believe that this issue is due to default Magento, as the files does not point to any third party checkout extensions.

If the SUPEE-7405 patch has caused this, please check that your system does not run on PHP 5.3.
The patch breaks PHP 5.3 compatibility, by introducing usage of array literals in app/code/core/Mage/Adminhtml/Helper/Sales.php (line 124), which became available in PHP since version 5.4, so the minimum PHP version required, after applying it, is PHP 5.4:
// patched app/code/core/Mage/Adminhtml/Helper/Sales.php lines 121-124
public function escapeHtmlWithLinks($data, $allowedTags = null)
{
if (!empty($data) && is_array($allowedTags) && in_array('a', $allowedTags)) {
$links = [];
To fix this, and restore PHP 5.3 compatibility (allowing orders to show up again in admin screens), simply correct this with old PHP5.3 equivalent:
// patched and fixed app/code/core/Mage/Adminhtml/Helper/Sales.php lines 121-124
public function escapeHtmlWithLinks($data, $allowedTags = null)
{
if (!empty($data) && is_array($allowedTags) && in_array('a', $allowedTags)) {
$links = array();

Change PHP 5.3 to 5.6 on your Server , logout and in . Resfresh you Cache.
It will be run.
For the Version 1.9.2.3 magento.

Related

Deploy yii2 advanced on Heroku and frontend cannot find the models

I deployed a yii2 advanced and postgresql on the Heroku.
The backend works well.
When I visit frontend, it gives me an error.
Error
Class 'frontend\models\home' not found
public function getHomeSource()
{
$query = Home::find();
$home_list = $query->where('"isUsed" = 1')->orderBy('sort')->all();
return $home_list;
}
I don't know how to fix it.
Please help me!
Can you give all content of file with function getHomeSource()
Mabe you need just add use name\spase\tohomemodel\Home in top of the file

setCustomerid() Fatal error Magento 1.9.2.1

I keep having this problem:
Customers can not register, login and logout without an fatal error (enabled debugging).
Fatal error: Call to a member function setCustomerId() on a non-object in ../public_html/app/code/core/Mage/Reports/Model/Product/Index/Abstract.php on line 169
Here is the code snippet from lines 161 - 180:
/**
* Calculate count of product index items cache
*
* #return Mage_Reports_Model_Product_Index_Abstract
*/
public function calculate()
{
$collection = $this->getCollection()
->setCustomerId($this->getCustomerId())
->addIndexFilter();
Mage::getSingleton('catalog/product_visibility')
->addVisibleInSiteFilterToCollection($collection);
$count = $collection->getSize();
$this->_getSession()->setData($this->_countCacheKey, $count);
return $this;
}
What i've done, thanks to answers on similar questions:
Cookie settings.
Disabled (all) modules, one by one. By xml, admin backend and deleting. Also checked if there were any updates (there were not).
Refreshed cache, deleted cache, disabled cache (same for sessions)
Set Var directory, media, downloader and eventually all folders and files to 777.
Set all the correct permissions back again, thanks to magento-cleanup.php.
Checked the database on wrong base url's, secured and unsecured.
Did a complete app directory rewrite, uploaded from a clean magento installation.
Checked the server settings with , no safe modus (do got a basedir open directory)
Also i'm being redirected tot a 404 page within the backend. With a NoRoute URL, after a correct login. I do see and can use everything in the backend, including the navigation menu.
I do use a template and some customisation with plugins / modules. No coding in core files. Not sure what information is needed, so do ask if i have to mention something.
I'm completely lost after 8 hours of struggling. Hope it is something you can help me with.
Judging by the debug of calling the collection, you have either:
a) the issue with factory and xml (most likely, it the config.xml of some extension). In this case, you should debug the method _getResourceModelFactoryClassName of the core/config model.
https://www.gyazo.com/e7c8ebb26326ce2f1a3c7c26b43812ea
OR
b) the following class is absent: Mage_Reports_Model_Resource_Product_Index_Compared_Collection
https://www.gyazo.com/9c59119fe4b97889cb81d2e8980b55fa
You may check that in the getModelInstance method of the model. Please take into account the fact that while debuging via echo/var_dump you won't be able to good results, since these methods are generally called everywhere by different models.
I'd rather recommend you to start from checking the presence of the following class:
Mage_Reports_Model_Resource_Product_Index_Compared_Collection (app/code/core/mage/reports/model/resource/product/index/compared/collection.php).
Next, I'd check the presence of model rewrites in the (Mage_Reports) extension + check all recently installed extensions/ implemented changes in config.xml files of these modules.
Hope it helps.
Just debug and check what is returned in this method:
1) get_class($this)
2) get_class($this->getCollection())
In your case the error means the following: there's no a set resource model for the current model. The code is trying to access the collection, but can't do that, as there's no the required resource model, or the name of the resource model, or the class that corresponds to this name.

Sentry on Laravel 4 with MAMP

I'm using Laravel on MAMP PRO (PHP 5.4). Both are vanilla install and I got Laravel working okay.
Next, Installed Sentry.
Inside of a login function on controller:
$user = Sentry::authenticate($credentials, false); // this works. I can see the $user
But then upon an immediate redirect I use a filter:
Route::filter('auth.admin', function()
{
var_dump(Sentry::check()); // ** this gives me a bool(false);
die();
if ( ! Sentry::check())
{
return Redirect::route('admin.login');
}
});
So, I'm assuming that maybe there is a cookie that is not being set?
Solved...
For anyone else with this issue, this is a summary of the most common solutions on the Internet as well as how I solved my issue. I'm on MAMP/OSX, but this apparently made zero difference as I literally put up a vagrant/virtualbox and still had the same issue.
** Set 'domain' => 'yourdomain.com' in your config/session.php. EVEN IF YOU ARE ON A SUB DOMAIN like a.b.c.yourdomain.com, use ONLY the root domain (yourdomain.com) in your 'domain' variable as I just wrote it. ** This was my issue.
Make sure your session storage folder has write permissions.
Make sure you have a >0 lifetime in your session.php
Make sure you don't have whitespaces after any closing PHP which could cause the application not to shut down properly.
Try Switching between database sessions and file sessions.
As a last resort, try upgrade to 4.2, if possible. 4.1 had a known issue (as referenced in google).
Your issue is may no be with Laravel OR Sentry. It's probably a file or configuration issue as illustrated above. I pulled my hair out tracking this from Sentry to Laravel to Cookies to Session to Blah... Only to realize that it was finally a cookie issue which was caused by me not setting my ROOT domain (I was using the full

joomla 3.0 Call to undefined method JUtility::getToken()

I got this error while creating a joomla logout link. Here is my code please help
if($user->id){
$token = JUtility::getToken();
$linkout = JRoute::_("index.php?option=com_users&task=user.logout&".$token."=1");
}
and echo $linkout to anchor tag
JUtility::getToken() has been replaced by JSession::getFormToken(), thus code could be changed to:
&task=user.logout&<?php echo JSession::getFormToken(); ?>=1">
you may want to use this for further reference:
joomla 3 and joomla platform 12.2 potential backward compatibility issues

Facebook SDK breaking Codeigniter? Blank page

I have tested my login script on my localhost with no problems.
I have now uploaded it online as can be seen at this link
Obviously if you click, you can see that a blank page is displayed and I have no idea why.
I did a test of a little bit of content, and removed the Facebook SDK code.
//Facebook config (required for library)
$fb_config = array(
'appId' => 'REMOVED',
'secret' => 'REMOVED'
);
//Load Facebook library
$this->load->library('facebook', $fb_config);
//SET FACEBOOK USER
$fbuser = array();
$fbuser = $this->facebook->getUser();
When the above code is not present, the page loads.
I have updated my app setting correctly, namely changing the site URL fro http://localhost to http://gua.com so i dont believe it is that.
I have even changed my CI settings to show all errors - nothing is shown.
Does anyone have any suggestions as to why the above code might be making a blank page load ONLY when it is hosted online?
Many Thanks
THomas
Open up the base_facebook.php and try removing either of these two lines from the top.
if (!function_exists('curl_init')) {
throw new Exception('Facebook needs the CURL PHP extension.');
}
if (!function_exists('json_decode')) {
throw new Exception('Facebook needs the JSON PHP extension.');
}
If you stop getting the white screen, it should indicate that your sever needs either curl or json_decode enabled.
Alternatively you could just do a echo phpinfo() and check if they are enabled. Note that json_decode/encode is only available in php >=5.2
If your localhost was a Windows box and your remote host is a *NIX system, there is a chance that some extra white space was introduced into your SDK files outside of the <?php ?> tags. This can sometimes cause the "white screen of death" when this whitespace is output and sets the headers.
Try downloading a fresh copy of the SDK from Github and don't unzip it until it is on your remote server. Better yet, if you ssh access wget it or git clone it directly there. See if that helps.
If it doesn't, add error_reporting(E_ALL) as the first line of your script and see if that tells you anything.
You will need to run chmod eg: "sudo chmod -R 777 facebook/". I think the files were written in or for windows so on a *Nix system it does not run till that is checked.
In my case after doing this, I started to have errors I could work with.

Resources