Page 1 of 1

Problem with news not working since enabling pretty urls

Posted: Wed Sep 12, 2012 11:58 am
by swarfega
Today I decided to enable pretty urls on my website (thriplow.org.uk) which for the most part work in the menu manager on the left.

However news links dont work. Clicking on the news menu link just takes me back to the front page. Clicking on any of the latest news posts in the front page right column takes me to the link but theres no article.

I am currently using cmsms 1.11.1.

Content of .htaccess:

Code: Select all

ErrorDocument 404 /cms/index.php?page=error404

<IfModule php5_module>
  php_value include_path /ZendGdata
</IfModule>

# ------------------------
# BEGIN Optional settings

Options -Indexes
Options +FollowSymLinks
DirectoryIndex /cms/index.php
RewriteBase /cms
RewriteEngine on

# no www rewrite rule
RewriteCond %{HTTP_HOST} !^thriplow.org.uk$ [NC]
RewriteRule ^(.*)$ http://thripow.org.uk/$1 [L,R=301]
#
# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
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 ^(.+)$ index.php?page=$1 [QSA]

#Adds .thriplow to categories
#RewriteCond %{HTTP_HOST} ^thriplow.org.uk/cms$ [OR]
#RewriteCond %{HTTP_HOST} ^www.thriplow.org.uk/cms$
#RewriteRule ^news/category/([0-9]+)/(.+)$ index.php?mact=News,cntnt01,default,0&cntnt01detailpage=59&cntnt01category_id=$1&cntnt01returnid=59 [NC,L]
RewriteRule ^cms/category/([0-9]+)/(.+)$ index.php?mact=News,cntnt01,default,0&cntnt01detailpage=59&cntnt01category_id=$1&cntnt01returnid=59 [NC,L]
#RewriteRule ^cms/category/([0-9]+)/(.+).thriplow index.php?mact=News,cntnt01,default,0&cntnt01detailpage=59&cntnt01category_id=4&cntnt01returnid=59 [NC,L]
Content of config.php:

Code: Select all

<?php
# CMS Made Simple Configuration File
# Documentation: /doc/CMSMS_config_reference.pdf
#
$config['php_memory_limit'] = '100000000';
$config['process_whole_template'] = 'false';
$config['debug'] = false;
$config['output_compression'] = '';
$config['timezone'] = 'Europe/London';
$config['dbms'] = 'mysql';
$config['db_hostname'] = 'localhost';
$config['db_username'] = '***';
$config['db_password'] = '***';
$config['db_name'] = '***';
$config['db_port'] = 0;
$config['db_prefix'] = 'cms_';
$config['persistent_db_conn'] = '';
$config['use_adodb_lite'] = '1';
$config['root_url'] = 'http://thriplow.org.uk/cms';
$config['ssl_url'] = 'https://thriplow.org.uk/cms/';
$config['root_path'] = '/var/www/vhosts/thriplow.org.uk/httpdocs/cms';
$config['admin_dir'] = 'admin';
$config['previews_path'] = '/var/www/vhosts/thriplow.org.uk/httpdocs/cms/tmp/cache';
$config['uploads_path'] = '/var/www/vhosts/thriplow.org.uk/httpdocs/cms/uploads';
$config['uploads_url'] = 'http://thriplow.org.uk/cms/uploads';
$config['default_upload_permission'] = '664';
$config['use_smarty_php_tags'] = '';
$config['auto_alias_content'] = true;
$config['url_rewriting'] = 'mod_rewrite';
$config['page_extension'] = '';
$config['query_var'] = 'page';
$config['image_manipulation_prog'] = 'GD';
$config['image_transform_lib_path'] = '/usr/bin/ImageMagick/';
$config['image_uploads_path'] = '/var/www/vhosts/thriplow.org.uk/httpdocs/cms/uploads/images';
$config['image_uploads_url'] = 'http://thriplow.org.uk/cms/uploads/images';
$config['ssl_uploads_url'] = '/uploads';
$config['locale'] = 'en-gb';
$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';
?>
I would be grateful for any help.

Re: Problem with news not working since enabling pretty urls

Posted: Wed Sep 12, 2012 12:04 pm
by Jos
Are the news articles expired perhaps?

Re: Problem with news not working since enabling pretty urls

Posted: Wed Sep 12, 2012 12:33 pm
by swarfega
There are about 4 that are expired but most are still active.

Re: Problem with news not working since enabling pretty urls

Posted: Wed Sep 12, 2012 7:15 pm
by Dr.CSS
T^ry adding an extension to config file and use the default htaccess in doc folder to see if news works then you can try adding your tweak to htaccess...

Re: Problem with news not working since enabling pretty urls

Posted: Wed Sep 12, 2012 9:21 pm
by swarfega
Thanks for that, managed to get the news entry in the menu manager to work. But if you click on the list of news articles on the right column, the post appears to be empty.

Re: Problem with news not working since enabling pretty urls

Posted: Thu Sep 13, 2012 7:17 pm
by Dr.CSS
Did you customize the News detail template, what does it look like..?

Re: Problem with news not working since enabling pretty urls

Posted: Fri Sep 14, 2012 11:44 pm
by psy
I also had a problem with CMSMS 1.11.1 and pretty URLs with News.

Solved it by updating the Routes table. See http://forum.cmsmadesimple.org/viewtopi ... +more+link

hth
psy

Re: Problem with news not working since enabling pretty urls

Posted: Sat Sep 15, 2012 8:58 am
by swarfega
Thank you! Updating routes fixed the issue.