11
dbman
Re: XHLD Question
  • 2009/3/10 18:51

  • dbman

  • Friend of XOOPS

  • Posts: 172

  • Since: 2005/4/28


XHLD works great, I use it for many feeds but for some reason it doesn't like this feed. In fact this is the first time I have seen it fail to fetch and display an RSS or Atom feed.

I would like to try another feed with the same charset/language from another site to prove or disprove that as the cause. If nothing else it would narrow down the possible causes of the issue.

Edit: I am using XOOPS 2.3.2b, Apache 2.2.8, MySQL 5.0.58, PHP 5.2.6


12
ghia
Re: XHLD Question
  • 2009/3/11 2:18

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


The site checks for browser signatures and returns 403 forbidden to XHLD. Change the agent in /class/xhld_snoopy.php to eg
le="color: #000000"><?php var $agent ="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"; // agent we masquerade as


13
dbman
Re: XHLD Question
  • 2009/3/11 5:23

  • dbman

  • Friend of XOOPS

  • Posts: 172

  • Since: 2005/4/28


Hi ghia,
Tried the variable value change, same results for this particular feed. I get the following error in XHLD (no errors in XOOPS debug):
le="color: #000000"><?php Failed saving data to database for headline Testing XmlParse error: Invalid character at line 10


Here is line 10 from the feed source:
le="color: #000000"><?php <description>?? ???????? ??? ?????????? ?? ??? ???? ????...!</description>


Coincidentally this is the first line the native characters are displayed in the source. Perhaps an issue with the feeds encoding (iso-8859-7)?

Out of curiosity, how did you see the 403 error? The feed validates in W3C and shows no errors in firebug.

Edit: the forum here isn't displaying the characters correctly in the bottom code box.

14
ghia
Re: XHLD Question
  • 2009/3/11 10:54

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Quote:
I get the following error in XHLD (no errors in XOOPS debug):
le="color: #000000"><?php Failed saving data to database for headline Testing XmlParse error: Invalid character at line 10

Coincidentally this is the first line the native characters are displayed in the source. Perhaps an issue with the feeds encoding (iso-8859-7)?
I got that error too, but as the TS stated:
le="color: #000000"><?php I have got other feeds working with the same encoding, so I tempted to believe it is not an encoding issue.
I didn't look into it.
I assume he adapted /language/hislanguage/headlinerenderer.php or something.
Quote:
Out of curiosity, how did you see the 403 error?
I expanded the document empty error with the content. From that I learned that Snoopy is a 'good wheater' program and handles poorly the HTML status. In fact it is saved in _httprequest (but not in _httpsrequest), but nowhere checked. I think after
le="color: #000000"><?php $this->status= $status[1];
should be something like
le="color: #000000"><?php if ($this->status >= 400) { return false; }
The same should be added for _httpsrequest.
After that every call of _httprequest and _httpsrequest should check its return status and if false add an appropriate error message and propagate the false return.
Quote:
The feed validates in W3C and shows no errors in firebug.
If the site checks browser signatures, the result is different (You could eg allow Firefox and block IE).
Quote:
the forum here isn't displaying the characters correctly in the bottom code box
Despite XOOPS.org is UTF-8, this bug is still not resolved.

15
dbman
Re: XHLD Question
  • 2009/3/11 12:12

  • dbman

  • Friend of XOOPS

  • Posts: 172

  • Since: 2005/4/28


Thanks for the info ghia... if nothing else I have learned a few things :)

16
kalamata
Re: XHLD Question
  • 2009/5/10 22:59

  • kalamata

  • Not too shy to talk

  • Posts: 121

  • Since: 2005/3/3 1


That is correct, I changed headlinerenderer to allow for that with the use of iconv (let me know if you need the code). However, I can not find the file class/xhld_snoopy.php - is this a patch or an update? My version of xhld is 2.92, running on XOOPS 2.0.18 with PHP 5.2.9 and MySQL 5.01 - the apache version is 2.2.8 and it is a dedicated server (OpenSuse 11.0) so please let me know if there are any further tests I can perform.

Regards,
George

Login

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits