[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New snapshot: RSS import, bug fixes

From: boud
Subject: Re: New snapshot: RSS import, bug fixes
Date: Tue, 21 Aug 2007 03:08:49 +0200 (CEST)

hi Dmitry and lurkers :)

On Sat, 18 Aug 2007, Dmitry Borodaenko wrote:

First of all, apologies for taking so long to get this update out the
door. With the amount of time I can dedicate to Samizdat, I can barely
keep up with Boud's posts and patches, integrating them takes even

Still, I managed to rework the RSS import patch so that I can
integrate it, and apply the most obvious fixes for several bugs:

#19830 - upload file message changed to clarify the purpose of this
option; I've updated Belarusian and Russian translations, others need
to be updated accordingly

Looks OK to me - i uploaded pl/es/fr/ja to cvs.

People who know de/eo/ua could do these languages (it's just one line!).

#20303 - "cut the knot" kind of solution applied: the whole option,
and a couple of others, are made available in basic interface;
eventually, I'd like to get rid of the basic/advanced interface split,
advanced interface is only there because some parts of Samizdat UI are
more complicated than they should be

i had thought the idea was not to frighten "ordinary" users with something
too complicated.

#20305 - obvious fix for an obvious bug, made even easier by the
refactoring applied for the previous bug

The fixes for 20303 + 20305 look OK to me.

#20678 - it looks like the the whole idea of redirecting back to where
login is initiated from is too complex to be implemented without bugs
or kludges; since it's not tremendously useful, I removed it for now,
this will make this bug go away

i disagree with "it's not tremendously useful". Even if loading the frontpage is getting quite fast with the 070501 refactoring, it's still
annoying to users to get redirected to the frontpage rather than to the
referer. If the user logs in successfully without making any error (such as leaving the password box empty and hitting enter) or logs out
successfully without making an error (which seems to be rather certain),
then redirecting him/her to the referer worked correctly in 070618.

Killing this off to avoid the bug of the case when someone incorrectly
logs in seems to me "throwing out the baby with the bathwater".

Have a look at my proposed new solution which *does* trace the referer
(so it seems to me anyway) from before the login page. It keeps the
baby *and* the bathwater. :)  Is it really "too complex" ? ;) Or is it

i've posted it as a patch against - it reverts to 070618
for member_controller and puts in my patch suggested earlier,
but uses "prelogin_referer" instead of "referer" in order to get around
apache's (i'm guessing here) notion of referer, which it evaluates
to @request.referer only the first time around, i.e. when @request.referer
does not match %r{member/login\Z}.

i've also changed the bug status to 'in progress', since at the moment
i don't think we (yet) have consensus.

The patch is here:

#20491 - the real cause of this bug was that CSRF protection code
didn't handle the case when form action is different from the location
where form is displayed, this is now fixed

Looks OK to me.

RSS import is configured pretty much the same as in Boud's patch, but
it works quite differently: feeds are fetched and parsed by an
external script (bin/samizdat-import-feeds) that can be placed in
crontab on an arbitrary schedule (remember though that fetching feeds
more often than hourly is not polite). The script puts the results
into the DRb cache as persistent entries available across all sites,
so that two sites importing the same feed will only fetch it once. The
script fetches maximum number of entries, it is up to each site to cut
these entries down to the limit configured for given site.

Your solution is definitely neat. :) i'll avoid comparing the number of lines of code and bytes between your version and mine :P Why say
something in 2 lines when you can say it in 200 ? ;)  Gradually i'm
learning bits and pieces of ruby - e.g.
 x = y or x_default
evaluates to  x = nil  if y doesn't exist, even if x_default does exist.
Why? because it implicitly is grouped:
 (x = y) or x_default
 x = (y or x_default)
This is why earlier i wrote this in an equivalent long form...  Anyway...

More seriously, i found one minor bug (frontpage crashes due to
certain faulty config) and i've proposed a mechanism for i18n. i
haven't actually confirmed that the 070818 solution gets the
default_language wrong when multiple sites have different
default_language's, but in any case, i think that users should be able
to see the feeds in their preferred language when they exist - after
all, that's one of the unique aspects of samizdat AFAIK, which could
quietly but surely smash linguistic borders.

patch entry:

patch against 070818:

We should probably add here a TODO both for import_feeds but also
for the rss export feeds function - to export and import descriptions,
e.g. the :short version of any article for export and import whatever
is in the rdf feed. This should be especially useful for a regional
aggregator something like for the CEE region...

Boud, please let me know if you can and want to update doc/install.txt
with the above instructions explained in a more user-friendly manner,
otherwise I'll try to do it myself.

i've added it to my TODO list.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]