dariogene
Forum Replies Created
-
For anyone who comes across this, please see this solution which I have also posted on a later thread:
I’ve had this same problem myself and a quick google reveals many other sites with the same problem.
The problem is to do with get_transient() and set_transient(). What is happening is that the plugin is trying to cache and retrieve tweets with certain characters in them that won’t serialize/unserialize correctly. So the function just returns the serialized data rather than array, which the foreach cannot handle.
So to get around this, you need to serialize and encode the tweet array before passing it to set_transient. And then on the get_transient call you need to decode and unserialize.
So in twitter_widget.class.php change:
if(false === ($tweets = get_transient($transName) ) ) {
to this
if(false === ($tweets = unserialize(base64_decode(get_transient($transName))) ) ) {
and then change:
set_transient($transName, $tweets, 60 * $timeto_store);
to this
set_transient($transName, base64_encode(serialize($tweets)), 60 * $timeto_store);Hope this helps. As per stackoverflow and another twitter plugin
Forum: Plugins
In reply to: [WP Twitter Feeds] Warning: Invalid argument supplied for foreach()I’ve had this same problem myself and a quick google reveals many other sites with the same problem.
The problem is to do with get_transient() and set_transient(). What is happening is that the plugin is trying to cache and retrieve tweets with certain characters in them that won’t serialize/unserialize correctly. So the function just returns the serialized data rather than array, which the foreach cannot handle.
So to get around this, you need to serialize and encode the tweet array before passing it to set_transient. And then on the get_transient call you need to decode and unserialize.
So in twitter_widget.class.php change:
if(false === ($tweets = get_transient($transName) ) ) {
to this
if(false === ($tweets = unserialize(base64_decode(get_transient($transName))) ) ) {
and then change:
set_transient($transName, $tweets, 60 * $timeto_store);
to this
set_transient($transName, base64_encode(serialize($tweets)), 60 * $timeto_store);Hope this helps. As per stackoverflow and another twitter plugin
Yeah same thing happened to me, luckily the site’s not live yet. No idea what’s causing this but probably a jQuery bug.
I rolled back to the last version 1.3.7 downloaded from here and it works again. Good plugin though, have used it on a few sites.
The perils of zealously updating WordPress I guess!
Forum: Plugins
In reply to: [Easy FTP Upload] Easy FTP Upload@kchealy There are in fact three parameters that can affect the max size you can upload. But the one you mean is upload_max_filesize, so just do a search for that in php.ini. Change 2M or whatever the value it is to an appropriate amount. Check out the PHP manual for more info:
http://www.php.net/manual/en/ini.core.php#ini.upload-max-filesize
This plugin is ok and does a job, but as hgaims said, it could use a CAPTCHA. I’ve just spent the last few hours doing a rather clunky hack using Really Simple Captcha so it can be done. It isn’t very elegant at all, but if you want to know how I did it, contact me.
Now the whole POST file size restriction thing is apparent, a nice, small, quick edition to this plugin would be to output the maximum file size limit to the form.