Search

G’day all,

I know this topic is has been talked about a lot on this here discussion forum, but I’m completely at a loss as to why my simple twitter dynamic datasource is not working :(

The short story is this:

I have a site in production (working just fine) that consumes a feed from twitter as a dynamic datasource (working just fine too). I’m currently in the process of upgrading this site so have brought a copy local and have started to work on it. In the process I have upgraded the Symphony version to 2.1.1 and the dynamic datasource now won’t display anything but that which is in the cache!

I have also in the new version of this site changed the datasource to render the first three items in the twitter feed using “/rss/channel/item[position() <= 2]”, rather than just the first item.

I had a look in the logs and noticed this:

2010/09/11 10:22:17 > WARNING: 2 - chmod(): Operation not permitted in file /Development/home_svn/easterfest2011/symphony/lib/toolkit/class.general.php on line 630

So I thought it might’ve been a permissions issues on the cache/ folder. So, did a global chmod -R 777 across the whole project, still hasn’t fixed it.

The XML returned to my XSLT template (when using the new xpath) is:

<error>Request timed out. 6 second limit reached.</error>

When using the old XPATH, I get a stale cached result.

Am I missing something?

Thanks for your help! Tim.

Hi Tim, if your datasource takes more than 6 seconds to respond under normal conditions, you will need to up the limit in your datasource manually. Open up the datasource PHP document (you’ll find them all under /workspace/data-sources/ and find the line that looks like:

public $dsParamTIMEOUT = '6';

Change 6 to something higher (15 is probably a good bet) and reload the page that uses the datasource - you should be sweet :)

Thanks Tony, gave that a shot and received:

<error>Request timed out. 15 second limit reached.</error>

I even went nuts and gave it a 60 second timeout…

<error>Request timed out. 60 second limit reached.</error>

Hmm…

Wow - so if you access your data source directly, does it return in a reasonable time?

I get this every time I try and do dynamic data sources, even ones from a file located locally, and so far I haven’t found out what’s up. I just gave up!

Hi Tony,

Sure, if do a curl -O from my terminal on the twitter feed it downloads immediately and I can see the XML just fine… Something’s going funny in Symphony somewhere.. Any ideas?

Would you mind posting the URL you’re using for your datasource? I’d be happy to take a look and see if I get the same problem.

It could be missing namespaces, or a host of other things.

When I’ve had this issue, I’ve only used local files without namespaces and had exactly the same issue. Sadly, I haven’t got to using remote URLs yet, but I will see if it causes the same problem…

With regards to Twitter, this may be the problem.

Thanks guys,

The twitter feed is:

feed://twitter.com/statuses/user_timeline/54380410.rss

The prod site is consuming this just nicely (it’s running an older version of Symphony however, not sure if this has any bearing on the issue).

The namespace I’m assigning is (same as prod):

Name: "atom"
URI: "http://www.w3.org/2005/Atom"

The “included elements” I’m using on the prod site is:

"/rss/channel/item[1]"  (I was simply grabbing the first item in the list)

For the new site I’m wanting to do something like this:

"/rss/channel/item[position() <= 3]"  (to grab the latest 3 tweets).

Just checked the prod site again and the feed is certainly fresh. I’ve double-checked all the usual networky things on my end (firewalls etc) but it all looks good to me. The fact that I can curl -O the feed from my terminal must mean something…

Thanks for the link designermonkey, will check that out.

Cheers, Tim.

What happens if you try:

"/rss/channel/item[position() &lt; 3]"

The URL of your feed should begin with the http protocol and not feed:

http://twitter.com/statuses/user_timeline/54380410.rss

http://getsymphony.com/discuss/thread/49555/#position-11

Thanks Nick, will give that a shot…

*** Edited ***

That did the trick! Thanks Nick! I can’t believe I didn’t think of that…

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details