Saturday, 28 February 2015

failed to find style 'textviewstyle' in current theme with android studio

failed to find style 'textviewstyle' in current theme with android studio

In most of the cases we are trying to load a style that is not supported by the current android API

Go in Project -> app click the 2nd mouse button and select "open module settings"
Select the TAB "flavors" and modify the  Min SDK Version.
API V15 should be fine if you are using something like 10 or 12.


That's how I solved it.

Monday, 23 February 2015

How to fix Magento Admin – Error 404 page not found

how to fix the missing admin page of magento.
Fix for Magento Admin – Error 404 page not found



Sometimes, expecially when you migrate to another server, the admin page can be missing.

1 - Error 404 admin page /admin
Before anything check your configuragion file ( app/etc/local.xml) and make sure that you have "admin" as value for the "frontname" tag.
ex.:
            <adminhtml>
                <args>
                    <frontName><![CDATA[admin]]></frontName>
                </args>
            </adminhtml>


Usually when you try http://yoursite.com/admin it gives you the admin area
Try using an url like that http://yoursite.com/index.php/admin
and if it works probably you need to only modify the rewrite rules or follow the suggestions (see the link below)

edit the file "app/code/core/Mage/Core/Model/Session/Abstract/Varien.php"
in magento 1.3 replace:
session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath(),
$this->getCookie()->getDomain(),
$this->getCookie()->isSecure(),
$this->getCookie()->getHttponly()
);
with:
session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath()
);

 in magento 1.4 and above - comment out:
if (!$cookieParams[’httponly’]) {
    unset($cookieParams[’httponly’]);
    if (!$cookieParams[’secure’]) {
        unset($cookieParams[’secure’]);
        if (!$cookieParams[’domain’]) {
            unset($cookieParams[’domain’]);
        }
    }
}
if (isset($cookieParams[’domain’])) {
    $cookieParams[’domain’] = $cookie→getDomain();
}
example:

/*
if (!$cookieParams[’httponly’]) {
    unset($cookieParams[’httponly’]);
    if (!$cookieParams[’secure’]) {
        unset($cookieParams[’secure’]);
        if (!$cookieParams[’domain’]) {
            unset($cookieParams[’domain’]);
        }
    }
}
if (isset($cookieParams[’domain’])) {
    $cookieParams[’domain’] = $cookie→getDomain();
}
*/




source: http://www.magentocommerce.com/wiki/how_to_fix_login_for_admin_on_local_install

2 - Error 404 in the admin page due to the failed TLS/SSL
If you get a 404 error page due to the redirect to a secure ssl page
 Just run this sql (ex. with phpmyadmin):
UPDATE `core_config_data` SET `value` = '0' WHERE `path`='web/secure/use_in_frontend';

Source: http://www.magentocommerce.com/wiki/recover/ssl_access_with_phpmyadmin


3- Problem error 404 for the admin page due to the incorrect importation of the sql data

If the directive
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */
have been ignored during the import it should be better to re-import the whole backup otherwise several records can be wrong as those that are giving problems (see below)
Make sure that core_store, core_store_group, core_website, and customer_group table ids have the value of '0'.

Check that the values in the database are correct otherwise run this sql command if you don't have time to waste or you don't have the previous backup to reimport:
SET FOREIGN_KEY_CHECKS=0;
UPDATE `core_store` SET store_id = 0 WHERE code='admin';
UPDATE `core_store_group` SET group_id = 0 WHERE name='Default';
UPDATE `core_website` SET website_id = 0 WHERE code='admin';
UPDATE `customer_group` SET customer_group_id = 0 WHERE customer_group_code='NOT LOGGED IN';
SET FOREIGN_KEY_CHECKS=1;
  Source: http://stackoverflow.com/questions/5178066/error-404-not-found-in-magento-admin-login-page



NOTE: delete the cache files in var/cache. Remove the cache in your browser. Restart the browser if you are switching IP addresses via hosts file