Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: Administration after Login page no reload/refresh problem  (Read 454 times)

Henk

  • Newbie
  • *
  • Karma: 0
  • Posts: 5
Administration after Login page no reload/refresh problem
« on: December 16, 2012, 08:26:16 PM »

Hello,
I have a problem when I am login then the administration page does not reload/return.  ???
I need him to manually reload.
I miss the css stylesheet formatting.
Only text on the left side of the screen.
It is only in IE 9.0 is not in Chrome, Firefox and Safari.
Anyone have an idea?
Thank you.
Logged

sibas

  • Sr. Member
  • ****
  • Karma: 23
  • Posts: 451
    • www.simply4all.net
Re: Administration after Login page no reload/refresh problem
« Reply #1 on: December 16, 2012, 08:44:28 PM »

Can you give more information?
Is this setup working in localhost or is uploaded to some host.
The case that is working in some browsers and not in ie seems like you have error in css.
Logged

Henk

  • Newbie
  • *
  • Karma: 0
  • Posts: 5
Re: Administration after Login page no reload/refresh problem
« Reply #2 on: December 16, 2012, 10:05:36 PM »

I go to the login page, fill it in and when I click the login button duk I get is not always the correct page layout.
See screendump from the leftside off the screen.
link: http://www.example.nl/cms/administration/ page is adminstration.



The source is in the directory /cms

I am ussing this htaccess code:

<IfModule mod_php4.c>
    php_value session.use_trans_sid 0
</IfModule>
<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>
RewriteEngine On
RewriteBase /cms
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*) $1 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?category=$1 [L]


Sometimes it works and sometimes not?
If I refresh the page then it is good.
Logged

sibas

  • Sr. Member
  • ****
  • Karma: 23
  • Posts: 451
    • www.simply4all.net
Re: Administration after Login page no reload/refresh problem
« Reply #3 on: December 17, 2012, 08:55:27 AM »

Please see your html tags, all tags must close
for example <head></head>
Logged

Henk

  • Newbie
  • *
  • Karma: 0
  • Posts: 5
Re: Administration after Login page no reload/refresh problem
« Reply #4 on: December 17, 2012, 11:19:59 AM »

Yes, in the Template missing the </head> tag  :(
Now its works, but when i add this:
<link rel="icon" href="images/favicon.ico" type="image/x-icon"/>
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon"/>
The same problem, no refresh the page.
No problem, no icon.

Thanks!
Logged

sibas

  • Sr. Member
  • ****
  • Karma: 23
  • Posts: 451
    • www.simply4all.net
Re: Administration after Login page no reload/refresh problem
« Reply #5 on: December 17, 2012, 11:50:01 AM »

Henk if you have add the
<link rel="icon" href="images/favicon.ico" type="image/x-icon"/>
change it to
<link rel="icon" href="favicon.ico" type="image/x-icon"/>
move favicon.ico to root directory
close this page and clear your browser history, after go to your site and you see your icon. :)

Please someone to move this topic outside of bug reports
Logged

Henk

  • Newbie
  • *
  • Karma: 0
  • Posts: 5
Re: Administration after Login page no reload/refresh problem
« Reply #6 on: December 17, 2012, 08:06:24 PM »

Too bad, I thought it had worked.  :-[
But no, not yet. When I want to login page:
http://www.website.nl/cms/login/ I get: Page not found
Oops! This link does not seem to work!
In the taskbar page http://www.website.nl/cms/administration/ ERROR!!
If I refresh the page, then it's fine.
Browser IE 9.0 Apache Server with Ubuntu Linux
ISP = www.pcextreme.nl sNews CMS in sub folder.
It is only with Internet Explorer 9. All other browsers work fine.
Anyone have an idea?  ???
Thanks ..
Logged

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: Administration after Login page no reload/refresh problem
« Reply #7 on: December 18, 2012, 08:42:38 AM »

oy, IE... it is what it is. 8)
One thing you could try is to change the <base href="" /> line in function title() in snews.php, to a conditional statement (or two actually, one for IE, one for not IE), like so:

Code: [Select]
echo '<!--[if IE]><base href="'._SITE.'"></base><![endif]-->
<!--[if !IE]>--><base href="'._SITE.'" /><!--<![endif]-->';

I would also suggest moving this block from the top of function title() to directly below the "echo title" line, so the whole thing would look like this:

Code: [Select]
echo '<title>'.$title.'</title>
<!--[if IE]><base href="'._SITE.'"></base><![endif]-->
<!--[if !IE]>--><base href="'._SITE.'" /><!--<![endif]-->
... (more code)
though strictly speaking it's probably not necessary, it just makes things more ordered.

Additionally you could check that the DOCTYPE line in your index.php is unbroken, e.g is one continuous line, like so:
Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">(by default that line has a line break in it before the uri, and IE is known to have had problems with that in earlier versions. I don't know if this thing affects IE9 or not but could be worth a shot, and I don't really know what the line break is for anyway, there's no real point to it other than possibly cosmetic.)

Anyway, things to try.

Minor point about the favicon string. There should be a blank space before the closing /> tag, in other words, the correct line as per Sibas' suggestion earlier should be:
Code: [Select]
<link rel="icon" href="favicon.ico" type="image/x-icon" />
Logged

Henk

  • Newbie
  • *
  • Karma: 0
  • Posts: 5
Re: Administration after Login page no reload/refresh problem
« Reply #8 on: December 18, 2012, 11:15:46 AM »

Hello Fred, thanks for your help.
I have all the adjustments made​​.
Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<?php title(); ?>
<meta name="robots" content="index,follow" />
<meta name="author" content="HdB ShopON " />
<link rel="stylesheet" type="text/css" href="css/style.css" />
    <link rel="icon" href="favicon.ico" type="image/x-icon" />
</head>
Code: [Select]
function title() {
global $categorySEF, $_DESCR, $_KEYW, $_TITLE, $_NAME, $_XNAME;
    echo '<base href="'._SITE.'" />';
    $title =  $_TITLE ? $_TITLE.' - ' : '';
    $title .= $_NAME ? $_NAME.' - ' : '';
    $title .= $_XNAME ? $_XNAME.' - ' : '';
    if (check_category($categorySEF) == true && $categorySEF != 'administration' && $categorySEF)
    $title .= l($categorySEF).' - ';
    $title .= s('website_title');
echo '<title>'.$title.'</title>
        <!--[if IE]><base href="'._SITE.'"></base><![endif]-->
        <!--[if !IE]>--><base href="'._SITE.'" /><!--<![endif]-->
<meta http-equiv="Content-Type" content="text/html; charset='.s('charset').'" />
<meta name="description" content="'.(!empty($_DESCR) ? $_DESCR : s('website_description')).'" />
<meta name="keywords" content="'.(!empty($_KEYW) ? $_KEYW : s('website_keywords')).'" />';
if (_ADMIN) {
echo '<script type="text/javascript">';
include('js/admin.js');
echo '</script>';
}
}
htaccess
Code: [Select]
<IfModule mod_php4.c>
    php_value session.use_trans_sid 0
</IfModule>
<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>
RewriteEngine On
RewriteBase /cms
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*) $1 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?category=$1 [L]
But it still does not work.  >:(
What I find strange, it is only on the administration funtion, all other funtions work well.  ???
This is the only one that does not work: http://www.shopon.nl/cms/administration/ and it is
strange that only the main page http://www.shopon.nl/cms/ the icon in the taskbar is .
At the other pages you will see the default IE 9 icon and not the favicon?
I think the problem is in the function administration or htaccess rewrite?
It seems that in IE 9 .. had problems to rewrite?
See:
http://evolpin.wordpress.com/2011/02/25/ie9-compatibility-and-the-meta-tag/
Also deleted the history and cache of IE9.

I continue to search for a solution, it must still be possible?
I'm open to suggestions.
thanks all.
« Last Edit: December 18, 2012, 11:47:29 AM by Henk »
Logged

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: Administration after Login page no reload/refresh problem
« Reply #9 on: December 19, 2012, 12:50:07 AM »

Hi Henk,
First of all you should correct the code in the <head>. You currently have three base href lines, for example, and no printed title on the Home page, so that should tell you something is up.

1. Change the title() function in snews.php to this:
Code: [Select]
function title() {
global $categorySEF, $_DESCR, $_KEYW, $_TITLE, $_NAME, $_XNAME;
    $title =  $_TITLE ? $_TITLE.' - ' : '';
    $title .= $_NAME ? $_NAME.' - ' : '';
    $title .= $_XNAME ? $_XNAME.' - ' : '';
    if (check_category($categorySEF) == true && $categorySEF != 'administration' && $categorySEF)
    $title .= l($categorySEF).' - ';
    $title .= s('website_title');
echo '<title>'.$title.'</title>
        <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
        <!--[if IE]><base href="'._SITE.'"></base><![endif]-->
        <!--[if !IE]>--><base href="'._SITE.'" /><!--<![endif]-->
<meta http-equiv="Content-Type" content="text/html; charset='.s('charset').'" />
<meta name="description" content="'.(!empty($_DESCR) ? $_DESCR : s('website_description')).'" />
<meta name="keywords" content="'.(!empty($_KEYW) ? $_KEYW : s('website_keywords')).'" />';
if (_ADMIN) {
echo '<script type="text/javascript">';
include('js/admin.js');
echo '</script>';
}
}

I have no good answer to why administration doesn't work in IE 9. What I can tell from browsing the site is that the .htaccess directives are working properly, so from that point of view there's no problem.

There appears to be an issue with the title() function code though, since the site name isn't printed on any page. Not sure why, at a cursory glance the code seems ok.
Logged

annavetisy

  • Newbie
  • *
  • Karma: 0
  • Posts: 1
Re: Administration after Login page no reload/refresh problem
« Reply #10 on: January 29, 2013, 09:10:51 PM »

hello!
I'm new to snews cms.I've just installed it but now I can't enter the admin page cause I need to login. But how can I login if I'm not registered and there's no registration link in the website?
There's only login page
Logged

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: Administration after Login page no reload/refresh problem
« Reply #11 on: January 30, 2013, 01:05:55 AM »

You should read the information in the file readme.html that is included in the sNews package. The login part  towards the bottom of the file should tell you what you need. (Hint: enter the username and password given in the readme file, solve the math captcha, press the submit button.)
Logged