Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-03-26 21:38:15

LeeUmm
Member
From: Hamilton, Ontario
Registered: 2005-04-22
Posts: 91
Website

2 Problems: Cache Problem and Viewing Articles By Categories

1. If I delete an article, it still shows up on the main website in article list. When I click the permalink, it returns a 404. It is gone from the admin side. I disabled my cache and things display as normal. This is in Firefox.

The only thing I can think I’ve changed is I switched asy_sitemap to generate automatically. I’ve since disabled the plugin entirely and I get the same cache issues.

2. I use clean urls and I can’t view articles by category. I get the proper url genereated (domain.com/category/name/) but when I click on it, it displays nothing. I have assigned proper categories to articles. I’m using the rss_suparchive plugin, I’ve disabled it and still can’t view the list using normal txp tags.

Offline

#2 2007-03-27 01:59:40

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: 2 Problems: Cache Problem and Viewing Articles By Categories

  1. Send “Last-Modified” header? preference
  2. Do you have an article tag in your default section’s page? Do you have any sections set to not display on the front page?

Offline

#3 2007-03-27 02:04:54

LeeUmm
Member
From: Hamilton, Ontario
Registered: 2005-04-22
Posts: 91
Website

Re: 2 Problems: Cache Problem and Viewing Articles By Categories

1. It was set to yes, I put it on no and that solved the problem. By default it is on yes, correct? I never touched that setting and things were working fine until today. Been developing the site for about 2 weeks.

2. Yes I do have an article tag on my default section. All of my sections won’t display on the front page. I realize the problem now. A work around without having them display on the front page? My front page is a ‘static’ page. All pages are ‘static’ except for the blog section.

Offline

#4 2007-03-27 02:09:52

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: 2 Problems: Cache Problem and Viewing Articles By Categories

1. It was set to yes, I put it on no and that solved the problem. By default it is on yes, correct? I never touched that setting and things were working fine until today. Been developing the site for about 2 weeks.

Default is on, and you shouldn’t experience problems with it turned on. The most likely culprit is a browser or proxy cache setting.


Alex

Offline

#5 2007-03-27 02:17:12

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: 2 Problems: Cache Problem and Viewing Articles By Categories

For the first, this setting should normally not cause the problem you experienced. It seems a couple circumstances (like an article being deleted) were overlooked. I’ve just checked in a fix in the development version of Textpattern, so this should be resolved in the next stable release. In the meantime, when you notice that changes you’ve made to the site don’t seem to appear, set this setting back to no and it will “fix” itself.

It’s intended use is to help prevent refetching of content from the database if nothing has been changed (save you some bandwidth). It is, though, a relatively new feature which still has some kinks to be worked out. It doesn’t harm anything to leave this setting off altogether, if you wish.

For the second, if it is a specific article or section you have displaying, then you’d do something like:

<txp:if_category>

	<!-- we want to view categories -->
	<txp:article />

<txp:else />

	<txp:if_search>
		<!-- we want to view search results -->

		<txp:article />

	<txp:else />

		<!-- otherwise, show a specific article -->
		<txp:article_custom id="your_article_ID_number" />

		<!-- alternatively, show articles from a specific section -->
		<txp:article_custom section="your_article_section_name" />

	</txp:if_search>

</txp:if_category>

Offline

#6 2007-03-27 02:40:14

LeeUmm
Member
From: Hamilton, Ontario
Registered: 2005-04-22
Posts: 91
Website

Re: 2 Problems: Cache Problem and Viewing Articles By Categories

I’ll keep that information in mind regarding the caching issue.

I’m still having problems with the article categories though. I’ve added in an if_category tag to my default page and then put in an article tag specifically for that, but it doesn’t display the articles. If I put normal text within the if tag, it will render that, so the tag is working correctly.

Is this an issue with the fact I have all my other sections to not display on the default page?

Here is my code:

<txp:output_form form=“template_header” />

<txp:if_section name=“articles”>
<h1>Articles</h1>

<txp:article allowoverride=“0” form=“articles” limit=“5” pgonly=“0” searchall=“0” searchsticky=“0” />

<txp:if_article_list> <div id=“articleNav”> <span><txp:older><txp:text item=”&laquo; Older Articles” /></txp:older> &nbsp; &nbsp;<txp:newer><txp:text item=“Newer Articles &raquo;” /></txp:newer></span> </div>
</txp:if_article_list>

<txp:if_individual_article>
<txp:related_articles label=“Related Articles You Might Find Interesting:” limit=“3” match=“Category1” section=“articles” sort=“rand()” />
</txp:if_individual_article>

<txp:else />

<txp:if_category> Hello <txp:article /> <txp:else /> <txp:article /> </txp:if_category>

</txp:if_section>

<txp:output_form form=“template_footer” />

edit sorry for the formatting issue. It’s late here and I’m beat. It’s probably something simply I am missing.

Last edited by LeeUmm (2007-03-27 02:42:57)

Offline

#7 2007-03-27 02:43:32

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: 2 Problems: Cache Problem and Viewing Articles By Categories

Is this an issue with the fact I have all my sections to not display on the default page?

Yes, exactly. Set them all to display on the front page.

Offline

#8 2007-03-27 03:14:41

LeeUmm
Member
From: Hamilton, Ontario
Registered: 2005-04-22
Posts: 91
Website

Re: 2 Problems: Cache Problem and Viewing Articles By Categories

As I mentioned in one of my previous posts, I can’t do that as this is a mainly static website. It’s about 5 pages and then one section for articles which is dynamic. I can’t have the articles displaying on the front page.

Is there any type of work around for this? As I also mentioned, I’m using the rss_suparchive plugin. I can get monthly archives to work with that, but not by category still.

Offline

#9 2007-03-27 05:32:28

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: 2 Problems: Cache Problem and Viewing Articles By Categories

Offline

#10 2007-03-27 18:55:38

LeeUmm
Member
From: Hamilton, Ontario
Registered: 2005-04-22
Posts: 91
Website

Re: 2 Problems: Cache Problem and Viewing Articles By Categories

Right, thanks. It was late last night when I was working on it and didn’t realize I had to change your code up a bit to get it work. I had to put the article_custom within the if_category tag. That’s why I posted after asking if it was a problem with my articles not on the front page. After a night’s sleep I figured it out this morning :)

Thanks for spending time on my issues though. Appreciate it.

Offline

Board footer

Powered by FluxBB