Page 2 - troubleshooting
There are cases when the Magento sidebar is missing and not showing. Most likely this is because of the "sidebar" or "sidebar.additional" container has been removed from your theme layout.
When you test your page using Facebook Sharing Debugger and get the warning "The following required properties are missing: fb:app_id",
you need to add fb:app_id meta tag to the <head> tag of your page:
<meta property="fb:app_id" content="ХХХХХХХХХХХХХХХ" />
Replace ХХХХХХХХХХХХХХХ with your Facebook App ID.
There are times when you share the link on Facebook and thumbnail image doesn't show up or it does appear, but it is not the picture you've expected to be shown. In order to fix these steps should be taken:
1. Verify if there are OG tags on your website.
Search for a code <meta property=og: , pressing the Ctrl+U shortcut to open the page source code, example:
<meta property="fb:app_id" content="102143277123049" /> <meta property="og:type" content="website" /> <meta property="og:title" content="Development team for your Magento 2 store | Magefan" /> <meta property="og:description" content="Magefan is development team, gathered together in October 2015 shortly before Magento 2 release. We've all been waiting for Magento 2 and this is it. Now we can surprise you with our solutions." /> <meta property="og:image:width" content="1200" /> <meta property="og:image:height" content="630" /> <meta property="og:image" content="https://cm.magefan.com/default/default/solutions-for-magento-stores-min.jpg"
In Magento 1 merchants commonly used Magento for an online store and some other CMS, e.g. WordPress, Joomla or Drupal for blogging, then installed different tools to make the integration between these systems.
For Magento 2 there is the Blog extension that allows you to have a store and a blog in one place. Here are the advantages of using Magento 2 Blog Module over other blogging platforms or integration modules:
1. Security
Magento is one of the safest frameworks. Safety is the top priority for any successful business. And it's known that WordPress and other blogging CMS are not famous for their security, especially when being installed with additional modules. That's why using Magento extension which expands Magento itself is better. M2 Blog extension has passed over all verifications on Magento Marketplace, including security and it is safe to use.
If your Magento 2 Blog search does not work, most likely the issue is in your theme that overrides original blog templates and layout files.
Try the next steps:
1. Make sure that you have the latest Magento 2 Blog module version.
2. Try temporary remove Blog layout XML files and template PHTML files from your theme one by one and run static content deploy. Once find the file that brings the issue, pay attention to it.
3. Check if a blog search button in the sidebar has the attribute "disabled", if yes then it is disabled (not active), and this may be a root of the issue. In this case, find a code which makes it disabled. The disabled attribute can be added directly via .phtml file in your theme or with some JavaScript. If you cannot find it, then you can insert this JS script to undisable the button:
<script>
require(['jquery', 'domReady!'], function($) {
setInterval(function(){
$('#blog_search_mini_form .action.search').removeAttr('disabled');
}, 2000);
});
</script>
Sometimes instead of the real customer IP address, you can see 127.0.0.1 or some other wrong customer IP in your Magento 2 Admin panel. It can be due to proxies, like Varnish, Cloudflare, Sucuri.net, that may be enabled for your Magento 2 store.
To solve the wrong IP address issue you need to:
1. Create a new file in M2 directory:
app/etc/XIP/di.xml
2. Paste the code:
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Framework\HTTP\PhpEnvironment\RemoteAddress">
<arguments>
<argument name="alternativeHeaders" xsi:type="array">
<item name="x-client-ip" xsi:type="string">HTTP_X_REAL_IP</item>
<item name="x-cf-connecting-ip" xsi:type="string">HTTP_CF_CONNECTING_IP</item>
<!-- <item name="x-cf-mfcustom-ip" xsi:type="string">SOME_CUSTOM_SERVER_KEY</item> -->
</argument>
</arguments>
</type>
</config>
3. Save the file,
If for some reason you need to copy Magento 2 Blog data from one database (DB1) to another (DB2) (in fact Import Blog data from one Magento installation to another), please follow these steps:
1. Make sure that Magento 2 instance that uses DB2 has the same blog extension version as one that uses DB1. If not please upldate Magento 2 blog module on one of them.
2. Create a backup of magefan_blog_* tables in DB2.
3. Remove all magefan_blog_* tables from DB2.
4. Make export (dump) of all magefan_blog_* tables from DB1
5. Import DB1 dump to DB2.
Using this instruction you'll easily migrate ALL blog data from DB1 to DB2. For database manipulations, you can use phpMyAdmin, Adminer.
If you use Magento 2.2.x or greater and receive the error message:
1 exception(s): Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'block', attribute 'class': [facet 'pattern'] The value '\Magento\Framework\View\Element\Text\ListText' is not accepted by the pattern '[A-Z][_a-zA-Z\d]*(\\[A-Z][_a-zA-Z\d]*)*'. Line: 982 Element 'block', attribute 'class': '\Magento\Framework\View\Element\Text\ListText' is not a valid value of the atomic type 'blockClassType'. Line: 982 Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'block', attribute 'class': [facet 'pattern'] The value '\Magento\Framework\View\Element\Text\ListText' is not accepted by the pattern '[A-Z][_a-zA-Z\d]*(\\[A-Z][_a-zA-Z\d]*)*'. Line: 982 Element 'block', attribute 'class': '\Magento\Framework\View\Element\Text\ListText' is not a valid value of the atomic type 'blockClassType'. Line: 982
You need to check all layout files in your theme and custom extensions, they may have a code e.g.: