Magenta Connect – Access is locked. Please try again in a few minutes.

If you have come to update Magento and got the message “Magenta Connect – Access is locked. Please try again in a few minutes.” and you are prevented from logging in to process updates the chances are the Magento itself is blocking this.

Check using FTP if you have the following file?

/var/brute-force.ini

Then look at the file contents and the chances are you have brute force number as an example:-

brute-force-bad-attempts-count = 1632
brute-force-diff-time-to-attempt = 97920
brute-force-attempts-count = 3
brute-force-last-bad-time = 1537569507

You need to change the files first two lines to:-

brute-force-bad-attempts-count = 0
brute-force-diff-time-to-attempt = 180

You can remove the other lines or changes the values to zero.

You can then update an old version of Magento and its core elements.

Magento Connection Manager

Add Facebook Open Graph to Magento

How to add Facebook Open Graph Protocol to Magento the easy way. Your web store should be easy to share and your products or services have to be providing the browser with the correct details known as Open Graph Protocol data which uses “og:” tags in the source code and these need to pull in the specific data from Magento so that then the information can be shared via Facebook automatically.

You need to locate the head.phtml file located in the folder structure app/design/frontend/THEME-NAME/default/template/page/html/head.phtml

Before you do anything visit http://opengraphcheck.com/ and check a few website pages to see what the current coding is providing.

Anywhere around the existing meta data, for example:-


<meta http-equiv=”Content-Type” content=”<?php echo $this->getContentType() ?>” />
<title><?php echo $this->getTitle() ?></title>
<meta name=”description” content=”<?php echo htmlspecialchars($this->getDescription()) ?>” />
<meta name=”keywords” content=”<?php echo htmlspecialchars($this->getKeywords()) ?>” />
<meta name=”robots” content=”<?php echo htmlspecialchars($this->getRobots()) ?>” />
<link rel=”icon” href=”<?php echo $this->getFaviconFile(); ?>” type=”image/x-icon” />
<link rel=”shortcut icon” href=”<?php echo $this->getFaviconFile(); ?>” type=”image/x-icon” />
<meta name=”viewport” content=”width=device-width, maximum-scale=1.0, minimum-scale=1.0,initial-scale=1.0,user-scalable=no”>


Add the following code:-


<?php /* Chameleon Web Services Open Graph Protocol for Facebook and SEO START */ ?>
<?php if(Mage::registry(‘current_product’)): ?>
<?php $product = Mage::registry(‘current_product’); ?>
<meta property=”og:title” content=”<?php echo ($product->getName()); ?>” />
<meta property=”og:type” content=”product” />
<meta property=”og:image” content=”<?php echo $this->helper(‘catalog/image’)->init($product, ‘small_image’)->resize(200,200);?>” />
<meta property=”og:url” content=”<?php echo Mage::registry(‘product’)->getProductUrl(); ?>” />
<meta property=”og:description” content=”<?php echo strip_tags(($product->getShortDescription())); ?>” />
<meta property=”og:site_name” content=”<?php echo Mage::app()->getStore()->getName(); ?>” />
<?php elseif(Mage::registry(‘current_category’)): ?>
<meta property=”og:title” content=”<?php echo $this->getTitle() ?>” />
<meta property=”og:type” content=”product.group” /> <meta property=”og:url” content=”<?php echo $this->helper(‘core/url’)->getCurrentUrl();?>” />
<meta property=”og:description” content=”<?php echo strip_tags($this->getDescription()) ?>” />
<meta property=”og:site_name” content=”<?php echo Mage::app()->getStore()->getName(); ?>” />
<?php elseif((Mage::getSingleton(‘cms/page’)->getIdentifier() == ‘home’ && Mage::app()->getFrontController()->getRequest()->getRouteName() == ‘cms’)) : ?>
<meta property=”og:title” content=”<?php echo $this->getTitle() ?>” /> <meta property=”og:type” content=”website” />
<meta property=”og:url” content=”<?php echo $this->helper(‘core/url’)->getCurrentUrl();?>” />
<meta property=”og:description” content=”<?php echo strip_tags($this->getDescription()) ?>” />
<meta property=”og:site_name” content=”<?php echo Mage::app()->getStore()->getName(); ?>” />
<?php else: ?>
<meta property=”og:title” content=”<?php echo $this->getTitle() ?>” />
<meta property=”og:type” content=”article” />
<meta property=”og:url” content=”<?php echo $this->helper(‘core/url’)->getCurrentUrl();?>” />
<meta property=”og:description” content=”<?php echo strip_tags($this->getDescription()) ?>” />
<meta property=”og:site_name” content=”<?php echo Mage::app()->getStore()->getName(); ?>” />
<?php endif; ?>
<?php /* Chameleon Web Services Open Graph Protocol for Facebook and SEO END */ ?>


Now visit http://opengraphcheck.com/ and check a few website pages to see if the data is now pulling the information relevant to the page content.

Magento subcategories not showing

We have upgraded a clients core Magento files today and found that the sub category’s stopped working.

We had previously added the code creating a static block which calls the sub category groups. Following the upgrade the category area became blank and with a Google search “Magento subcategories not showing” we found many people have the same issue.

For information purposes we upgraded from version 1.7 to version 1.9.

magento sub category images enabled

The image shows the actions required to enable the use of blocks.

Click on “System” then “Permissions” followed by “Blocks”.

Create a new Block Name matching the required block used for sub category inclusion. Select “Is Allowed” and then clear all cache and check the site.

magento sub category images showing

Magento subcategories not showing Technical Data:

File Locations:-

/app/design/frontend/***/default/template/catalog/navigation

Create a file called “subcategory_listing.phtml” and this file should contain the following:-

Contact Us for the coding if you need it.


/app/code/core/Mage/Catalog/Block

Check you have the following file “Navigation.php”


Create a new static block by going to “CMS” then “Static Blocks” and click “Add New Block”.

Block Title: Sub Category Listing
Identifier: subcategory_listing
Status: Enabled
Content: {{block type=”catalog/navigation” template=”catalog/navigation/subcategory_listing.phtml”}}


Locate the category via “Catalogue” then “Manage Categories” and select the desired category.

Select on the “Display Settings” the following:-

Display Mode: Static Block only
CMS Block: Sub Category Lsiting
Is Anchor: No


Now check the website.

Has Your Magento been hacked

If you login into your Magento Admin area and find a blank page you have more than likely been hacked, you will have seen hopefully the emails from Magento explaining “Urgent: Immediately install Magento critical security patches” and probably ignored or not understood what they meant.

Fatal error: Class ‘Magpleasure_Filesystem_Helper_Data’ not found

Around the 16th April 2015 Magento sent out a message to all Magento Webmaster:-

Critical Reminder: Download and install Magento security patches. Download now.
Download and implement 2 important security patches (SUPEE-5344 and SUPEE-1533) from the Magento Community Edition download page (https://www.magentocommerce.com/products/downloads/magento/). If you have not done so already, download and install 2 previously-released patches that prevent an attacker from remotely executing code on Magento software. These issues affect all versions of Magento Community Edition. A press release from Check Point Software Technologies in the coming days will make one of these issues widely known, possibly alerting hackers who may try to exploit it. Ensure the patches are in place as a preventative measure before the issue is publicized.

Then 19th April 2015 another reminder:-

Second Reminder: Download and install Magento critical security patches now.
If you have not done so already, download and install 2 previously-released security patches (SUPEE-5344 and SUPEE-1533) from the Magento Community Edition download page (https://www.magentocommerce.com/products/downloads/magento/). These security issues affect all versions of Magento Community Edition and enable an attacker to remotely execute code on Magento software. A press release from Check Point Software Technologies tomorrow will make one of these issues widely known, possibly alerting hackers who may try to exploit it. Ensure the patches are in place as a preventative measure before the issue is publicized.

And then on 23rd April 2015 the third and final warning:-

Urgent: Immediately install Magento critical security patches
It is critical for you to download and install 2 previously-released security patches (SUPEE-5344 and SUPEE-1533) from the Magento Community Edition download page (https://www.magentocommerce.com/products/downloads/magento/). Please do this immediately, as Check Point Software Technologies has published a technical description of how they discovered the issue, which we feel might serve as a tutorial for implementing an attack against your website.

Magento Blank Screen In Admin Area

Your admin area once logged in is blank, DO NOT Panic. Firstly find out why!

To start the process of fault finding first enable errors to be displayed as this will provide you with the details required to fix the problem.

To do this you need to use FTP and edit the index.php file in the root directory.

Change:-

<?php

/**

* Magento

To be:-

<?php

ini_set('display_errors', 1);

/**

* Magento

Now go back to the Magento Admin area and see if you get a new line of text and this will identify the problem.

If you see this “Fatal error: Class ‘Magpleasure_Filesystem_Helper_Data’ not found in /home/site/public_html/app/Mage.php on line 546” the chances are you have been hacked and this is a result of not updating the latest Magento security updates.

If you FTP to the location:- “/app/code/community/Magpleasure/” you will find the area that has been attacked.

Remove all files in the location “app/code/community/Magpleasure/Filesystem/”

Now clear your cache by deleting everything in the “/var/cache” folder

Try and login now and this should be working for you and now you have to check and clean up the potential ways in. Firstly look for new “Admin Users”

To do this go to “System” then “Permissions” and “Users”.

Look for users like “invk”, “system_backup” and look at the email addresses. You can make the accounts “Inactive” if you are not sure what they are.

Now patch your Magento website with SUPEE-5344!.

https://www.magentocommerce.com/products/downloads/magento/

ver 1.9.1.1 – Added May 1, 2015 (Includes patch for the SUPEE-5344 issue)