List Info

Thread: Tagging missing pieces...




Tagging missing pieces...
user name
2006-10-30 18:18:29
Elias,

do you have any time to look at these items?

-- Allen


Allen Gilliland wrote:
> 
> 
> Elias Torres wrote:
>>
>> Allen Gilliland wrote:
>>> I actually have one to add to the list. 
Comments below ...
>>>
>>> Elias Torres wrote:
>>>> Hi Guys,
>>>>
>>>> I'm out for the day (classes, meetings,
etc) so I won't be able to
>>>> develop but I want to give you a heads up
before you deploy to BSC that
>>>> I found a couple of missing things in the
tagging implementation. Sorry
>>>> for the bad timing.
>>>>
>>>> Basically, I found that in one of the VM
models (I believe URLModel)
>>>> where we compute URLs $url.entries.rss(),
... we are taking in
>>>> $model.categoryPath, but we are not taking
tags, so any URLs like <link
>>>> rel="self"/> in feeds will not
contain the tags from the request. 
>>>> Plus I
>>>> noticed that I did not check the deprecated
VM files that could need
>>>> access to tags.
>>>
>>> Yes, we can add a new method for getting a url
to rss/atom feeds by tag
>>> in the URLModel, that's easy to do.  However,
we are not going to make
>>> any changes to the deprecated models and macros
to add new
>>> functionality.  Those should only get changed
to ensure that they
>>> continue working, but not for any other reason.
>>>
>>>
>>
>> good.
> 
> 
> I didn't get this done yesterday because I ran into
issues doing an 
> array in velocity, so maybe someone with better
velocity skills can 
> tackle this.  I had added these 2 methods to the
URLModel ...
> 
> public String rss(String[] tags, boolean excerpts) {
>             return
URLUtilities.getWeblogFeedURL(weblog, locale, 
> "entries", "rss", null,
Arrays.asList(tags), excerpts, true);
>         }
> 
> public String atom(String[] tags, boolean excerpts) {
>             return
URLUtilities.getWeblogFeedURL(weblog, locale, 
> "entries", "atom", null,
Arrays.asList(tags), excerpts, true);
>         }
> 
> 
>>
>>>> One more thing, I also need to add
getPopularTags() to the PageModel
>>>> like I did for SiteModel().
>>>
>>> Nope, you already have it in WebsiteData, so
it's available via
>>> $model.weblog.getPopularTags()
>>
>> how quickly do I forget.
>>
>>>
>>> However, one item we haven't figured out which
should probably be
>>> addressed is what to do about tag urls which
specify tags which don't
>>> exist.  i.e. /weblog/tags/lkweehlkwer
>>>
>>> The way things are setup right now that is a
valid page which will
>>> simply not show any entries, and I don't think
that's what we want to do
>>> for a couple reasons.  1) It's a bit
inefficient and silly to have *all*
>>> tag urls be assumed correct and 2) It's
horrible for the cache since
>>> that means a rogue spider or malicious user
could completely empty the
>>> cache of valid content by filling it with
pages/feeds from bogus tag 
>>> urls.
>>>
>>> I think what we should probably do is add some
tag checking to the
>>> validation sections of both the page and feed
servlets to actually check
>>> that if tags were specified that they actually
exist.  if none of the
>>> tags specified exist then we can offer a 404.
>>
>> Sounds like the right thing to do.
> 
> 
> I think this is something that we need to go ahead an
do as soon as we 
> can, because the more I think about it the more I am
sure that this 
> needs to be in the release.
> 
> Unfortunately it doesn't seem like we ever actually
lookup the TagData 
> objects during the request cycle, so maybe we need a
new 
> tagsExist(weblog, tags) method in the manager and then
call it from page 
> & feed servlets to do validation?  Would that be
the most efficient way 
> to validate the tags entered by the user?
> 
> 
>>
>>>
>>>> I could get to these changes tomorrow, but
Allen, maybe you could help
>>>> me if you guys are releasing today.
>>>
>>> I will take a look at what I can today and see
if I can get these done.
>>
>> Let me know if you made any progress on it.
> 
> 
> Unfortunately no, didn't get anything done on these
items yesterday.
> 
> -- Allen
> 
> 
>>
>>> -- Allen
>>>
>>>
>>>> BTW, are we branching 3.1 today?
>>>>
>>>> -Elias
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )