TinyMCE Not Rendering Content per CMSMS Stylesheets

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
jlkane

Re: TinyMCE Not Rendering Content per CMSMS Stylesheets

Post by jlkane »

So a new day has dawned, and while I'm still depressed to have to abandon TinyMCE, I feel as if I have no choice but to do so.

I like MicroTiny, but two limitations cropped up as soon as I began working on this implementation that pushed me away, so I headed for TinyMCE certain that more Micro-limitations would make me grateful to have done so as time went on. Now I must revisit those limitations and either solve them or work around them ...or I can try to find an alternative WYSIWYG editor.

So let me start with that question:
Is there a viable alternative to the Tiny twins, for use with CMSMS? A quick search of the module repository suggests that there is not. Am I missing something obvious? (Wasn't there an FCKeditor module once upon a time?)
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Contact:

Re: TinyMCE Not Rendering Content per CMSMS Stylesheets

Post by paulbaker »

jlkane wrote:Good plan. I created a super-basic template and a super-basic stylesheet. The page is rendered correctly through the front end but, alas, still fails to render correctly in TinyMCE.
I was sufficiently intrigued by this and so fired up an existing 1.11.9 site with TinyMCE, I altered the CMSMS-linked stylesheet to show H1 in blue.

Code: Select all

h1 {
color: Blue;
}
The front end showed the h1 headings in blue. The TinyMCE edit screens showed the h1 headings in blue. And when I switched to MicroTiny, those edit screens showed the h1 headings in blue as well.

See screenshots.
TinyMCE
TinyMCE
tinymce.jpg (14.48 KiB) Viewed 4047 times
MicroTiny
MicroTiny
microtiny.jpg (7.61 KiB) Viewed 4047 times
This sounds like different behaviour to your system. Can you do the same test?

And give system info too, here's mine.

----------------------------------------------
Cms Version: 1.11.9
Installed Modules:
CMSMailer: 5.2.2
CMSPrinting: 1.0.5
FileManager: 1.4.3
MenuManager: 1.8.6
MicroTiny: 1.2.5
ModuleManager: 1.5.5
News: 2.14.1
Search: 1.7.11
ThemeManager: 1.1.8
TinyMCE: 2.9.12
Showtime: 3.3
CGExtensions: 1.38.1
CGCalendar: 1.13.3
Gallery: 1.6.1
Notifications: 1.1
Statistics: 1.1.3
ListIt2: 1.4
ListIt2GovernorTeam: 1.4
Archiver: 0.2.6

Config Information:
php_memory_limit:
process_whole_template:
max_upload_size: 32000000
url_rewriting: mod_rewrite
page_extension:
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true

Php Information:
phpversion: 5.4.21
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 0
E_DEPRECATED: 0
memory_limit: 128M
max_execution_time: 120
output_buffering: 4096
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 8M
upload_max_filesize: 32M
session_save_path: /tmp (1777)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)

Server Information:
Server Api: cgi-fcgi
Server Db Type: MySQL (mysqli)
Server Db Version: 5.1.73
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable
Server Time Diff: No filesystem time difference found

----------------------------------------------
To copy System Information to the forum:
https://docs.cmsmadesimple.org/troubles ... nformation

CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
JohnnyB
Dev Team Member
Dev Team Member
Posts: 731
Joined: Tue Nov 21, 2006 5:05 pm

Re: TinyMCE Not Rendering Content per CMSMS Stylesheets

Post by JohnnyB »

Paul, I wonder if you try that same test but with CSS that styles an element via a class or id and if that would give the same results.

I am just now vaguely remembering that it is possible that the linked Stylesheets are only parsed for class names for the Styles dropdown box. That way, an editor can assign class names to elements.
And, the extra CSS styles option under the Advanced tab is for setting CSS for the WYSIWYG editor's look and feel.
-I may be remembering wrong, but wanted to mention it anyway.
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo

--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--
jlkane

Re: TinyMCE Not Rendering Content per CMSMS Stylesheets

Post by jlkane »

paulbaker wrote:This sounds like different behaviour to your system. Can you do the same test?
Yes. I created a super-simple template, linked to a single super-simple stylesheet.

(Paul's suggestion of creating a simple template and stylesheet that do not use any clever selectors is an excellent one, as it eliminates a whole flock of possibilities. The fact that both of my installations fail with this super-simple setup is very telling.)

As seen through the frontend:
http://simply-effective.com/TinyMCE_pro ... ontend.jpg

As seen in MicroTiny:
http://simply-effective.com/TinyMCE_pro ... roTiny.jpg

And as seen in TinyMCE:
http://simply-effective.com/TinyMCE_pro ... inyMCE.jpg
paulbaker wrote:And give system info too...
Here's mine:

Cms Version: 1.11.11

Installed Modules:

TinyMCE: 2.9.12
FileManager: 1.4.5
MenuManager: 1.8.6
MicroTiny: 1.2.7
ModuleManager: 1.5.8


Config Information:

php_memory_limit:
process_whole_template:
max_upload_size: 128000000
url_rewriting: mod_rewrite
page_extension: .html
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true


Php Information:

phpversion: 5.4.35
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 0
E_DEPRECATED: 0
memory_limit: 512M
max_execution_time: 30
output_buffering: On
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 128M
upload_max_filesize: 128M
session_save_path: /tmp (1777)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)


Server Information:

Server Api: cgi-fcgi
Server Db Type: MySQL (mysqli)
Server Db Version: 5.6.17
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable
Server Time Diff: No filesystem time difference found


----------------------------------------------
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Contact:

Re: TinyMCE Not Rendering Content per CMSMS Stylesheets

Post by paulbaker »

JohnnyB wrote:Paul, I wonder if you try that same test but with CSS that styles an element via a class or id and if that would give the same results.
When I add

Code: Select all

.blue {
color: blue;
}
to the linked stylesheet, in TinyMCE I see "blue" in the Styles list and I can select a paragraph (for example) and make it blue. Works fine and shows up blue in the WYSIWYG. The same paragraph shows up blue in MicroTiny.
To copy System Information to the forum:
https://docs.cmsmadesimple.org/troubles ... nformation

CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
JohnnyB
Dev Team Member
Dev Team Member
Posts: 731
Joined: Tue Nov 21, 2006 5:05 pm

Re: TinyMCE Not Rendering Content per CMSMS Stylesheets

Post by JohnnyB »

Ok.
I noticed the Advanced setting called, "Load stylesheet for content (recommended)" which implies that it will load them for the edit area.

Also, there is the setting called, "Strip Background Tags From CSS:
This options tries to remove background-type settings from the stylesheet." under the Settings tab.

I didn't look at the module code to see what it looks for in a "background-type settings" and wonder if that could be an issue for jlkane
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo

--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Contact:

Re: TinyMCE Not Rendering Content per CMSMS Stylesheets

Post by paulbaker »

jlkane wrote:And as seen in TinyMCE:
http://simply-effective.com/TinyMCE_pro ... inyMCE.jpg
So, TinyMCE is completely ignoring even simple style declarations.

There's got to be something wrong with your TinyMCE installation, hasn't there? What server do you use? How do you install CMSMS, by FTP? Missing TinyMCE library file(s) or similar?

Have you fiddled with any of the settings in Extensions -> TinyMCE WYSIWYG? e.g. unticking the Advanced tab "Load stylesheet for content" tick box would (probably) give the behaviour you are seeing.
To copy System Information to the forum:
https://docs.cmsmadesimple.org/troubles ... nformation

CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
jlkane

Re: TinyMCE Not Rendering Content per CMSMS Stylesheets

Post by jlkane »

paulbaker wrote:There's got to be something wrong with your TinyMCE installation, hasn't there?
I've been certain from the start that there must be, but I've been unable to find it.
paulbaker wrote:What server do you use?
Both installations I've created this week are on InMotion Hosting. The server is ecbiz156.
paulbaker wrote:How do you install CMSMS, by FTP?
The installation that spawned the problem was a Softaculous install. To rule that method out as an issue, I did a manual installation last night, expanding the CMSMS archive file on the server itself, rather than expanding it on my PC and transferring the files by FTP. To rule out a problem specific to 1.11.11, I installed 1.11.10 manually ...and remarkably that manual installation of 1.11.10 came up with exactly the same (mis)behavior. Remarkable.
paulbaker wrote:Missing TinyMCE library file(s) or similar?
I can't say. I ran the checksum on last night's manual install and the result was fine. Is there a way for me to verify the TinyMCE library files specifically?
paulbaker wrote:Have you fiddled with any of the settings in Extensions -> TinyMCE WYSIWYG? e.g. unticking the Advanced tab "Load stylesheet for content" tick box would (probably) give the behaviour you are seeing.
I feel as if I've tried every setting in an effort to get this to work. When last night's manual install came up "broken" right out of the box, that's when I felt that all was lost. But in the clear cold light of day, that makes it seem even MORE likely that the root cause lies outside CMSMS, perhaps in the server environment. Do you see anything worrisome in:
Apache version 2.2.29?
PHP version 5.4.35?
or anything else in the system info I provided?

PS
Thank you both for sticking with me through this!
JohnnyB
Dev Team Member
Dev Team Member
Posts: 731
Joined: Tue Nov 21, 2006 5:05 pm

Re: TinyMCE Not Rendering Content per CMSMS Stylesheets

Post by JohnnyB »

I once used an inmotion VPS... There isn't anything out of the ordinary with those. But, maybe check your PHP settings by looking at the phpinfo() to make sure allow_url_fopen is enabled and maybe even test with allow_url_include enabled.

It is possible that more than 30 seconds is needed for the max_execution_time --- I doubt that is an issue, but I generally set that at least 60 seconds for my CMSMS sites.

The last thing I would check are the files and folders group and owner and chmod permission. Be sure the group and owner is for your account and not 'nobody' or something like that.

The only other thing I can think of is to make sure PHP error_log is enabled and saving to a file that you can access.

You can also try enabling debug in the config.php file to see if there is a point of failure as tinymce is loading on a page.
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo

--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Contact:

Re: TinyMCE Not Rendering Content per CMSMS Stylesheets

Post by paulbaker »

Yeah, the only thing I can think of is some weird permissions issue. Yes, we can see the stylesheets OK through browsers. But perhaps whatever process is running TinyMCE doesn't have permission to read those files?

But that permissions stuff is all a bit beyond me, so I'm basically stumped. ???

Are you able to change host?
To copy System Information to the forum:
https://docs.cmsmadesimple.org/troubles ... nformation

CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
jlkane

Re: TinyMCE Not Rendering Content per CMSMS Stylesheets

Post by jlkane »

JohnnyB wrote:But, maybe check your PHP settings by looking at the phpinfo() to make sure allow_url_fopen is enabled and maybe even test with allow_url_include enabled.
Okay... now you have me operating in an area I haven't prowled before...
...but I successfully ran phpinfo() on this new InMotion Hosting server and (bouyed with new confidence) I also ran it on a long-running CMSMS installation I have on a Bluehost server. Found that allow_url_fopen was enabled on both, but that allow_url_include was only enabled on the (working) Bluehost install. So I enabled allow_url_include in the php.ini file on the InMotion server, cleared the CMSMS cache, logged out of the Admin and back in ...but no joy.

Sigh...

Now there are other subtle differences between the php environments on these two servers. Care to suggest other variables that I might want to look at?

(And I'll take a look at your other suggestions this aft.)
JohnnyB
Dev Team Member
Dev Team Member
Posts: 731
Joined: Tue Nov 21, 2006 5:05 pm

Re: TinyMCE Not Rendering Content per CMSMS Stylesheets

Post by JohnnyB »

Care to suggest other variables that I might want to look at?
If you can post copies of the working site's phpinfo and the non working site's phpinfo, I'll take a look and see.
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo

--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--
jlkane

Re: TinyMCE Not Rendering Content per CMSMS Stylesheets

Post by jlkane »

JohnnyB wrote:If you can post copies of the working site's phpinfo and the non working site's phpinfo, I'll take a look and see.
Working Site:
http://simply-effective.com/TinyMCE_pro ... g_Site.pdf

Broken Site:
http://simply-effective.com/TinyMCE_pro ... n_Site.pdf

(My gratitude sent separately.)

Would it be good if I were to simply copy the php.ini file from the working site to the broken site? (I'm sure there are many variables set elsewhere in the environment, so this approach might not be sufficient.)
JohnnyB
Dev Team Member
Dev Team Member
Posts: 731
Joined: Tue Nov 21, 2006 5:05 pm

Re: TinyMCE Not Rendering Content per CMSMS Stylesheets

Post by JohnnyB »

Would it be good if I were to simply copy the php.ini file from the working site to the broken site?
No -- but you can borrow portions of the settings for inspiration ;)

**** Edit those PDF files to smudge out any path reference to your account name...
For example, hide "account-name" --- /home/account-name/blah/blah

If malicious users know your account name, that is half of what they need to access cpanel and FTP, etc....
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo

--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--
jlkane

Re: TinyMCE Not Rendering Content per CMSMS Stylesheets

Post by jlkane »

JohnnyB wrote:**** Edit those PDF files to smudge out any path reference to your account name...
For example, hide "account-name" --- /home/account-name/blah/blah

If malicious users know your account name, that is half of what they need to access cpanel and FTP, etc....
Thank you. (I'm too trusting.) Simpler to take them offline now that you've got them than to edit them. If you need access to them again, please let me know and I'll get them to you another way.
Locked

Return to “Modules/Add-Ons”