OA search RSS

8 views
Skip to first unread message

Matt Joyce

unread,
May 15, 2010, 8:41:42 AM5/15/10
to openaust...@googlegroups.com
Not sure about this.
I tried to add an RSS search to Google Reader but it rejected the url.
I check it in a validation [1] and that also says it not a valid feed.

However when I retrieve the url with a browser, I can see the feed just fine.

Any ideas?

Regards

--
You received this message because you are subscribed to the Google Groups "OpenAustralia Community" group.
To post to this group, send email to openaust...@googlegroups.com.
To unsubscribe from this group, send email to openaustralia-...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/openaustralia-dev?hl=en.

Daniel O'Connor

unread,
May 16, 2010, 12:29:29 AM5/16/10
to openaust...@googlegroups.com

Try validate by direct input, and view source + copy / paste.



This feed does not validate.

  • line 17, column 213: Undefined description element: b (21 occurrences) [help]

    ...  emails. The difference is that you can <b>filter</b> them or redirect t ...
                                                 ^

In addition, interoperability with the widest range of feed readers could be improved by implementing the following recommendations.

  • line 18, column 0: item should contain a guid element (20 occurrences) [help]

    </item>
  • line 148, column 0: Missing atom:link with rel="self" [help]

    </channel>

Henare Degan

unread,
May 16, 2010, 3:32:29 AM5/16/10
to openaustralia-dev
On Sat, May 15, 2010 at 22:41, Matt Joyce <matt....@gmail.com> wrote:
> Not sure about this.
> I tried to add an RSS search to Google Reader but it rejected the url.
> I check it in a validation [1] and that also says it not a valid feed.
> However when I retrieve the url with a browser, I can see the feed just fine.
> Any ideas?

Hi Matt,

Nicely picked up, that's not good at all. I've created a ticket[0], if
anyone wants to work on it please assign the ticket to yourself.

If you want to be notified when it's fixed, just 'watch' the ticket
and you'll be emailed as it progresses.

Cheers,

Henare

[0] http://tickets.openaustraliafoundation.org.au/browse/OA-432

Matt Joyce

unread,
May 17, 2010, 8:37:37 AM5/17/10
to openaust...@googlegroups.com


On 16 May 2010 17:32, Henare Degan <henare...@gmail.com> wrote:
On Sat, May 15, 2010 at 22:41, Matt Joyce <matt....@gmail.com> wrote:
> Not sure about this.
> I tried to add an RSS search to Google Reader but it rejected the url.
> I check it in a validation [1] and that also says it not a valid feed.
> However when I retrieve the url with a browser, I can see the feed just fine.
> Any ideas?

Hi Matt,

Nicely picked up, that's not good at all. I've created a ticket[0], if
anyone wants to work on it please assign the ticket to yourself.

If you want to be notified when it's fixed, just 'watch' the ticket
and you'll be emailed as it progresses.

Cheers,

Henare

[0] http://tickets.openaustraliafoundation.org.au/browse/OA-432


I see you have already submitted some patches.
Would like to help, but not sure how.

I have the livedev running, but I'm not clear how I would update it to be current.
Any advice?

Henare Degan

unread,
May 17, 2010, 5:49:58 PM5/17/10
to openaust...@googlegroups.com
On Mon, May 17, 2010 at 22:37, Matt Joyce <matt....@gmail.com> wrote:
> I see you have already submitted some patches.
> Would like to help, but not sure how.

Hi Matt, thanks very much - that's a great offer!

> I have the livedev running, but I'm not clear how I would update it to be current.
> Any advice?

I've cherry-picked changes from the TWFY source that fix the immediate
issue, the last bit I need to test is another bit of code that was
impacted by this, mprss.php

This is run daily as part of the morningupdate script and updates the
Recent Appearances feeds for MPs. On DevLive the script doesn't run
and that's the problem I'm yet to debug.

The following terminal commands should update DevLive to the latest
code and apply the patches:

su - # Naughtily become root (password 'oa')
cd /srv/www/openaustralia/twfy # Change to the application directory
git pull # Pull the latest changes from Github
wget http://tickets.openaustraliafoundation.org.au/secure/attachment/10158/OA-432_fix_0.1.tar.gz
# Download the patches
tar xzf OA-432_fix_0.1.tar.gz # Unzip the patches
git am *.patch # Apply the patches

Once you've done that you'll see that the RSS searches validate,
albeit with some warnings.

If you can manage to debug mprss.php so it runs on DevLive (it's
probably a missing dependency or something) before I get back to it (I
only have the time to work on it every few days) that'd would be
fantastic!

Cheers,

Henare

Matt Joyce

unread,
May 18, 2010, 8:45:46 AM5/18/10
to openaust...@googlegroups.com
I think if you running mprss.php via cli you need to modify /etc/php5/cli/php.ini

and set :
short_open_tag = On

then silence the flurry of warnings by setting
allow_call_time_pass_reference = On

then enable Dynamically loaded extensions
enable_dl = On

I think that will get mprss.php to run, but the first two setting suggest potential problems down the track.

Regards

Matt Joyce

unread,
May 18, 2010, 10:20:29 AM5/18/10
to openaust...@googlegroups.com
The following will fix the guid warning in the rss feed, simply create a md5 hash of the item's link to use as a guid.

diff --git a/www/includes/easyparliament/templates/rss/hansard_search.php b/www/includes/easyparliament/templates/rss/hansard_search.php
index 4a2e624..b56c331 100644
--- a/www/includes/easyparliament/templates/rss/hansard_search.php
+++ b/www/includes/easyparliament/templates/rss/hansard_search.php
@@ -32,6 +32,7 @@ if (isset ($data['rows']) && count($data['rows']) > 0) {
                echo (' (' . format_date($row['hdate'], SHORTDATEFORMAT) . ')');
 ?></title>
 <link>http://www.openaustralia.org<?=$row['listurl'] ?></link>
+<guid><?php echo md5($row['listurl']) ?></guid>
 <description><?php
                if (isset($row['speaker']) && count($row['speaker'])) {
                        $sp = $row['speaker'];

Henare Degan

unread,
May 18, 2010, 7:08:51 PM5/18/10
to openaustralia-dev
On Tue, May 18, 2010 at 22:45, Matt Joyce <matt....@gmail.com> wrote:
> I think if you running mprss.php via cli you need to
> modify /etc/php5/cli/php.ini

Hi Matt, after removing face from palm, it works - brilliant, thanks!

On Wed, May 19, 2010 at 00:20, Matt Joyce <matt....@gmail.com> wrote:
> The following will fix the guid warning in the rss feed, simply create a md5
> hash of the item's link to use as a guid.

Applying that, I got a different error[0] suggesting that the guid
needs to be the URL so I modified the patch to do that and it removes
that warning from the validation.

I've included that patch in the ticket's set now and assigned it to
Matthew for review and deployment.

Thanks so much for your help with this - we wouldn't have been able to
solve it so fast without your help.

Cheers,

Henare

[0] http://validator.w3.org/feed/docs/error/InvalidHttpGUID.html

Matt Joyce

unread,
May 18, 2010, 7:41:49 PM5/18/10
to openaust...@googlegroups.com
On 19 May 2010 09:08, Henare Degan <henare...@gmail.com> wrote:
On Wed, May 19, 2010 at 00:20, Matt Joyce <matt....@gmail.com> wrote:
> The following will fix the guid warning in the rss feed, simply create a md5
> hash of the item's link to use as a guid.

Applying that, I got a different error[0] suggesting that the guid
needs to be the URL so I modified the patch to do that and it removes
that warning from the validation.


Ah yes, by default <guid> has the attribute isPermalink="true".
So it should be a url, unless isPermalink="false".

 
I've included that patch in the ticket's set now and assigned it to
Matthew for review and deployment.

Thanks so much for your help with this - we wouldn't have been able to
solve it so fast without your help.


You're welcome, my pleasure.

If there is a long term goal to replace the short open tags with '<?php', then I would be happy to help.
It's a mundane task, but would give me the impetus to poke about and get a better understanding of how stuff fits together.

Similarly, if removing the need for allow_call_time_pass_reference=On was desirable, I'm happy to work through the scripts.

I'm more confident with maintenance tasks, than generating original code (I spent a few years doing LAMP admin).

Regards

Matt

--
http://www.lostplot.com

Henare Degan

unread,
May 18, 2010, 8:59:01 PM5/18/10
to openaustralia-dev
On Wed, May 19, 2010 at 09:41, Matt Joyce <matt....@gmail.com> wrote:
> If there is a long term goal to replace the short open tags with '<?php',
> then I would be happy to help.
> It's a mundane task, but would give me the impetus to poke about and get a
> better understanding of how stuff fits together.
> Similarly, if removing the need
> for allow_call_time_pass_reference=On was desirable, I'm happy to work
> through the scripts.
> I'm more confident with maintenance tasks, than generating original code (I
> spent a few years doing LAMP admin).

I think that'd be great but you might have more fun looking at the
stacks of tickets we have open against the application[0]. Don't let
me stop you from going ahead with the maintenance tasks though :)

I'll be happy to work through the changes with you (testing, etc.) so
that we can get solid patches to Matthew for deployment. Let me know
if there's any way I can help.

Cheers,

Henare

[0] http://bit.ly/9i3hM9
Reply all
Reply to author
Forward
0 new messages