Wordpress page/text editor not working after update to CentOS 7.6

Issues related to applications and software problems
Post Reply
ralf
Posts: 132
Joined: 2005/11/25 20:10:20

Wordpress page/text editor not working after update to CentOS 7.6

Post by ralf » 2018/12/06 12:52:12

I updated two days ago to the latest Centos 7.6 release on my server on which and I run a Wordpress based website.
Before the CentOS update, the visual editor in Wordpress worked just fine. No problems at all with Wordpress.

Today, the editor now only shows "white text" and the buttons in the editor are gone.
This is a "well-known" issue in Wordpress, and I checked all reported remedies for this : https://www.newtonbaba.com/white-text-a ... al-editor/
I tried all, and none of them fixed the problem.
As the problem showed up after the CentOS update, and I cannot not find any other reason for the issue on the web, this makes me think the issue is related to the CentOS upgrade.

Does anyone have any similar problems and what did you do to mitigate this annoying flaw?
For now, I copy the "white text" into another seperate editor, do my changes, and copy the text back into to wordpress editor, but it's not optimal...

Thanks for any hint!

Ralf

lightman47
Posts: 1522
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: Wordpress page/text editor not working after update to CentOS 7.6

Post by lightman47 » 2018/12/06 14:03:44

While hesitant to 'throw this out there', my nvidia card (with kmod-nvidia drivers) did strange things until I uninstalled kmod-nvidia. I have a GeForce GTX 1050 Ti and I was running kmod-nvidia with bumblebee. My top & bottom bars disappeared, as well as my background, dropdown menus didn't work right, and other irritations.

May not be you issue, but food for thought.

ralf
Posts: 132
Joined: 2005/11/25 20:10:20

Re: Wordpress page/text editor not working after update to CentOS 7.6

Post by ralf » 2018/12/06 15:29:15

Thanks for the input!
I know an update may cause unexpected things, but in 10 years I have only once faced a serious bug in a CentOS release update, so it is not likely, but I cannot exclude it at least and there is this coincidence of matching the timeline .....
As to this case, I don't have any nvidia rpm on my server, so this should be a different case altogether.

Thanks anyhow for the feedback!
Anyone else?

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Wordpress page/text editor not working after update to CentOS 7.6

Post by TrevorH » 2018/12/06 16:20:47

Check your httpd logs for errors.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

ralf
Posts: 132
Joined: 2005/11/25 20:10:20

Re: Wordpress page/text editor not working after update to CentOS 7.6

Post by ralf » 2018/12/06 18:02:26

Thanks Trevor!

I found this one in the var/log/httpd/ssl_error_log file, when accessing the editor on post97 in Wordpress:

[Thu Dec 06 18:42:30.326639 2018] [access_compat:error] [pid 12780] [client 192.168.1.93:56348] AH01797: client denied by server configuration: /var/www/html/wp-includes/js/tinymce/wp-tinymce.php, referer: https://backupserver.hartings.se/wp-adm ... ction=edit
[Thu Dec 06 18:42:30.747268 2018] [access_compat:error] [pid 12780] [client 192.168.1.93:56348] AH01797: client denied by server configuration: /var/www/html/wp-includes/js/tinymce/wp-tinymce.php, referer: https://backupserver.hartings.se/wp-adm ... ction=edit
[root@backupserver httpd]#

These two errors refer both to a function in Wordpress (tinymce) which is indeed related to the editor and the toolbar of the editor.
The error includes "client 192.168.1.93:56348", which is the IP number of the backupserver I am looking at. Does it mean that the firewall need to be open for port 56348 ? I checked the log and it seems that Wordpress seems to use a large range of such ports for the same thing. I found references to port around 46000 to 59000. Do I need to open up all those ports in the firewall??

FYI, I use Letsencrypt certificates for the production server (hartings.se) and the same are copied to the (clone) backupserver, which then of course complains that these certificates are issued for hartings.se and not for backupserver.hartings.se. But I guess the editor error here is not related to this?

The error_log file mentions this after "systemctl restart httpd", which is not serious?? Is this correct?
[Thu Dec 06 18:41:40.368070 2018] [mpm_prefork:notice] [pid 10081] AH00170: caught SIGWINCH, shutting down gracefully
[Thu Dec 06 18:41:41.499724 2018] [suexec:notice] [pid 12779] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Dec 06 18:41:41.548968 2018] [auth_digest:notice] [pid 12779] AH01757: generating secret for digest authentication ...
[Thu Dec 06 18:41:41.549894 2018] [lbmethod_heartbeat:notice] [pid 12779] AH02282: No slotmem from mod_heartmonitor
[Thu Dec 06 18:41:41.589564 2018] [mpm_prefork:notice] [pid 12779] AH00163: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.2.13 configured
-- resuming normal operations
[Thu Dec 06 18:41:41.589656 2018] [core:notice] [pid 12779] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'

I cannot find any other errors.

Not being an expert on php, is there anything strange with the standard Wordpress file wp-tinymce.php (see below)?

Any comments are appreciated!

wp-tinymce.php:

<?php
/**
* Disable error reporting
*
* Set this to error_reporting( -1 ) for debugging.
*/
error_reporting(0);

$basepath = dirname(__FILE__);

function get_file($path) {

if ( function_exists('realpath') )
$path = realpath($path);

if ( ! $path || ! @is_file($path) )
return false;

return @file_get_contents($path);
}

$expires_offset = 31536000; // 1 year

header('Content-Type: application/javascript; charset=UTF-8');
header('Vary: Accept-Encoding'); // Handle proxies
header('Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT');
header("Cache-Control: public, max-age=$expires_offset");

if ( isset($_GET['c']) && 1 == $_GET['c'] && isset($_SERVER['HTTP_ACCEPT_ENCODING'])
&& false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') && ( $file = get_file($basepath . '/wp-tinymce.js.gz') ) ) {

header('Content-Encoding: gzip');
echo $file;
} else {
// Back compat. This file shouldn't be used if this condition can occur (as in, if gzip isn't accepted).
echo get_file( $basepath . '/tinymce.min.js' );
echo get_file( $basepath . '/plugins/compat3x/plugin.min.js' );
}
exit;
Last edited by ralf on 2018/12/06 18:15:41, edited 1 time in total.

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Wordpress page/text editor not working after update to CentOS 7.6

Post by TrevorH » 2018/12/06 18:14:48

Check the apache debugging page for that error message : https://wiki.apache.org/httpd/ClientDen ... figuration
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

ralf
Posts: 132
Joined: 2005/11/25 20:10:20

Re: Wordpress page/text editor not working after update to CentOS 7.6

Post by ralf » 2018/12/06 18:23:56

Thanks Trevor. I'll certainly check that!

But why would this have become an issue after the update to CentOS 7.6 ?
I didn't have any such issues just a couple of days ago, and I didn't change the setup of the server in teh mean time?

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Wordpress page/text editor not working after update to CentOS 7.6

Post by TrevorH » 2018/12/06 22:07:56

Well for a start the httpd package got updated and that owns /var/www/html among other things and it will reset the ownership and permissions of the files and directories it owns to the permissions defined in the rpm.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

ralf
Posts: 132
Joined: 2005/11/25 20:10:20

Re: Wordpress page/text editor not working after update to CentOS 7.6

Post by ralf » 2018/12/07 15:13:15

SOLVED!

The key was indeed the httpd.conf file.
I had included a couple of directory access limitations (recommended by several Wordpress users), among which the wp-includes directory:

<DirectoryMatch ^.*/wp-includes/>
<Files *.php>
Deny from all
</Files>
</DirectoryMatch>

This ALSO prevented me from accessing the wp-tinymce.php file which is in there....
So I added an exception for this file. The whole section reads now:

<DirectoryMatch ^.*/wp-includes/>
<Files *.php>
Deny from all
</Files>
<Files wp-tinymce.php>
Order allow,deny
Allow from all
Satisfy any
</Files>
</DirectoryMatch>

This solved the problem with the Wordpress visual editor!

Thanks again Trevor for pointing me to the right place!

Post Reply