Page 1 of 1
css problem on admin
Posted: Thu Apr 10, 2008 10:23 am
by jd
Hi,
I have the following strange problem, for some unknown reason the css on the admin side is not showing up.
It's there, the permissions are right, but it's not shown.
Any ideas what might be the problem?
10x in advance!
Re: css problem on admin
Posted: Mon Apr 14, 2008 3:03 pm
by Pierre M.
Hello,
may be a hosting issue. Such a problem has been reported and answered SEVERAL times. Please search (via Google) the forum for : admin (panel), no style, no stylesheet...
Pierre M.
Re: css problem on admin
Posted: Tue Apr 15, 2008 7:19 pm
by SideshowBob
Aww, I love this issue! It's been around for ages and although it only affects a few people I wish the CMSMS gods would fix it!
See if this helps:
http://forum.cmsmadesimple.org/index.php/topic,14715.msg74707.html#msg74707
Bob
Re: css problem on admin
Posted: Tue Apr 15, 2008 7:32 pm
by Nullig
Is this a new install? upgrade?
Did it happen after you installed any new mods?
How many mods do you have installed?
Do you know what your php memory limit is?
Nullig
Re: css problem on admin
Posted: Wed Apr 16, 2008 5:46 am
by cubix
cant fix something that isnt a bug. chances are, its an incomplete upload of a module/core, or a memory issue.
Re: css problem on admin
Posted: Wed Apr 16, 2008 9:59 am
by SideshowBob
I couldn't agree more cupix.
Whilst the readfile issue isn't technically a bug it is something that affects a reasonable number of people and the "fix" only involves changing a few lines of code and has no other negative effects.
Perhaps an alternative could be to add the issue to the wiki or something...
Does version 2 still use readfile?
Bob
Re: css problem on admin
Posted: Wed Apr 16, 2008 5:37 pm
by Pierre M.
Hello Bob,
thank you for your link and your explainations about readfile().
Like Nullig and cubix I was thinking of memory/module/upload (in this order). Now, I've learned a new one : readfile.
You have a workaround if you assume well. But it is limited to one hosting context.
Shall readfile be switched to echo file_get_content ? I'm not sure. I'm not in the DevTeam, I'm not a PHP coder, but from what you tell us I think it is more a hosting parameters issue rather than a code/design bug. Switching may not be a solution for everyone : the same readfile vs fileget issue could become a fileget vs readfile when hosters limit fileget.
I trust the DevTeam to chose the right functions().
Pierre M.
Re: css problem on admin
Posted: Thu Apr 17, 2008 8:52 am
by SideshowBob
Hi Guys,
I hope I don't sound like a madman ranting on about this topic but if you search these forums for readfile you will find it cropping up time and again. Search Google for "readfile disabled" and you get an idea of how common it is.
Ted did comment (back in 2006) that he would see if it could be changed for the next release so maybe he rejected the idea or maybe he didn't get round to it. Although I'm sure he has slightly bigger issues on his mind at the momentÂ
http://forum.cmsmadesimple.org/index.php/topic,4792.0.html
kind regards,
Bob
Re: css problem on admin
Posted: Thu Apr 17, 2008 3:41 pm
by Pierre M.
SideshowBob wrote:
I hope I don't sound like a madman ranting on about this topic ... "readfile disabled"
I don't feel so, your posts are constructive
I don't know if there should be a new requirement (readfile not disabled, tokenizer not disabled, safe mode disabled) or if the code should be patched. Hopefully the DevTeam will answer this question, won't it ?
Pierre M.
Re: css problem on admin
Posted: Mon Apr 21, 2008 2:49 pm
by jd
Sorry guys,
but none of the things that I saw in the forum worked. That's why I posted this topic.
Any ideas what else can be done?
Re: css problem on admin
Posted: Mon Apr 21, 2008 4:13 pm
by Pierre M.
jd wrote:
but none of the things that I saw in the forum worked.
You haven't seen Nullig's questions above, have you ? I haven't seen your answers to them.
Pierre M.
Re: css problem on admin
Posted: Mon Apr 21, 2008 4:57 pm
by jd
Sorry... so here are the answers:
Is this a new install? upgrade?
none of the above. the hosting guys just upgrade the linux system and together with it the php to the latest one, available for suse
Did it happen after you installed any new mods?
no
How many mods do you have installed?
mods... hardly. just formbuilder
Do you know what your php memory limit is?
memory limit is 128M
I don't if this is connected, but recently I asked a question about UDT that stopped working (after the same upgrade).
anythings that maybe related between the two? (just as an idea - it might be totally not related)
10x guys in advance!
Re: css problem on admin
Posted: Mon Apr 21, 2008 5:01 pm
by Nullig
Can you post the code for the UDT? perhaps there's something in it that's causing the problem.
Nullig
Re: css problem on admin
Posted: Tue Apr 22, 2008 5:35 am
by jd
I removed the custom UDTs that I had and still I had the problem with the css on the admin.
Otherwise here is the UDT:
Code: Select all
global $config;
if(preg_match("!(.*)\/$!", $params['dir'], $matches)){
$params['dir'] = $matches[1];
}
if(preg_match("!^\/(.*)!", $params['dir'], $matches)){
$params['dir'] = $matches[1];
}
$dir_name = $config['root_path'] . DIRECTORY_SEPARATOR . $params['dir'];
$dir = opendir($dir_name);
$files = array();
$file_regexp = "#\\.((jpg)|(gif)|(png))$#i";
if(isset($params['fade']) && is_numeric($params['fade']) && $params['fade'] > 0){
$fade = $params['fade'];
}
else{
$fade = 0;
}
while ($file = readdir($dir)) {
if (preg_match($file_regexp, $file)){
$files[] = $file;
}
}
closedir($dir);
if ($params['shuffle'] == true){
shuffle($files);
}
$array_name = join("", explode("/", $params['dir']));
if($fade != 0){
?>
<__script__ type="text/javascript" src="<?=$config['root_url'];?>/lib/scriptaculous/prototype.js"></__script>
<__script__ type="text/javascript" src="<?=$config['root_url'];?>/lib/scriptaculous/scriptaculous.js"></__script>
<?
}
?>
<img id="<?=$params['imgid'];?>" src='<?=$params['dir']."/".$files[0];?>' alt='' />
<__script__ type="text/javascript">
<!--
var <?=$array_name;?>_array = new Array();
<?php
for ($i = 0; $i < count($files); $i ++){
echo "{$array_name}_array"."[$i] = new Image();\n";
echo "{$array_name}_array"."[$i].src = \"{$params['dir']}/{$files[$i]}\";\n";
}
?>
var <?=$array_name;?>_count = <?=count($files);?>;
var <?=$array_name;?>_id = '<?=$params['imgid'];?>';
var <?=$array_name;?>_index = 0;
<?
if($fade > 0){
?>
function image_switcher_<?=$array_name;?>(){
new Effect.Opacity(<?=$array_name;?>_id, {duration:<?=$fade;?>, from:1.0, to:0.0});
setTimeout("switch_src_<?=$array_name;?>()", <?=$fade*1000;?>);
}
function switch_src_<?=$array_name;?>(){
<?=$array_name;?>_index++;
<?=$array_name;?>_index %= <?=$array_name;?>_count;
var theimg = document.getElementById(<?=$array_name;?>_id);
theimg.src = <?=$array_name;?>_array[<?=$array_name;?>_index].src;
new Effect.Opacity(<?=$array_name;?>_id, {duration: <?=$fade;?>, from:0.0, to:1.0});
setTimeout("fadeSetTimeout_<?=$array_name;?>()", <?=$fade*1000;?>);
}
function fadeSetTimeout_<?=$array_name;?>(){
setTimeout("image_switcher_<?=$array_name;?>()", <?=$params['timeout']*1000;?>);
}
<?
}
else{
?>
function image_switcher_<?=$array_name;?>(){
<?=$array_name;?>_index++;
<?=$array_name;?>_index %= <?=$array_name;?>_count;
var theimg = document.getElementById(<?=$array_name;?>_id);
theimg.src = <?=$array_name;?>_array[<?=$array_name;?>_index].src;
setTimeout("image_switcher_<?=$array_name;?>()", <?=$params['timeout']*1000;?>);
}
<?
}
?>
setTimeout("image_switcher_<?=$array_name;?>()", <?=$params['timeout']*1000;?>);
-->
</__script>
<?php
Re: css problem on admin
Posted: Tue Apr 22, 2008 1:09 pm
by Pierre M.
jd wrote:
Is this a new install? upgrade?
none of the above. the hosting guys just upgrade the linux system and together with it the php to the latest one, available for suse
What package is this ? I'm not able to find a package list on Novell's site and on opensuse's site. May be you should ask the suse CMSms packager.
Pierre M.