Russian Characters are being saved and displayed as “????” in WordPress

So the problem is, when we transferred our site from WordPress.com to WordPress.Org which means to self-hosted, we ran into a problem of character encoding.

So I checked my wp-config.php file, and it was all correct.

Next I went to my Database Management Console, to see what is really going on. I logged into my Siteground Account.

By the way if you are interested in the great WordPress hosting I recommend Siteground to all my clients, you can use this link to Sign for Siteground Hosting

Lets get back to this article, so then I went ahead and logged into phpMyAdmin and started exploring the Database

So server charset, looks good to me

Server connection collation looks good as well

Next I ran a SQL query for identifying the Schema

and my results were, not what I was looking for

As well as my table collation was set to different character set

So I had to convert it and I altered it by running the following SQL queries

BACKUP YOUR DATABASE BEFORE RUNNING THESE

So this will allow you to save Russian characters in the database and in the “wp-posts” table and it will not display as question marks “????”.

Reference for more reading:

I hope this will help you solve your issue.

Vagrant Issues on Mac

If you are running into problems with Vagrant. This is probably your scenario.

macOS High Sierra (version 10.13.6)

Vagrant 2.1.2

VirtualBox 5.2.16

You will type in “vagrant up”

and get this error:

Bringing machine ‘default’ up with ‘virtualbox’ provider…

==> default: Clearing any previously set network interfaces…

There was an error while executing `VBoxManage`, a CLI used by Vagrant

for controlling VirtualBox. The command and stderr is shown below.

Command: [“hostonlyif”, “create”]

Stderr: 0%…

Progress state: NS_ERROR_FAILURE

VBoxManage: error: Failed to create the host-only adapter

VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory

VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface

VBoxManage: error: Context: “RTEXITCODE handleCreate(HandlerArg *)” at line 94 of file VBoxManageHostonly.cpp

You will start searching the web for this error and you will find out that you need to restart VirtualBox with the following command

sudo /Library/Application\ Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh restart

Once you run that command you will receive another error:

Loading VBoxDrv.kext

/Library/Application Support/VirtualBox/VBoxDrv.kext failed to load – (libkern/kext) system policy prevents loading; check the system/kernel logs for errors or try kextutil(8).

Error: Failed to load /Library/Application Support/VirtualBox/VBoxDrv.kext

Loading VBoxUSB.kext

/Library/Application Support/VirtualBox/VBoxUSB.kext failed to load – (libkern/kext) system policy prevents loading; check the system/kernel logs for errors or try kextutil(8).

Error: Failed to load /Library/Application Support/VirtualBox/VBoxUSB.kext

Loading VBoxNetFlt.kext

/Library/Application Support/VirtualBox/VBoxNetFlt.kext failed to load – (libkern/kext) system policy prevents loading; check the system/kernel logs for errors or try kextutil(8).

Error: Failed to load /Library/Application Support/VirtualBox/VBoxNetFlt.kext

Loading VBoxNetAdp.kext

/Library/Application Support/VirtualBox/VBoxNetAdp.kext failed to load – (libkern/kext) system policy prevents loading; check the system/kernel logs for errors or try kextutil(8).

Error: Failed to load /Library/Application Support/VirtualBox/VBoxNetAdp.kext

(kernel) Kext org.virtualbox.kext.VBoxNetAdp not found for unload request.

Failed to unload org.virtualbox.kext.VBoxNetAdp – (libkern/kext) not found.

(kernel) Kext org.virtualbox.kext.VBoxNetFlt not found for unload request.

Failed to unload org.virtualbox.kext.VBoxNetFlt – (libkern/kext) not found.

(kernel) Kext org.virtualbox.kext.VBoxUSB not found for unload request.

Failed to unload org.virtualbox.kext.VBoxUSB – (libkern/kext) not found.

(kernel) Kext org.virtualbox.kext.VBoxDrv not found for unload request.

Failed to unload org.virtualbox.kext.VBoxDrv – (libkern/kext) not found.

Fatal error: VirtualBox

I have spent two days trying to figure out the problem:

All I had to do is go to System Preferences > Security & Privacy.

Oracle will be blocked, you will need to click allow.

And then go ahead and run “vagrant up” again.

 

 

Sitecore: Create your first rendering component

We are going to be creating a rendering component. It will be a very simple component, you will have an idea how everything works, and then you will go ahead and create something more complex.

First things first is the checklist:

  1. Create a physical file in the path inetpub\wwwroot\tonySample\Website\xsl. 
  2. Create an item in Content Editor Tree in the Layouts\Renderings.
  3. And then you can insert wherever you like.

So lets begin:

Create an XSLT file, name it something that will be familiar to you, we will use an example and call it (component_tony.xslt).

sitecore_sample_rendering_component_tony

Next we will add some code to the XSLT file:

sitecore_sample_rendering_component_code

sitecore.component/component_tony.xslt – Get the raw code here

Now save it and lets go to the Sitecore.

Create a Rendering Component, name it whatever you wish, as you can see below I named my component Tony Rendering Component.

sitecore_content_tree_layouts_sample_rendering_component

In the Data section of your component item. Go ahead make the following changes:

sitecore_sample_rendering_component_data

Now if you insert this component somewhere on the page, it will show you the content that is included in the XSLT file.

Enjoy! Hope this helps. If there is any questions, please do not hesitate to ask.