WordPress troubleshooting: known Issues and how to fix them

You are using an obsolete PHP version

What you see

Reason

The older PHP version does not support new programming language capabilities used in one of the libraries.

Solution

Update PHP. Currently, the minimum allowable version for our plugin is PHP 7.1.3.

Version 5.5 is too old, it was released in 2013, and critical vulnerabilities are not secured in it. The life cycle of versions is available here.

PHP version update is usually available as an option in your hosting provider control panel (Cpanel, ISPManager, and others). It takes a few minutes and should not affect your website performance. Nonetheless, you can back up to the previous PHP version if something goes wrong.

You can find detailed instructions on the PHP version update from the major WordPress platforms below:

Bluehost, Dreamhost, Siteground, IPage, Hostgator, 1&1, Ehost, MediaTemple, GoDaddy, Pagely.

If you can’t find your provider in this row, please, contact your web hosting customer support or system administrator.

After updating the PHP version deactivate the Setka Editor plugin and activate it again.

The plugin files were partially downloaded

When the plugin is not fully downloaded (i.e. when not all plugin files were copied to the server), errors occur in PHP. This happens if FTP was uploaded manually and the connection was lost.

What you see

In most cases, the user will see a white page with or without errors. An error message can be seen if WP_DEBUG is active (otherwise you will get a simple white page) or if you look into error.log on the server (full address to the file depends on the server configuration), provided this log is enabled in web server settings.

Warning: include(/var/www/wordpress/htdocs/1/wp-content/plugins/setka-editor/source/Plugin.php): failed to open stream: No such file or directory in /var/www/wordpress/htdocs/1/wp-content/plugins/setka-editor/vendor/composer/ClassLoader.php on line 412

Warning: include(): Failed opening '/var/www/wordpress/htdocs/1/wp-content/plugins/setka-editor/source/Plugin.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/wordpress/htdocs/1/wp-content/plugins/setka-editor/vendor/composer/ClassLoader.php on line 412

Fatal error: Class 'Setka\Editor\Plugin' not found in /var/www/wordpress/htdocs/1/wp-content/plugins/setka-editor/plugin.php on line 30

Reason

Some files were either not downloaded or deleted. Another possible reason is that some files have incorrect content (for example, they were edited manually and their content was deleted).

Solution

Delete the plugin completely. If some files are missing, you will not be able to do this via the plugins control panel since some files are used to delete plugin settings.

If the plugin cannot be deleted via the control panel, then simply delete the plugin’s folder from the server via FTP (SFTP or SSH) and then upload the latest version of the plugin again. You can upload a new version of the plugin in any convenient way, via the control panel or simply via FTP.

The uploaded file exceeds the permitted size

What you see

When trying to upload the plugin via the WordPress administrator panel, you see the message.

Are you sure you want to do this?

Please try again.

Note: this text is taken from WordPress 4.7, the error message looks differently in older versions.

Solution

Check the maximum upload file size settings. The easiest way to do this is to go to the Upload New Media page. The maximum upload file size will be specified at the very bottom of the page. For example: "Maximum upload file size: 3 MB.".

The maximum file size must be larger than that of the ZIP archive with the plugin.

In order to change this setting, contact the host technical support and ask them to increase the size of files allowed for uploading (for example, up to 20 Mb).

In cases where a member of technical support does not know what to do or you would like to make changes on your own, find the php.ini file and make two changes. The php.ini file is usually located in /etc/php/apache2/php.ini (however, it can be located somewhere else depending on the server’s operating system and configuration).

Two settings need to be changed in the file. They can have various values but post_max_size must not be less than upload_max_filesize. You can set any number, for example, 1024M (gigabyte).

Note: after making changes in the file, restart the web server or PHP-FPM (depending on the server’s configuration) for new settings to come into effect. If everything was done correctly, then you will see a different value on the Upload New Media page.

Sometimes, these settings can be specified several times in various locations (for example, in the .htaccess file or other PHP configurations) and values can be rewritten from php.ini. This setting can also be redefined by some WordPress plugins or even a theme (although, it is highly unlikely).

upload_max_filesize = 3M
post_max_size = 3M

Inactive settings page

What you see

One of the settings pages of our plugin cannot be opened/accessed.

Reason

Such an issue occurs when using HHVM and its settings.

Solution

Add the line below to the HHVM configuration.

hhvm.libxml.ext_entity_whitelist = file,http

A more detailed description and discussion of the problem is available here.

Wp-admin is blocked

What you see

Updates for styles are not delivered. New themes do not appear. The editor has stopped working. The plugin shows that the subscription has expired and the editor cannot be opened.

Reason

Setka’s API failed to deliver updates to the site with updated CSS and JS files, as well as failing to update information on the subscription renewal. This can occur for several reasons:

  • When API accessed the site, the server was unavailable (switched off, heavily loaded, no Internet access) or malfunctioning.

  • Access to the wp-admin/admin-post.php file was blocked from the server’s side or by WordPress.

  • The current version of the plugin is too old and not supported by Setka’s current API.

  • The domain name you entered is incorrect. Make sure, that the link to your domain name is valid. If your website works on https://, make sure that the URL starts with https://.

Solution

Check with the host’s technical support whether a network firewall is active or other access restrictions to the wp-admin/admin-post.php file are enabled. External connections to this file must be permitted for everything to work correctly.

Plugins can also block access. For example, some plugins restrict access to files in the wp-admin folder if the user is not authorized. Lockdown WP Admin is one of such plugins.

POST, GET, PUT and other similar queries to the wp-admin/admin-post.php file must be permitted. A more detailed description of this file and relevant queries are available in the WordPress codex.

In order to check the possibility to connect manually, please open the http://your-domain.com/wp-admin/admin-post.php page, having specified your domain. If the web-inspector on the Resources tab at the Request & Response section reads ‘Status OK, Code 200’ , then everything is most likely fine.

Installed Lockdown WP admin plugin

This is a special case of the problem described above. However, if the Lockdown plugin is used by many users, we examine this case separately.

Solution

Write the following code in any other plugin, theme, or mu-plugin.

function lockdown_wp_admin_no_check_files_2016_12_29($files) {
   $files[] = 'admin-post.php';
   return $files;
}
add_filter('no_check_files', 'lockdown_wp_admin_no_check_files_2016_12_29');

Check the code’s functionality by opening the example.com/wp-admin/admin-post.php page. If a white page opens up, then everything works fine. If you see the 404 page, then the code did not work. It is possible if you added it to a file that was not connected to WordPress.

Styles and fonts do not work

What you see

When viewing the site outside CMS, you can see that the makeup of posts ‘falls apart’ and all elements from Setka Editor have no styles (i.e. a post looks like a simple text).

Reason

All CSS and JS files in the theme were not activated according to the common WP practice, hence third-party plugins cannot add or remove the necessary files.

Solution

There are two solutions to this problem:

  • Correct the CSS and JS files connection logic inside the theme according to WordPress developers’ recommendations. This approach achieves the same result as what we have now, i.e. this approach does not impose technical restrictions. Remove all hard-connected CSS and JS files inside the raw_header.php file (usually, files of such type in themes are named ‘header.php’), and remove all logic for their addition to separate files. Add the call of the wp_head() function inside the section.

  • If you do not want to rewrite a theme, then activate CSS from Setka Editor manually. There are two ways to do this, however, we have done it as described below on the test site. We created an additional file called setka-editor-resources.php. It is connected to raw-header.php. Contents of the file with comments are given below.

Note 1. The method described below only enables a CSS file. In order to enable TypeKit fonts, it is necessary to enable their JS in a similar manner:

registered['setka-editor-theme-resources'] ) ) {
      $url =& $wp_styles->registered['setka-editor-theme-resources']->src;
      ?>

Note 2. A link to CSS is stored in the setka_editor_theme_resource_css option. It can be acquired manually by means of get_option(setka_editor_theme_resource_css).

// Prior to the call, it is recommended to check if the class for prevention of fatal errors in PHP exists
$css = new Setka\Editor\Admin\Options\ThemeResourceCSS\Option();
// Returns only one type of data (if there is no link, then an empty line will be returned)
$url = $css->getValue();
// or (false can be returned if there is no value)
$url = $css->getValueRaw();

There is no Setka Editor tab when adding a new post

First, make sure that:

  • Setka Editor plugin is installed and activated (Plugins > Installed plugins).

  • Setka Editor is enabled for Posts (Setka Editor > Settings):

If you still see:

instead of

Please, take a screenshot of a browser console in Developer mode (CTRL+SHIFT+I) and send it to us.

What you may also see

Setka Editor tab is not available for already created posts and opens for only new posts.

Reason

Setka Editor blocks a built-in TinyMCE editor - this is how we prevent posts, created in Setka, from being changed in other editors.

Anyway, some other plugins do try to run TinyMCE on an editing page and this how the inconsistency appears: Setka Editor cannot get started while TinyMCE is on while TinyMCE is not able to launch due to Setka Editor's block.

Solutions

1. Use the latest WordPress version with Gutenberg editor

There are no such issues detected while using Gutenberg editor for WordPress since it has no need in TinyMCE.

You will not resolve this issue by updating WordPress to the Gutenberg version while using the Classic Editor plugin.

2. Disable forced block for TinyMCE

You can turn off the code that blocks TinyMCE. To do that, add the following part to a code of any MU-plugin on your website:

function disableRichEditRunner()
{
    remove_filter('user_can_richedit', array('Setka\Editor\Admin\Service\RichEditRunner', 'userCanRichEdit'));
}
add_action('wp_loaded', 'disableRichEditRunner');

The editor does not start. "Mixed Content" error appears in the console

Setka Editor is not launching on the editing page, admin panel shows the following error:

Images and other non-text content may disappear from posts. The browser shows an insecure content error:

The console shows an error that looks like this:

Mixed Content: The page at *' was loaded over HTTPS, but requested
an insecure image "". This request has been blocked; the content must
be served over HTTPS.

Reason

Editor files and/or post images are loaded over HTTP, whereas the site itself is loaded over HTTPS. The browser detects this inconsistency and considers the content distributed over HTTP, insecure. Insecure content is being blocked automatically.

Solutions

Forcibly load editor files from Setka CDN

Activate the force loading of style and editor files from Setka CDN — thus you would not be depending on file paths on your own server.

To do so, go to the Setka Editor plugin settings, activate the Enable Setka CDN files item, and save changes:

Use an SSL-plugin for WordPress

  1. If you are already using such a plugin, make sure that the latest version is installed.

  2. If the images are still not loading, try to use another plugin, e.g. Really Simple SSL.

  3. In some cases, after correcting inconsistencies in the HTTP and HTTPS protocols, you may need to reinstall the Setka Editor plugin.

Manually set file paths via SSH

To manually search and replace HTTP with HTTPS, you will need SSH access to a site server.

Step 1. Connect to a server via SSH

On macOS and Linux, with the Terminal app:

ssh user@site-domain.com

Where user is your username and site-domain.com is your site address.

On Windows, you will need to install and configure an SSH-client, such as PuTTY.

Step 2. Replace the protocol from HTTP to HTTPS

1. Go to a site folder, with the cd command:

cd /path/to/site

The path to a site can be specified by your hosting provider.

2. Find and replace all the rows with mentions of HTTP. The command below will just show values, but not replace them. Check the values. If the result is correct, launch the command without the --dry-run key.

Download wp-cli:

curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar

Then launch the command from point 2 this way:

How to change a post's default editor

In some cases, a post, created with Setka Editor, may switch to the default WordPress Visual editor. E.g., it happens in outdated versions of the Setka Editor WordPress plugin. Switching to the default editor breaks the post layout.

To switch the post from default Visual editor to Setka Editor, download wp-cli and connect to a server via SSH. Then execute this command in the site's folder:

wp post meta POST_ID _setka_editor_use_editor 1

POST_ID unique WordPress post identifier.

If getting back to default Visual editor is needed, execute this command:

wp post meta delete POST_ID _setka_editor_use_editor

More on WordPress commands

How to generate a diagnostic report

Sometimes log files of the Setka Editor WordPress plugin are needed to solve the problem. To download it:

1. Go to Setka Editor plugin settings.

2. Open the Support tab and click on Generate diagnostic report button:

3. Save the report file and attach it to a letter for our support team.

Last updated