Error when page not found

A place to discuss and receive support for LCMS (Little Content Management System)

Postby Aoirthoir » Fri Oct 06, 2006 12:07 pm

LCMS as advertised checks for a page and if it exists feeds that page. It the include statement is in the file then it is wrapped in the look of the LCMS interface. Finally if no page is found there is an error. Typically this would be an ordinary 404 error. Currently this is what I get..so it is close..I like that it is wrapped in the LCMS interface. I am curious if there is some setting though to display a page instead of the following error. (Perhaps combining with the 404.html that my provider lets me use...I will have to look that up again to see their method and if the two methods, .htaccess rerouting and df rerouting, can be combined.)

Here is the error:

Fatal error: Call to a member function val() on a non-object in /myhome/mydomain/lcms/templates_c/default/%%D7^D73^D73BB5E8%%MainTemplate.html.php on line 5


I will play around with it on my own..it would be nice to reroute 404 and other error codes to a page right in the pages table itself..that would be slick.

Thank you kindly.

Oh and thanks for the LCMS its FANTASTIC. Everyone here loves it. If I can figure out how to wrap my DF apps in it...then that will finalize everything I need for a front end (the look and feel I mean).
Aoirthoir
 
Posts: 420
Joined: Wed Dec 31, 1969 5:00 pm

Postby njw » Sun Oct 08, 2006 7:57 am

I agree - although I could also argue that pages shouldn't be missing if we do our job properly!!!
njw
 
Posts: 280
Joined: Wed Dec 31, 1969 5:00 pm

Postby Aoirthoir » Sun Oct 08, 2006 12:33 pm

Aye...however Mr. Neil, if someone types in a URL that they think is there..they would get the same error..or if they mistyped it...say

http:mysite.com/boookmarks.html instead of bookmarks.html

You get the idea:)

However this is a minor issue...I am in love with LCMS and Dataface..cant wait until the Documentor is out so I can start incorporating other portions of the DF docs into it...
Aoirthoir
 
Posts: 420
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Tue Oct 10, 2006 12:21 pm

The 404 problem is an easy fix... I'll take care of that for the next release.. used to work.. i must have broken it when I was getting ready for release...

-Steve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby njw » Sat Nov 18, 2006 12:33 pm

Hi Steve

Any chance of a workaround for this? I have links left on Google from the old site where the pages no longer exist. The ability to just redirect to the front page would be fine.

Many thanks

Neil
njw
 
Posts: 280
Joined: Wed Dec 31, 1969 5:00 pm

Postby Aoirthoir » Sat Nov 18, 2006 1:21 pm

Hi Neil.

You could use soft links on the old site to the new. Use this format

ln -s /path.to.new.file /path.to.old.file

Then google should work fine. However, if the file is stored in the LCMS dataface and not actually a file system file, I am not sure if that will work or not. But if it is a real file it should work no problem.
Aoirthoir
 
Posts: 420
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Sun Nov 19, 2006 3:10 am

The general best practice when moving pages is to add redirects to your .htaccess file.

E.g. if the page foo.php was moved to bar.php, then you would add the following to the beginning of your .htaccess file:

Code: Select all
Redirect Permanent foo.php http://yourdomain.com/bar.php


-Steve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby njw » Sun Nov 19, 2006 8:48 am

Thanks guys. The missing pages were html ones, not LCMS. I'll try these ideas and see what works easiest!

Thanks again

Neil
njw
 
Posts: 280
Joined: Wed Dec 31, 1969 5:00 pm

Postby njw » Sun Nov 19, 2006 8:58 am

The redirect worked fine Steve - needed a / in front of the foo.php for anyone else using this.

Many thanks

Neil
njw
 
Posts: 280
Joined: Wed Dec 31, 1969 5:00 pm

Postby njw » Tue Mar 20, 2007 11:14 am

Any idea when I will be able to set up a proper 404 page please? Otherwise site working fine!

Thanks

Neil
njw
 
Posts: 280
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Tue Mar 20, 2007 12:28 pm

Hi Neil,

The 404 page thing will actually be a quick fix, but it isn't really on my radar right now.Ê I'll be doing some work to my own LCMS sites in May and June - so there is a good chance that I'll get fed up enough while doing that to make the fix.
Best regards
Steve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby njw » Tue Mar 20, 2007 1:22 pm

Thanks Steve. I'm a bit distracted by work at the moment too!!!
njw
 
Posts: 280
Joined: Wed Dec 31, 1969 5:00 pm


Return to LCMS Discussion

Who is online

Users browsing this forum: No registered users and 15 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved