ClassicPress / ClassicPress-v2

NOT READY FOR PRODUCTION.
GNU General Public License v2.0
13 stars 4 forks source link

🐞 Edit Post in Visual is "blank" and mce-editor button is stacked (one under other) #284

Open byrevx opened 10 months ago

byrevx commented 10 months ago

Expected behavior

Edit Post in Visual must have text visible and editor button must be aligned to the left.

Current behavior

Edit Post in Visual is "blank" (hidden) and mce-editor button is left-stacked (one under other) I try with Firefox and Chrome, same problem.

Possible solution

Edit Post in Visual is "blank" and after debuging I see inline-css: .mce-panel {visibility: hidden;} to solve I add in wp-includes/css/editor.min.css and wp-includes/css/editor.css .mce-panel {visibility: visible;}

To solve mce button stacked (one under other) if using Visual Editor I add in wp-includes/css/editor.min.css and wp-includes/css/editor.css .mce-btn {float: left;}

Steps to reproduce bug

Edit post and try to switch from Text to Visual!

Context

Changing wp-includes/css/editor.css it is the simplest and fastest solution that I have found. I do not know in detail about editor!

ClassicPress version

2.0.0+nightly.20231115

PHP version

7.4

Can you help?

I can help test a solution

KTS915 commented 10 months ago

I am not seeing this, but I'm using PHP 8.2.

byrevx commented 10 months ago

Tested now with 8.0 and 8.1 , same problem.

Text mode; 2023-11-17 10_51_48-Add New Post β€Ή Stirile Altfel - Scurt Pe Doi β€” ClassicPress β€” Mozilla Firefox

Visual Mode: 2023-11-17 10_52_19-Add New Post β€Ή Stirile Altfel - Scurt Pe Doi β€” ClassicPress β€” Mozilla Firefox

Dubugging: 2023-11-17 10_54_26-Edit Post β€œTest” β€Ή Stirile Altfel - Scurt Pe Doi β€” ClassicPress β€” Mozilla Firefo

Removing inline css visibility: hidden; from mceu_23 (id) the information and buttons are visible, except that they are arranged vertically, they are not aligned to the left, but but adding in includes/css/editor.css the following rule .mce-btn {float: left;} everything is ok.

viktorix commented 10 months ago

@byrevx thanks for reporting. Are there any errors in the console?

byrevx commented 10 months ago

@byrevx thanks for reporting. Are there any errors in the console?

Uh, thanks for giving me a tip, it didn't occur to me to look in the console. It seems that I had a mixed context, http with https, it was a newly installed site and I use Cloudflare for ssl.

ClassicPress Address (URL) and Site Address (URL) were both with http, I changed to https and added to wp-config.php

$_SERVER['SERVER_PORT'] = 443;
$_SERVER['REQUEST_SCHEME'] = "https";
$_SERVER['HTTPS']='on';

of the 3 lines above, one must remain: $_SERVER['SERVER_PORT'] = 443; or $_SERVER['HTTPS']='on';

otherwise I can't log in.

So theoretically it's not really a bug, it depends on the fact that the browser no longer allows mixed content, theoretically it's my mistake.

P.S. It would be useful to have a notice-warning of the "nag" type that would display after installation, in the dashboard, the fact that mixed content (http + https) is being used, as well as displaying a link (help) or information on how to solve the problem.