cannot login and styles gone

Permalink 1 user found helpful
I have a problem with http://schrijfschoolnijmegen.nl/... which I built with Concrete 5 (it's now using version 5.6.0.2) for a client who maintains the content herself. She had made some changes and asked me to replace an image. However, I found I could no longer log in (404 error to login page) and also the styles have disappeared.

That is to say, as far as I can see (by using FTP) everything is still there but it is no longer found.

I had not been working on the site myself for quite some time, so the problem may have been caused by the client making an unfortunate move (although she usually only makes some minor textual changes and doesn't fiddle with themes or settings).

I have checked the forum but when I find similar issues and suggested solutions they are all a bit too technical for me to offer me clues I can work with. I guess it must be something to do with a path, but I don't know how and where I can check or change this.

I realize I'm working with legacy software and the theme is quite old too, so I've already decided to rebuild the site completely in the near future. However, for the time being I'd like to restore it.

The site is still there -although it looks a mess- and, as I said, I do have FTP access but no access to the dashboard.

I'd be very grateful for a hint!

Yola

Yola
View Replies:
stewblack23 replied on at Permalink Reply
stewblack23
Posting a link to the site will be helpful.
Yola replied on at Permalink Reply
Yola
Link to the site is in the first line of my messagehttp://schrijfschoolnijmegen.nl/...
weyboat replied on at Permalink Reply
weyboat
Your theme header.php file is calling the theme's css files using the wrong path?
The path in the header.php file is
<link rel="stylesheet" type="text/css" media="all" href="/index.php/tools/css/themes/diamond/general_styles.css">

It should be
<link rel="stylesheet" type="text/css" media="all" href="/packages/theme_diamond/themes/diamond/general_styles.css">
Yola replied on at Permalink Reply
Yola
Thank you for locating the error Weyboat.

But where do I change this? The header.php file in the theme folder has code to get the theme. It does not mention the path itself.

I compared this file to a copy of the original I keep on my computer and there appear to be no differences.

I could not find another php folder that specifies a path, I guess it is generated somehow but I don't know how this works.
weyboat replied on at Permalink Reply
weyboat
Post the contents of your theme header.php file so we can take a look for you..
EDIT
Post the contents of your htaccess file as well
Yola replied on at Permalink Reply
Yola
<?php  defined('C5_EXECUTE') or die(_("Access Denied.")); ?>
<!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">
   <head>
      <?php Loader::element('header_required'); ?>
      <link rel="stylesheet" type="text/css" media="all" href="<?=$this->getStyleSheet('general_styles.css');?>"  />
      <link rel="stylesheet" type="text/css" media="all" href="<?=$this->getStyleSheet('typography.css');?>"  />
      <script type="text/javascript" src="<?=$this->getThemePath()?>/js/menu_jquery.js"></script>
      <?php if (!Page::getCurrentPage()->isEditMode()): ?>
         <script type="text/javascript" src="<?=$this->getThemePath()?>/js/jquery.ui.js"></script>
      <?php endif; ?>      <script type="text/javascript" src="<?=$this->getThemePath()?>/shadowbox/shadowbox.js"></script>
      <script type="text/javascript">
         Shadowbox.init({
             players: ["html","img","swf","flv","qt","iframe"]
             });
Yola replied on at Permalink Reply
Yola
And here is the second one. Thank you for your help!


# -- concrete5 urls start --
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}/index.html !-f
RewriteCond %{REQUEST_FILENAME}/index.php !-f
RewriteRule . index.php [L]
</IfModule>
# -- concrete5 urls end --
weyboat replied on at Permalink Reply
weyboat
In your theme header.php file replace this
<link rel="stylesheet" type="text/css" media="all" href="<?=$this->getStyleSheet('general_styles.css');?>"  />
      <link rel="stylesheet" type="text/css" media="all" href="<?=$this->getStyleSheet('typography.css');?>"  />

With this
<!-- <link rel="stylesheet" type="text/css" media="all" href="<?=$this->getStyleSheet('general_styles.css');?>"  />
      <link rel="stylesheet" type="text/css" media="all" href="<?=$this->getStyleSheet('typography.css');?>"  /> -->
      <link rel="stylesheet" type="text/css" media="all" href="/packages/theme_diamond/themes/diamond/general_styles.css"  />
      <link rel="stylesheet" type="text/css" media="all" href="/packages/theme_diamond/themes/diamond/typography.css"  />

This might just get you up and running but it is not a full solution I think..
Yola replied on at Permalink Reply
Yola
Thank you Weyboat, but no...

I got back some colors but all in all the site looks worse that way. And I still cannot log in.

Could it have been infected somehow? Amongst recently changed files -very few- I detected a hfg php-file I couldn't place, and also a favicon. I checked here and there but couldn't find other inexplicable changes. And I ran a WSSA virus and malware check which found vulnerabilities because of older php-versions etc but nothing else.

I guess I'd better give up on this site and build another one, saves everybody time I think. [Yes I do have backups but a re-install of 5.6 makes little sense as there is no smooth transition to the more recent Concrete versions anyway.]

But it bothers me I have no idea how this could happen. It might happen again, with a big and complex site....

Thank you for your help!!
weyboat replied on at Permalink Reply
weyboat
Yes, I agree if you intend putting the site on the latest platform, it would be better to build the site from new (probably easier too)
Good Luck..
mnakalay replied on at Permalink Reply
mnakalay
actually, the path to your CSS file is correct except for the added index.php

For the main css file that is, typography.css is nowhere to be found.

Did you make sure your client didn't disable pretty URLs? If she did and the htaccess is still in place that could create that kind of problems
Yola replied on at Permalink Reply
Yola
Thank you for your suggestions. If my client did change something, she can't remember -she knows how to write but has no clue about websites and servers and URLs. I would have checked about pretty URLs if I could access the dashboard...

I checked, the stylesheets are all there, as far as I can see (I compared the theme files with a stand-alone copy). The problem seems to be that they are not retrieved. I cannot understand the code, I don't understand where the theme-path is defined. I see a command to 'get stylesheet', but I don't see anything that indicates where to go to get it.

If this was a big, complex and uptodate website I would study a little more and might find the error, eventually. But is is a small, simple website running on an old version of Concrete5. For me it is easier to rebuild it with the latest software. It's only 5 or 6 pages.

It would have been nice to restore the site for the time being. And I remain, of course, seriously annoyed that this happened overnight, and that I cannot understand what to do about it.

But I can live with that :-)

Thank you for your response.
weyboat replied on at Permalink Reply
weyboat
Try logging in at this location and make sure pretty urls is enabled.
http://schrijfschoolnijmegen.nl/login/...
Yola replied on at Permalink Reply
Yola
Sorry Weyboat, no luck, I get a 404 when I log in...
mnakalay replied on at Permalink Reply
mnakalay
you could try to comment out the htaccess bit and see if it solves the problem. If pretty url is disabled in the dashboard, that could solve the problem
Yola replied on at Permalink Reply
Yola
Thanks mnakalay, but that doesn't work either. I'll just rebuild the site, that's the best solution.

Thank you all for your help and suggestions!
mnakalay replied on at Permalink Reply
mnakalay
this time, make sure you don't leave your client the superuser account and only give her permissions for stuff she will not mess up with :)
Yola replied on at Permalink Reply
Yola
Yes, sure, you are right, I've lived and learned, and will be a lot stricter :-)