[Solved] 404 Error on News Lnks with Mod_Rewrite On - 1.10.3
Posted: Wed Jan 23, 2013 11:18 pm
Hi there.
To give the full story, we had 1.7.3 of CMS Made Simple installed and I was tasked with updating the version to match our sister site which was on version 1.10.3.
I read a help page on CMS Made Simple's site stating that it's best to update one main version at a time - so I did. I went from 1.7.3 to 1.8 then to 1.9 then to 1.10 and then I got bold and tried 1.11 (since I was updating, I may as well go to the latest I figured).
I tested the site after each update just to see if the main page loads. I hadn't thought to test the news links.
I had experienced errors when updating to 1.11 (regarding the cms_routes table (which was not created as I had the "create tables" checkbox unchecked because it would wipe out my site, right?) So I tried creating the table manually and it populated somewhat and there was trouble trying to insert a record so I said ok I will just revert back to 1.10 and then upgrade to the latest release of that which was 1.10.3 which is good because now both sites were on the same version of CMS Made Simple which was the original goal.
So now my site was working again.
It was then brought to my attention that the URLs that contained .html were working (it seems that there were changes to the config file that wiped out previous settings regarding the "url_rewriting" and "page_extension" values which were previously "mod_rewrite" and ".html" respectively. It seems now that the "page_extension" setting is now an all or nothing value wherein in the past it was optional? I'm not sure how this works, but just explaining that pages worked with or without the .html previously (least to my recollection - I could be wrong).
So anyway, the values that I have in place now are "mod_rewrite" and "/" to match the sister site's values for consistency. I also put into place in the .htaccess a redirect for any URL that contains .html to strip it out so those links that were not working (because they contained ".html" now were working.
It was brought to my attention today though, that none of the live news articles links were working. I am referring to when I go to the news page which has the list of articles in which each article can be clicked to take you to a detail page. It gives me a 404 error.
Here is how my news page is set up:
<h1>News</h1>
{news category="News" summarytemplate="news" detailtemplate="news"}
I had tried searching through the forums for an answer to my question before posting - I had found several things similar, but nothing quite exact (my apologies if this is already answered elsewhere, but I tried). One thing that I had read was checking the spelling of the category and the templates. I noticed that the category on the page was spelled "news" instead of "News" so I made the n uppercase and that didn't change anything (not sure if it is case sensitive, but was worth a try).
My summary and detail templates are practically identical to the sister site's working templates so I don't think that they are to blame here.
Any insight or information would be greatly appreciated. I am curious if upgrading to 1.11 and downgrading to 1.10 and then upgrading to 1.10.3 had broken something?
The news article links seem to have had ended with ".html" which is how we stumbled upon the articles not working because I was scouring the pages for any html code containing ".html" on an internal link and I was removing it for consistency purposes and I mentioned to a coworker that a link was not working (thinking at first that it was due to the article being expired perhaps, but it was not the case).
If I turn "mod_rewrite" off then the news article links work by the way which is very interesting.
The last thing to note here is that we have a 3rd sister site which was on version 1.7 which I upgraded sequentially as well from 1.8 to 1.9 to 1.10 to 1.10.3 and the news article link there correctly links to a new working page.
Let me know if you need any additional information from me - I will be glad to provide it.
Thank you kindly for your assistance.
Regards,
-Michael
To give the full story, we had 1.7.3 of CMS Made Simple installed and I was tasked with updating the version to match our sister site which was on version 1.10.3.
I read a help page on CMS Made Simple's site stating that it's best to update one main version at a time - so I did. I went from 1.7.3 to 1.8 then to 1.9 then to 1.10 and then I got bold and tried 1.11 (since I was updating, I may as well go to the latest I figured).
I tested the site after each update just to see if the main page loads. I hadn't thought to test the news links.
I had experienced errors when updating to 1.11 (regarding the cms_routes table (which was not created as I had the "create tables" checkbox unchecked because it would wipe out my site, right?) So I tried creating the table manually and it populated somewhat and there was trouble trying to insert a record so I said ok I will just revert back to 1.10 and then upgrade to the latest release of that which was 1.10.3 which is good because now both sites were on the same version of CMS Made Simple which was the original goal.
So now my site was working again.
It was then brought to my attention that the URLs that contained .html were working (it seems that there were changes to the config file that wiped out previous settings regarding the "url_rewriting" and "page_extension" values which were previously "mod_rewrite" and ".html" respectively. It seems now that the "page_extension" setting is now an all or nothing value wherein in the past it was optional? I'm not sure how this works, but just explaining that pages worked with or without the .html previously (least to my recollection - I could be wrong).
So anyway, the values that I have in place now are "mod_rewrite" and "/" to match the sister site's values for consistency. I also put into place in the .htaccess a redirect for any URL that contains .html to strip it out so those links that were not working (because they contained ".html" now were working.
It was brought to my attention today though, that none of the live news articles links were working. I am referring to when I go to the news page which has the list of articles in which each article can be clicked to take you to a detail page. It gives me a 404 error.
Here is how my news page is set up:
<h1>News</h1>
{news category="News" summarytemplate="news" detailtemplate="news"}
I had tried searching through the forums for an answer to my question before posting - I had found several things similar, but nothing quite exact (my apologies if this is already answered elsewhere, but I tried). One thing that I had read was checking the spelling of the category and the templates. I noticed that the category on the page was spelled "news" instead of "News" so I made the n uppercase and that didn't change anything (not sure if it is case sensitive, but was worth a try).
My summary and detail templates are practically identical to the sister site's working templates so I don't think that they are to blame here.
Any insight or information would be greatly appreciated. I am curious if upgrading to 1.11 and downgrading to 1.10 and then upgrading to 1.10.3 had broken something?
The news article links seem to have had ended with ".html" which is how we stumbled upon the articles not working because I was scouring the pages for any html code containing ".html" on an internal link and I was removing it for consistency purposes and I mentioned to a coworker that a link was not working (thinking at first that it was due to the article being expired perhaps, but it was not the case).
If I turn "mod_rewrite" off then the news article links work by the way which is very interesting.
The last thing to note here is that we have a 3rd sister site which was on version 1.7 which I upgraded sequentially as well from 1.8 to 1.9 to 1.10 to 1.10.3 and the news article link there correctly links to a new working page.
Let me know if you need any additional information from me - I will be glad to provide it.
Thank you kindly for your assistance.
Regards,
-Michael