Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-05-13 10:21:52

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

missing article tag error: is it possible only by permission level?

I’m using a section only to list download files. File categories helps navigate through files. When I navigate in a file category listing under “download”, the usual error message about missing article tag is shown.

Fine: but I don’t want an article tag, so I could suppress it by switching the site from “test” to “live” stage.

But what if I’m working on some improvements on another section of the site, and want to set the “test” stage back for a while? All users visiting the download section will have to see that ugly message?

Is there a workaround, maybe via an old plugin setting the stage based on user privilege? Am I having a false memory about that? Any other idea?

Offline

#2 2011-05-13 11:18:03

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: missing article tag error: is it possible only by permission level?

Zanza wrote:

Is there a workaround

<txp:article pgonly="1" /> somewhere on your page :)

Last edited by els (2011-05-13 11:18:29)

Offline

#3 2011-05-13 12:26:26

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Re: missing article tag error: is it possible only by permission level?

Wow, that looks like a true workaround! :) Thanks, it does the job in this case. I was remembering something else, Els… but probably I’m wrong!

Offline

#4 2011-05-13 13:17:39

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,315

Re: missing article tag error: is it possible only by permission level?

Zanza wrote:

I was remembering something else

Probably this one.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#5 2011-05-13 14:27:58

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Re: missing article tag error: is it possible only by permission level?

uli wrote:

Zanza wrote: I was remembering something else

Uli: Probably this one.

Ah! That’s it! Not exactly a plugin as I was remembering, but a good general solution for client’s sites! Thanks for finding out!

Offline

#6 2011-05-26 17:21:17

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Re: missing article tag error: is it possible only by permission level?

I have to rethink about this one because the Ruud’s solution mentioned by Uli doesn’t seem to work.

I have been using the Els’ solution (article pgonly=“1” in the page), but that has a unfortunate side-effect. Below my file download list, the txp:newer and txp:older tags for file list pagination doesn’t work anymore. This is caused by the article pgonly=“1” in the page. If I remove article tag, pagination work correctly, but error message is displaying in test mode (but only if a category for file is in the url… this is strange). If I keep the article tag, the error message disappears but the pagination doesn’t work.

Any other idea?…

Last edited by Zanza (2011-05-26 17:22:30)

Offline

#7 2011-05-26 17:56:40

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: missing article tag error: is it possible only by permission level?

Pagination will work correctly if you use the same limit and (if applicable) offset values in the article tag with pgonly="1".

Offline

#8 2011-05-26 19:02:43

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Re: missing article tag error: is it possible only by permission level?

hm… Thanks, but no, it doesn’t seem to work. I’ve tried using for txp:article pgonly="1" the same limit that I used for the file_download_list tag (5). Newer and older doesn’t appear. I hope I’ve correctly understood your suggestion, though…

Offline

#9 2011-05-26 22:57:14

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: missing article tag error: is it possible only by permission level?

Sorry, I didn’t read your post very well, I overlooked that it’s a file list, not an article list… In that case of course my suggestion won’t work, but I don’t really understand why it should keep the older/newer links from working. Have you tried to use the pageby attribute as well?

Offline

#10 2011-05-26 23:20:36

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Re: missing article tag error: is it possible only by permission level?

Yes, I’m using pageby="limit" in the file_download_listtag. I tried putting and removing the same attribute also in the article tag. No luck.

I don’t know: it seems that, if article tag is present in template, older and newer tag assume that they should work for article context. Actually, there’s nothing in page telling that file context should be considered instead for the prev/next link generation. So I suppose this is the normal (still sort of buggy…) behavior. Article tag in the template is actually a workaround. I’d remove it, but then the problem of error message remains. I’m stuck.

What is lacking may be a method to “force” the file context in a page that can contain both article and files tags (and link, and image tags, ipotetically…). Does it make sense?

Last edited by Zanza (2011-05-26 23:21:11)

Offline

#11 2011-05-27 10:06:05

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: missing article tag error: is it possible only by permission level?

Zanza wrote:

it seems that, if article tag is present in template, older and newer tag assume that they should work for article context. Actually, there’s nothing in page telling that file context should be considered instead for the prev/next link generation. So I suppose this is the normal (still sort of buggy…) behavior.

Yes, seems like this is the way it works. I have never used this context, and therefore never encountered the problem, but I guess it’s not an unusual setup.

What is lacking may be a method to “force” the file context in a page that can contain both article and files tags (and link, and image tags, ipotetically…). Does it make sense?

To me, yes :) Interesting idea. Maybe you can repost this in the Development section of the forum?

Offline

#12 2011-05-28 10:12:39

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Re: missing article tag error: is it possible only by permission level?

Els wrote:

Maybe you can repost this in the Development section of the forum?

Yes, just done. :) Thanks.

Offline

Board footer

Powered by FluxBB