mowax Posted August 19, 2013 Share Posted August 19, 2013 I set up the RSS feed block for my twitter feed AFTER twitter changed its API settings, and it has been working fine. Recently however the RSS block is only showing 1 post. Sometimes it shows the 5 latest, but once you refresh the page it goes back to showing 1. Please see the problem on www.duratex.co.uk. I have tried resetting the module, also uninstalling and reinstalling, but no change. Any ideas would be very welcome! Link to comment Share on other sites More sharing options...
PascalVG Posted August 19, 2013 Share Posted August 19, 2013 Had a quick look in the source, but nothing obvious that can be wrong. Double check: You did change the number of feeds in the module configure to something higher than 1, yes? Can you put it to 6 and see if anything changes? My 2 cents, pascal Link to comment Share on other sites More sharing options...
mowax Posted August 19, 2013 Author Share Posted August 19, 2013 Hi Pascal, Thanks for looking into it. Yes, I had set the module to display 5 posts. I just tried setting it to 6, but this doesn't change the result. Link to comment Share on other sites More sharing options...
PascalVG Posted August 26, 2013 Share Posted August 26, 2013 Hi mowax, did you find a solution for this already? If not, I will have another try, hopefully tonight. pascal Link to comment Share on other sites More sharing options...
mowax Posted August 26, 2013 Author Share Posted August 26, 2013 hi Pascal, no unfortunately I did not, it still appears correctly sometimes but more often it only displays 1 post. I'd be very grateful for you to have another look Link to comment Share on other sites More sharing options...
PascalVG Posted August 26, 2013 Share Posted August 26, 2013 Hi mowax, to try it out here, can you provide the feed URL you have in RSS configure screen? thx, pascal Link to comment Share on other sites More sharing options...
PascalVG Posted August 26, 2013 Share Posted August 26, 2013 Oh, and what PrestaShop version do you use? Link to comment Share on other sites More sharing options...
mowax Posted August 26, 2013 Author Share Posted August 26, 2013 hi Pascal, the feed url is: http://tweet-2-rss.appspot.com/feed/DuratexUK/7Gfd2xOc/statuses/user_timeline.json?screen_name=DuratexUK and the prestashop version is 1.5.4.1 with the default theme thanks so much! Link to comment Share on other sites More sharing options...
PascalVG Posted August 26, 2013 Share Posted August 26, 2013 mowax, Think I found it: edit the file classes/Tools.php find the function: public static function file_get_contents($url, $use_include_path = false, $stream_context = null, $curl_timeout = 5) Change to this: public static function file_get_contents($url, $use_include_path = false, $stream_context = null, $curl_timeout = 25) What it does: you said, it SOMETIMES shows 5, but mostly not. Seemed like some sort of random problem. What I found in this function was a "timeout". It tries to get new feeds a specific time only, to not 'hang' the module, forever trying... Apparently, 5 was too short to get the feeds normally. I think 25 is a nice amount. Check the speed of your site if it doesn't take too long though. (I think it will return as soon as it has the 5 feeds, so should be no problem. pascal 1 Link to comment Share on other sites More sharing options...
mowax Posted August 26, 2013 Author Share Posted August 26, 2013 hi Pascal, that was a great idea, in fact I thought it could be something to do with loading timeouts but wouldn't have had the first idea where to look. unfortunately though, this doesn't seem to work, even if I increase the timeout to 50. I also tried increasing the timeout values just below this function in the same file, but that didn't work either. I remembered to disable caching and cleared my cache, but I will try deleting some cookies a bit later and see if that could be preventing me from seeing the changes. thanks for pointing me in what is probably the right direction though Link to comment Share on other sites More sharing options...
PascalVG Posted August 28, 2013 Share Posted August 28, 2013 Hmmm, your rss feeder is over it quota... Link to comment Share on other sites More sharing options...
mowax Posted August 28, 2013 Author Share Posted August 28, 2013 i'm not sure I know what that means? can it be fixed? Link to comment Share on other sites More sharing options...
PascalVG Posted August 28, 2013 Share Posted August 28, 2013 Hi mowax, previous post problem seems to be solved again. I Tried to call the rss feed line directly in my browser. It seemed that the rss provider has a limited quota of sending stuff and it was over that limit. Anyway, Now that it works again, I will have another look at it... pascal 1 Link to comment Share on other sites More sharing options...
PascalVG Posted August 28, 2013 Share Posted August 28, 2013 mowax, the problem doesn't seem to be in the rss module (try for example google rss news feed: http://news.google.com/?output=rss this works OK. If you click on the link above of your rss feed, you see that the problem is at the source. It seems that the rss feeder that you use, (most of the time) only sends out 1 message. I have another solution, I think: have a look at my test site: http://ps1541no2.buymethai.com/en/ Look at either left column all the way down below or look in the center column, all the way down below. Here you see your tweets (in color, with pictures) displayed, and option to get older ones as well. You have an option to follow your twitter, and they can tweet to you. Look if you like it, if so, It's easy to do! pascal 1 Link to comment Share on other sites More sharing options...
mowax Posted August 29, 2013 Author Share Posted August 29, 2013 Thanks Pascal, that looks great. I think I would stick with the simple default style (top one in the left column). What was the solution in the end? Link to comment Share on other sites More sharing options...
PascalVG Posted August 29, 2013 Share Posted August 29, 2013 (edited) OK, here we go: Download this free module: It allows you to just put any kind of HTML/Javascript/images/text on your page: - go to: http://contentbox.org/ - Just push the download button (don't have to generate one, just use default one. (If you need more boxes like this, just 'generate' one, it will change the name a little, so that it can live next to another contentbox-module, without interference) When downloaded: - upload the zip file to your /modules folder and extract (or, if you use ftp, extract on your computer, and upload the folder 'contentbox' to the /modules folder) - Go to modules->modules, find contentbox and press install. - Then go there again and press configure. You will see a white field with some layout buttons above it, just like a description field of products. Press the small blue 'HTML' button in the button bar of this field. Remove all old text replace with the following text: <p><a class="twitter-timeline" href="https://twitter.com/DuratexUK" data-widget-id="372011630957060096">Tweets by @DuratexUK</a></p> <script type="mce-text/javascript">// <![CDATA[ !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);[spam-filter](document,"script","twitter-wjs"); // ]]></script> - Press Update - Press Update (save) - have a look at your front page. See if it works. Hope this does the trick. ----------------------------------------- If you are curious there the text comes from, or want to make some tweaks: go to twitter.com press the settings icon (top right) press widgets press create new add your twitter name (@duratexuk) make any changes you like (height of box, theme, etc) get widget text bottom right copy as said before in custombox That's all. pascal Edited August 29, 2013 by PascalVG Added image (see edit history) 1 Link to comment Share on other sites More sharing options...
mowax Posted August 29, 2013 Author Share Posted August 29, 2013 Hi Pascal, Thanks for this solution, I guess it is better than a module which hardly ever works! That said I didn't get the widget to appear, only the <p> tag, but will look further into it. Just so I'm clear though, what was the problem I had? Was it with twitter, the rss block module, or something else? Cheers Mo Link to comment Share on other sites More sharing options...
PascalVG Posted August 29, 2013 Share Posted August 29, 2013 Hi mowax, Hope you can make it work. Otherwise make a temporary employee with admin rights and send me the login/password details, then I will do it for you :-) The problem seems to be the site that creates the rss feed. It took (mostly) only one post at the time, not many/all. Maybe it was possible to change a setting on that site or so, but I couldn't find any that quickly. This seems to be a working solution, though, so let's try to get this to work. Let me know if you need help with it, pascal. 1 Link to comment Share on other sites More sharing options...
PascalVG Posted August 29, 2013 Share Posted August 29, 2013 Did you press the small HTML button, before you pasted the code into the field? Link to comment Share on other sites More sharing options...
PascalVG Posted August 30, 2013 Share Posted August 30, 2013 Summary, block didn't expand after copying the text form my post before. Solution: Go to twitter.com and re-generate the script following steps in post #16 (at the end) Problem solved, pascal Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now