Magento Dashboard issue after upgrade from 1.7 to 1.8 - magento

I just upgraded magento 1.7 to 1.8, it has database size around 3GBs.
Problem is that, Admin dashboard is does not display the content below the header part (But, website is working).
I am not able to reach the configuration settings as solution provided in the link below.
Similar Problem
I traced few PHP error logs,
2013/12/29 00:03:39 [error] 1822#0: *642 FastCGI sent in stderr: "PHP message: PHP
Fatal error: Undefined class constant 'XML_PATH_TAX_NOTIFICATION_URL' in
/var/www/magento/www/app/code/core/Mage/Tax/Block/Adminhtml/Notifications.php on line 174"
while reading response header from upstream, client: 14.98.44.206, server: something.compute-1.amazonaws.com, request: "GET /index.php/admin/dashboard/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "something.compute-1.amazonaws.com", referrer: "http://something.amazonaws.com/index.php/admin/"
I defined that constant in the same class where error is occuring, then it gives another similar error.
Server is a VPS. Nginx Server, configured with php-fpm and mysql.
I will be thankful, if I can get some help.

Taking a look at app/code/core/Mage/Tax/Block/Adminhtml/Notifications.php in a stock Magento 1.8 system, around line 174 (per your error message)
#File: app/code/core/Mage/Tax/Block/Adminhtml/Notifications.php
public function getInfoUrl()
{
return $this->_app->getStore()->getConfig(Mage_Tax_Model_Config::XML_PATH_TAX_NOTIFICATION_URL);
}
It appears PHP is complaining about the use of the Mage_Tax_Model_Config::XML_PATH_TAX_NOTIFICATION_URL constant. Taking a look at that class definition (Again, in a Magento 1.8 system)
#File: app/code/core/Mage/Tax/Model/Config.php
class Mage_Tax_Model_Config
{
//...
const XML_PATH_TAX_NOTIFICATION_URL = 'tax/notification/url';
//...
}
The class constant XML_PATH_TAX_NOTIFICATION_URL is defined.
This leads me to believe your system isn't really updated to Magento 1.8. You either have files that were not correctly deployed, or you're running with a system that has APC (or some other class cache) installed. Get the right files on your system and/or get your APC cache cleared and you should be good to go.

Ok, I found out the reason why app/code/core/Mage/Tax/Model/Config.php did not get loaded,
There was also a file in app/code/local/Mage/Tax/Model/Config.php (mind the local vs. core difference in the filepath). This file did not get updated and overruled the core file.

Related

some laravel route not changing to https

There are some my route not going to HTTPS in my Javascript code
loadSettingTable("{{ route('setting.table.data.datatable') }}");
they become like this, so my datatable can't be load because mixed content.
loadSettingTable("http://*****.com/admin/data-setting-table/datatable");
but my css and JS file already become HTTPS.
I already give this on my AppServiceProvider and ENV
//AppServiceProvider.php on Boot
if(env('REDIRECT_HTTPS')) {
$url->formatScheme('https');
URL::forceScheme('https');
}
//.ENV
REDIRECT_HTTPS=true
But some of it work fine with this code, why my code with route name not giving https?
loadTableRealCommSumAgent("/agent/commissions-summary-member-ajax");
I found the error myself, but don't really know why this error happens on my production server not staging server. I remove $url->formatScheme('https'); because it giving some error on production but not always and it's fixed my problem.

Trying to set up CAS with my Laravel project

I am using subfission/cas for my application. I have followed all installation steps. I am using windows, if that matters. More precisely, I have configured the following:
I ran the following in my terminal
composer require "subfission/cas" "dev-master"
I configured my Kernel.php accordingly, adding the following:
'cas.auth' => 'Subfission\Cas\Middleware\CASAuth',
'cas.guest' => 'Subfission\Cas\Middleware\RedirectCASAuthenticated',
I ran the following command:
php artisan vendor:publish
I also set up my cas server in my cas.php config file:
'cas_hostname' => env('CAS_HOSTNAME', 'cas.myserver.me'),
'cas_real_hosts' => env('CAS_REAL_HOSTS', 'cas.myserver.me'),
What I want is a middleware for all my routes, so I added the following route rule in my routes:
Route::middleware(['cas.auth'])->group(function ()
{
Route::get('/', function ()
{
return view('welcome');
});
});
Basically, I want to redirect everyone who is not logged in to the login page whenever I access the main page (for now, I will add more routes in the future). What happens is that the users are redirected to the login page when they are not logged in, but after the login I receive the following error:
ErrorException (E_WARNING)
DOMDocument::loadXML(): Opening and ending tag mismatch: hr line 1 and body in Entity, line: 1
No matter what view I'm redirecting the user to. I tried the default welcome page as well as an empty view, but I still get the same error.
EDIT: I have used the dev-master branch from subfission/cas for the above error and after switching to 2.1.1, I get a different error:
session_name(): Cannot change session name when headers already sent
EDIT 2: I did some more digging and I enabled internal errors in my cas client class with:
libxml_use_internal_errors(true);
And now I get the following:
Authentication failure: SA not validated Reason: bad response from the CAS server
And the cas response is:
The thing is that I use the same cas server for another 2 projects and it works well for those (but those aren't laravel projects.
I know it's been a while, but for anyone else having issues like this, the issue is the protocol selected for which your web service communicates with your CAS(Central Authentication Service) provider. There are two main protocols used for SSO/CAS in this package:
SAML(Security Assertion Markup Language) version 1.1 & 2
CAS Protocol v3.0
[Confusingly enough, CAS protocol shares the same namespace as the service.]
The idea is to match the protocol and version with your identity provider. It sounds like your provider is using CASv3.0, which is why disabling SAML worked.
Also, if you enable debug mode, you will see further error details in your log file to help your troubleshoot.
Best of luck!
I managed to solve the issue by disabling the SAML in the cas configure file:
'cas_enable_saml' => env('CAS_ENABLE_SAML', true),
change to
'cas_enable_saml' => env('CAS_ENABLE_SAML', false),

How to force Authorize.net Directpost reply_url to be HTTPS?

I'm trying to enable the Authorize.net DPM (Direct Post Method) on a Magento 1.11.1 production site. My test site (also Magento 1.11.1.0) works fine because the site is not secure (frontend SSL), but the live site gets an error. Turns out the reply_url sent to Authorize.net (x_reply_url) is being sent as non-ssl (e.g. http://mysite.com/authorizenet/directpost_payment/response as a POST). However, this gets a 500 error because Magento is set to require SSL on the frontend. If I send a test post using (https://mysite.com/authorizenet/directpost_payment/response as a POST) it gets a 200 response. I'm looking at this by having turned on Debug in the DPM payment method and then viewing the file var/log/payment_authorizenet_directpost.log.
So I'm looking through all the code in app/code/core/Mage/Authorizenet and have yet to pull out a section of code where it might be getting this non-ssl URL. And of course then answer the question of "Why isn't it pulling a secure URL instead?".
It looks like it originates possibly in the placeAction method of controllers/Directpost/PaymentController.php.
I was hoping I might get some informed insight here as to whether I'm on the right track and how best to log or var_dump the appropriate variables (on my test site) to verify any changes.
Resolved. This appears to be a bug in the code for the authorize.net directpost method.
Modified file: app/code/core/Mage/Authorizenet/Model/Directpost.php
Method: getRelayUrl
Old code:
return Mage::app()->getStore($storeId)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK) . 'authorizenet/directpost_payment/response';
New code:
if(Mage::app()->getStore($storeId)->isCurrentlySecure()) {
return rtrim(Mage::getUrl('authorizenet/directpost', array('_secure' => true)),"/") . '_payment/response';
} else {
return Mage::app()->getStore($storeId)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK) . 'authorizenet/directpost_payment/response';
}
This was in Magento Pro 1.11.1.0 (same code as Magento EE 1.11.1.0). I have not yet received access to any newer versions of Magento EE in order to see if this has been resolved in 1.12 or higher.

CodeIgniter returns 404 for all routes but works

I have strange problem with CodeIgniter and routing system and can't find solution for it, so: I have several routes such as
'forum/(:num)'
=> 'forum/category/$1',
'forum/(:num)/(page:any)'
=> 'forum/category/$1/$2',
and them works, but return 404 code in header.
I mean I don't get 404 page, correct HTML returns and page's content displays correctly for my forum's categories. But I'm getting 404 in header (Network tab in Firebug), so I can't work with POST data correctly.
If I request /forum/ - 200 Ok returns, but when I trying to get routed page, I get right page, but with 404 Not Found.
I'm using PHP5.4+Apache2 on Linux host, if it will help You to give me solution.
I've found solution! Maybe it will save someone's time.
Problem wasn't in CodeIgniter, I've found solution in activation mod_rewrite. Yes, that worked, but wan't activated in Apache.
Just try to do
sudo a2enmod rewrite
and restart apache service after
sudo service apache restart
And all routed pages will return 200 Ok
None of these worked, but I did this instead:
At the end of my controller I put this:
$this->output->set_status_header('200');
and actually though that worked, the problem turned out to be a controller name that conflicted with a real directory name...

Varnish Cache and Magento: Guru Meditation and 500 Internal Server Error?

I recently activated the varnish cache module for my Magento store, this worked pretty well, no problems. Now I copied the code and the DB of this Magento installation and placed it somewhere else on the same server to create a testing environment. I deactivated varnish cache on that testing environment by setting system/varnishcache/enabled to 0 and system/varnishcache/disable_caching to 1.
The problem now is, that I always get:
Error 500 Internal Server Error
Internal Server Error
Guru Meditation:
XID: 628339795
No matter what I do, I cleared the cache, reloaded, tried different browsers, activated the varnish cache module, doesnt help. Any ideas what else I could try?
Thanks!
By default Mageto switches errors output off. If your php is configured not to log php errors web server will send 500 error in case any fatal error occurs.
You can check errors in /var/log/exception.log and /var/log/system.log or enable output of all errors in your magento installation:
edit your index.php :
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', 1);
and .htaccess:
SetEnv MAGE_IS_DEVELOPER_MODE "true"

Resources