(closed) Site showing different content to admin??

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
ncd
Forum Members
Forum Members
Posts: 57
Joined: Tue Sep 29, 2009 1:12 am

(closed) Site showing different content to admin??

Post by ncd »

Hi there,

I've just migrated my testing site from a sub-domain to the main domain, and it's only working partially - I did a fresh install and updated the config file etc but while the home page (with the default cmsms home content), global content blocks and site menu is displaying correctly, the links aren't working - yet in the admin section all the pages/content is there??

Please take a look - jamiesonscomau

I followed these instructions: http://wiki.cmsmadesimple.org/index.php/How_to#How_to_move_your_CMSms_installation_to_a_new_server_.281.29

I didn't think it was necessary to export/import the db as it didn't actually have to move server - but I tried it anyway, and despite them being the same, I've tried linking to both db's from the config file - jamiesons_com_au_cms and jamiesons_com_au_new - but neither pull up the correct content...

Here's my config.php if you need it:

Code: Select all

<?php

$config['php_memory_limit'] = '';

$config['process_whole_template'] = false;


$config['debug'] = false;

$config['output_compression'] = false;

#-----------------
#Database Settings
#-----------------

$config['dbms'] = 'mysql';
$config['db_hostname'] = 'localhost';
$config['db_username'] = 'w1633';
$config['db_password'] = '*****';
$config['db_name'] = 'jamiesons_com_au_cms';
#Change this param only if you know what you are doing
$config["db_port"] = '';


#If app needs to coexist with other tables in the same db,
#put a prefix here.  e.g. "cms_"
$config['db_prefix'] = 'cms_';

#Use persistent connections?  They're generally faster, but not all hosts
#allow them.
$config['persistent_db_conn'] = false;

#Use ADODB Lite?  This should be true in almost all cases.  Note, slight
#tweaks might have to be made to date handling in a "regular" adodb
#install before it can be used.
$config['use_adodb_lite'] = true;

#-------------
#Path Settings
#-------------

#Document root as seen from the webserver.  No slash at the end
#If page is requested with https use https as root url
#e.g. http://blah.com
$config['root_url'] = 'http://www.jamiesons.***.au';
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on')
{
$config['root_url'] = str_replace('http','https',$config['root_url']);
}

#Path to document root. This should be the directory this file is in.
#e.g. /var/www/localhost
$config['root_path'] = '/var/virtual/web/w1633/html';

#Name of the admin directory
$config['admin_dir'] = 'admin';

#Where do previews get stored temporarily?  It defaults to tmp/cache.
$config['previews_path'] = '/var/virtual/web/w1633/html/tmp/cache';

#Where are uploaded files put?  This defaults to uploads.
$config['uploads_path'] = '/var/virtual/web/w1633/html/uploads';

#Where is the url to this uploads directory?
$config['uploads_url'] = $config['root_url'] . '/uploads';


#---------------
#Upload Settings
#---------------

#Maxium upload size (in bytes)?
$config['max_upload_size'] = 2000000;

#Permissions for uploaded files.  This only really needs changing if your
#host has a weird permissions scheme.
$config['default_upload_permission'] = '664';

#------------------
#Usability Settings
#------------------

#Allow smarty {php} tags?  These could be dangerous if you don't trust your users.
$config['use_smarty_php_tags'] = false;

#Automatically assign alias based on page title?
$config['auto_alias_content'] = true;

#------------
#URL Settings
#------------

$config['url_rewriting'] = 'mod_rewrite'; // this is new from 1.6
$config['page_extension'] = '.html';
$config['use_hierarchy'] = true; // this will be the standard from 1.7
$config['query_var'] = 'page';


#--------------
#Image Settings
#--------------

$config['image_manipulation_prog'] = 'GD';
$config['image_transform_lib_path'] = '/usr/bin/ImageMagick/';

#Default path and URL for uploaded images in the image manager
$config['image_uploads_path'] = '/var/virtual/web/w1633/html/uploads/images';
$config['image_uploads_url'] = $config['root_url'] . '/uploads/images'; 


#------------------------
#Locale/Encoding Settings
#------------------------

$config['locale'] = '';

$config['default_encoding'] = 'utf-8';
$config['admin_encoding'] = 'utf-8';


$config['set_names'] = true;

$config['wiki_url'] = 'http://wiki.cmsmadesimple.org/index.php/User_Handbook/Admin_Panel';

?>
Clearly new to this... so hopefully I'm missing something obvious!

Your assistance is really appreciated!
Cheers,
Nick
Last edited by ncd on Mon Feb 22, 2010 7:54 am, edited 1 time in total.
replytomk3

Re: Site showing different content to admin??

Post by replytomk3 »

http://www.jamiesons.com.au/?page=our-team

Your config file is set up for pretty URLs, but your server (.htaccess) is not.
ncd
Forum Members
Forum Members
Posts: 57
Joined: Tue Sep 29, 2009 1:12 am

Re: Site showing different content to admin??

Post by ncd »

Ah.. ok thanks. Fixed that now I think!

Thought, any idea why the site wont display the content that's in the admin?

Cheers,
Nick
Last edited by ncd on Mon Feb 22, 2010 7:55 am, edited 1 time in total.
replytomk3

Re: Site showing different content to admin??

Post by replytomk3 »

No, you did not fix it!

Admin area: attach screenshot or PM me login info.
ncd
Forum Members
Forum Members
Posts: 57
Joined: Tue Sep 29, 2009 1:12 am

Re: Site showing different content to admin??

Post by ncd »

Really? I know the page isn't loading... but the links are looking pretty pretty aren't they?  :-[

So is this got anything to do with the default cmsms home content loading as my home page content? I thought this was more to do with the database??

I've PM'd you the login details - Thanks again!
replytomk3

Re: Site showing different content to admin??

Post by replytomk3 »

Your config.php file is configured for pretty URLs, but you also need to add code to your .htaccess code for the mechanism TO ACTUALLY WORK.

http://wiki.cmsmadesimple.org/index.php/User_Handbook/Installation/Optional_Settings

I can't do that with CMSMS login info, I would need FTP/hosting info for that.

Add the contents of the /doc/htaccess.txt file to .htaccess in the root directory.
ncd
Forum Members
Forum Members
Posts: 57
Joined: Tue Sep 29, 2009 1:12 am

Re: Site showing different content to admin??

Post by ncd »

Yep, my htaccess file is per the documentation - sorry, should have included it before:

Code: Select all

# Attempt to override some php settings, these settings may be helpful on some hosts if your
# default configuration does not meet CMS's minimum requirements, and your host
# has given your account appropriate permissions
#php_value upload_max_filesize "10M"
#php_value session_save_path "tmp/cache"

#php_flag magic_quotes_gpc Off
#php_flag register_globals Off
#php_flag session.use_trans_sid Off

# (this is important, so uncomment if your host permit)
#Options -Indexes
#ServerSignature Off
#
Options +FollowSymLinks
#
<IfModule mod_rewrite.c>
RewriteEngine on
#
#Sub-dir e.g: /cmsms
RewriteBase /

# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
# except for form POSTS
# RewriteCond %{REQUEST_URI} !/$
# RewriteCond %{REQUEST_URI} !\.
# RewriteCond %{REQUEST_METHOD} !POST$
# RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]
 
# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+).html$ index.php?page=$1 [QSA] 
Is this right?

I will PM you ftp details in case it's easier...

Cheers,
Nick
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Site showing different content to admin??

Post by Rolf »

ncd,

Are you by any chance on a Windows server?
Try mod_rewrite >> internal

On the homepage are some internal links which are hardcoded on index.php?page=.
You have to change this by hand.

Regards, Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
ncd
Forum Members
Forum Members
Posts: 57
Joined: Tue Sep 29, 2009 1:12 am

Re: Site showing different content to admin??

Post by ncd »

Hi Rolf!

Nope, linux server... so mod_rewrite >> internal is just for windows yeah?

Thanks!
ncd
Forum Members
Forum Members
Posts: 57
Joined: Tue Sep 29, 2009 1:12 am

Re: Site showing different content to admin??

Post by ncd »

Just to clarify what I'm struggling with, is if you look at http://www.businessbrokers.jamiesonscomau/about-us.html, you can see the pages are displaying correctly (except home)...

Yet, http://www.jamiesonscomau isn't... even though the admin pages ARE displaying the right content.

...and both sites are linking to the same db!

???

Thanks in advance.
Last edited by ncd on Mon Feb 22, 2010 7:57 am, edited 1 time in total.
ncd
Forum Members
Forum Members
Posts: 57
Joined: Tue Sep 29, 2009 1:12 am

Re: (closed) Site showing different content to admin??

Post by ncd »

I have closed this post for now as I had to put the old site back up as I'll have to try this again next week.

If anyone can confirm these steps for moving the cms from a subdomain to the primary domain, it would be very helpful:

1. Copy files across to root folder
2. Chmod directories
3. update config.php paths

Am I missing anything?
Thanks,
Nick
Post Reply

Return to “CMSMS Core”