Ticket #1141 (new defect)

Opened 2 years ago

Last modified 16 months ago

send a list of all used tags in the AtomPub introspection document

Reported by: AlexanderP Owned by:
Priority: trivial Milestone: 0.8
Component: Habari Core Software Version: SVN
Keywords: has_patch atompub, tag, caching Cc:

Description

At the moment only the tags used in a specific post are sent with every atomhandler::get_entry() call.

Some offline editors require a list of a complete tag list to be sent seperately.
See:
 http://tools.ietf.org/html/rfc5023#section-7.2.1

I've attached a patch that includes this list in the introspection document.

The problem with this patch is the caching. If a new category is added while the cache is still active it will not be reflected in the list. To make it work for my site I have disabled the cache of the introspection document.

As an alternative a new categories document could be implemented. I've also tried this and it worked well, but it requires messing around with the rewrite rules and I'm not sure I understand them enough to not break something else.

(I can also submit a patch for this, I'm just not very confident I did everything right)

Attachments

list_tags.diff Download (783 bytes) - added by AlexanderP 2 years ago.
categories_document.diff Download (3.2 KB) - added by AlexanderP 17 months ago.

Change History

Changed 2 years ago by AlexanderP

comment:1 Changed 2 years ago by ddebernardy

  • Keywords has-patch added

comment:2 Changed 2 years ago by ddebernardy

  • Keywords has_patch added; has-patch removed

comment:3 Changed 23 months ago by michaeltwofish

We should also support other types of categories besides tags (like, well, categories). I prefer your second suggestion of a categories document, with appropriate hooks so that plugins can add their own categories. The default scheme, on the categories element could be tags, and categories would be responsible for adding their own schemes.

The categories element in the service document would then link (with the href attribute) to the category document.

comment:4 Changed 17 months ago by AlexanderP

Sorry I totally missed your reply for the last six months.

I've tied to fix a patch like you suggested, but I'm not 100% confident I did everything right. It works for me and the xml output seems all right too, but my habari skills are quite limited.

Changed 17 months ago by AlexanderP

comment:5 Changed 16 months ago by anon

  • Keywords caching added; tags removed

comment:6 Changed 16 months ago by anon

  • Milestone changed from Undetermined to 0.8
Note: See TracTickets for help on using tickets.