CSS stylesheet are not included in admin editor

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
lholsti
New Member
New Member
Posts: 5
Joined: Tue Nov 09, 2010 6:19 pm

CSS stylesheet are not included in admin editor

Post by lholsti »

Hi,

I'm having problems getting stylesheets to load when editing content. I was intending to post this as a bug report, but then thought it might be better to post here first.

Here's the description:

CSS stylesheets are not included when editing content (pages) in admin. I've tried both setting the stylesheet in the extensions settings and in the template with the content block's cssname parameter.

The problem seems to be that the content_css field in the tinymce_config.js template is empty. For some reason the cms_stylesheet call returns an empty string.

I've tested the following code in tinymce_config.js
{if isset($mt_cssname) && $mt_cssname != ''}
css_name : '{$mt_cssname}',
content_css : '{cms_stylesheet name=$mt_cssname nolinks=1}',
{/if}

And viewing the result in the browser gives:
css_name : '21',
content_css : '',

So the $mt_cssname is filled in with the proper id, but the content_css field remains empty.

I also tried replacing the name parameter in the call with designid (in case the problem was using the wrong parameter), but the result was the same.
content_css : '{cms_stylesheet designid=$mt_cssname nolinks=1}',

I also tried adding debug_to_log calls in /plugins/function.cms_stylesheet.php and couldn't find the results in the log. This might imply that the cms_stylesheet function doesn't get called for some reason.

Hopefully the explanation is clear and detailed.

CMS Made Simple 2.0.1.1 “Adelaide”
MicroTiny 2.0
Post Reply

Return to “CMSMS Core”