Forum Replies Created

Viewing 15 replies - 16 through 30 (of 316 total)
  • Hmm, sadly not for me. Even after completely deleting wp-admin and wp-includes and re-uploading them I still can’t get access to the backend. Going to try playing with it again tomorrow morning. If no joy I’ll roll back to our backup from last night.

    Hmm, I’ve just encountered this issue on one of the WP sites I administer.

    I’ve upgraded (via auto-upgrade) about 10 or 12 sites this morning and just one of them has completely failed.

    Any attempt to access the admin area results in

    Fatal error: Call to undefined method wpdb::delete() in /path/to/wp-includes/option.php on line 370

    I’ve completely deleted and re-uploaded the wp-admin and wp-includes folders (and root files). Nothing has changed.

    I don’t have any caching plugins (or any plugins of any complexity really).

    The front of the site still works and I can also load /wp-admin/upgrade.php (which shows no db upgrade required).

    I’m going to have to rollback the site from our nightly backups which is a pain in the hole 🙁

    I haven’t tested this, but you could experiment with:

    http://codex.wordpress.org/Function_Reference/get_intermediate_image_sizes

    ?

    Thread Starter alexleonard

    (@alexleonard)

    Hi Arne,

    Thanks for the reply and damn I’m ashamed I didn’t respond quicker..

    In the end the client dropped the requirement I needed, but I think I could have handled it by just adding a new colorbox function call in my header.

    I actually did this to give me control over another element which needed to be colorboxed with a different iframe size

    jQuery(document).ready(function($){
        $("#colourbox_newsletter_signup").colorbox({iframe:true, width:"532px", height:"400px"});
    });

    Cheers!
    Alex

    Thread Starter alexleonard

    (@alexleonard)

    I think I can get around it by directing the user to a thank you page on successful submission, but in this case it’s complicated as the form is loaded as an iframe in some cases, but as a full page view in other cases (which makes redirecting complicated as sometimes it will be in an iframe, and other times it won’t).

    Thread Starter alexleonard

    (@alexleonard)

    Wow.. I’d completely forgotten about this – the plan on the original site changed and I never needed to work it out..

    Apologies to @andrea_r for never responding to your answer first time round.

    Thread Starter alexleonard

    (@alexleonard)

    Ok, I’ve worked this one out.

    I’ve got the following code in my head to prepare the correct itemprop items as per Google+ requirements.

    <!-- Add the following three tags inside head -->
    	<meta itemprop="name" content="<?php wp_title(); ?>">
    	<?php
    		$postCustom = get_post_custom($post->ID);
    		$yoastMetaDescription = $postCustom['_yoast_wpseo_metadesc'][0];
    		if ($yoastMetaDescription) {
    			echo '<meta itemprop="description" content="' . $yoastMetaDescription . '">' . "\n";
    		}
    	?>
    	<?php
    		if ( has_post_thumbnail($post->ID) ) {
    			$featuredThumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'standard-list-thumb');
    			echo '<meta itemprop="image" content="' . $featuredThumb[0] . '">';
    		}
    	?>

    I’m using ‘standard-list-thumb’ as my image size, but you’ll need to replace it as you see fit.

    Thread Starter alexleonard

    (@alexleonard)

    I actually can’t work this out at all.

    I think I might just go through and re-upload images to posts that have either a featured image or a gallery. Any other posts with images embedded in the post are fine as that’s a hard-coded src on the img element.

    I’ve only got 13 posts with galleries, sadly I have 100 posts with featured images set.. but at least I have post id’s from a handy wee SQL query so I can just go through them one at a time.

    I had hoped I could fix this with some sort of genius SQL query, but I don’t know where to start.

    Sorry to have failed to provide any answer.

    If anyone can think of an answer, I’d be delighted to hear it though, in case this ever happens in the future and in case the answer arrives before I finish manually doing things..

    Thread Starter alexleonard

    (@alexleonard)

    Right, well I’ve finally found some more time to investigate and I’m going to post my findings here. So I’ve uploaded some new images to the system and, as expected, they work without an issue.

    So here’s a working image, newly uploaded:

    |   30128 |   28724 | _wp_attachment_metadata | a:6:{s:5:"width";s:4:"1920";s:6:"height";s:4:"1280";s:14:"hwstring_small";s:23:"height='85' width='128'";s:4:"file";s:28:"2012/01/statues-IMG_6277.jpg";s:5:"sizes";a:14:{s:9:"thumbnail";a:3:{s:4:"file";s:28:"statues-IMG_6277-200x133.jpg";s:5:"width";s:3:"200";s:6:"height";s:3:"133";}s:6:"medium";a:3:{s:4:"file";s:28:"statues-IMG_6277-710x473.jpg";s:5:"width";s:3:"710";s:6:"height";s:3:"473";}s:5:"large";a:3:{s:4:"file";s:29:"statues-IMG_6277-1280x853.jpg";s:5:"width";s:4:"1280";s:6:"height";s:3:"853";}s:9:"rss-thumb";a:3:{s:4:"file";s:28:"statues-IMG_6277-400x266.jpg";s:5:"width";s:3:"400";s:6:"height";s:3:"266";}s:19:"standard-list-thumb";a:3:{s:4:"file";s:28:"statues-IMG_6277-160x160.jpg";s:5:"width";s:3:"160";s:6:"height";s:3:"160";}s:15:"home-post-thumb";a:3:{s:4:"file";s:26:"statues-IMG_6277-75x75.jpg";s:5:"width";s:2:"75";s:6:"height";s:2:"75";}s:16:"photo-grid-thumb";a:3:{s:4:"file";s:28:"statues-IMG_6277-230x230.jpg";s:5:"width";s:3:"230";s:6:"height";s:3:"230";}s:19:"wallpaper-1920x1200";a:3:{s:4:"file";s:30:"statues-IMG_6277-1920x1200.jpg";s:5:"width";s:4:"1920";s:6:"height";s:4:"1200";}s:19:"wallpaper-1920x1080";a:3:{s:4:"file";s:30:"statues-IMG_6277-1920x1080.jpg";s:5:"width";s:4:"1920";s:6:"height";s:4:"1080";}s:19:"wallpaper-1680x1050";a:3:{s:4:"file";s:30:"statues-IMG_6277-1680x1050.jpg";s:5:"width";s:4:"1680";s:6:"height";s:4:"1050";}s:18:"wallpaper-1440x900";a:3:{s:4:"file";s:29:"statues-IMG_6277-1440x900.jpg";s:5:"width";s:4:"1440";s:6:"height";s:3:"900";}s:18:"wallpaper-1366x768";a:3:{s:4:"file";s:29:"statues-IMG_6277-1368x768.jpg";s:5:"width";s:4:"1368";s:6:"height";s:3:"768";}s:19:"wallpaper-1280x1024";a:3:{s:4:"file";s:30:"statues-IMG_6277-1280x1024.jpg";s:5:"width";s:4:"1280";s:6:"height";s:4:"1024";}s:18:"wallpaper-1280x800";a:3:{s:4:"file";s:29:"statues-IMG_6277-1280x800.jpg";s:5:"width";s:4:"1280";s:6:"height";s:3:"800";}}s:10:"image_meta";a:10:{s:8:"aperture";s:3:"1.4";s:6:"credit";s:12:"Alex Leonard";s:6:"camera";s:14:"Canon EOS 550D";s:7:"caption";s:86:"A statue over the doorway of one of the churches in Ballycastle. Well lit up at night.";s:17:"created_timestamp";s:10:"1325525994";s:9:"copyright";s:0:"";s:12:"focal_length";s:2:"50";s:3:"iso";s:3:"400";s:13:"shutter_speed";s:5:"0.005";s:5:"title";s:7:"Statues";}} |
    |   30127 |   28724 | _wp_attached_file       | 2012/01/statues-IMG_6277.jpg

    and here’s a broken image.

    |    4799 |   25410 | _wp_attachment_metadata | a:6:{s:5:"width";s:3:"480";s:6:"height";s:3:"391";s:14:"hwstring_small";s:23:"height='96' width='117'";s:4:"file";s:32:"2011/06/google-vs-rapportive.jpg";s:5:"sizes";a:14:{s:9:"thumbnail";a:5:{s:4:"file";s:32:"google-vs-rapportive-200x162.jpg";s:5:"width";s:3:"200";s:6:"height";s:3:"162";s:4:"path";s:40:"2011/06/google-vs-rapportive-200x162.jpg";s:3:"url";s:102:"http://alex.leonard.ie/wp-content/uploads/2011/06/google-vs-rapportive-200x162.jpg";}s:6:"medium";s:0:"";s:5:"large";s:0:"";s:9:"rss-thumb";a:3:{s:4:"file";s:32:"google-vs-rapportive-400x325.jpg";s:5:"width";s:3:"400";s:6:"height";s:3:"325";}s:19:"standard-list-thumb";a:5:{s:4:"file";s:32:"google-vs-rapportive-160x160.jpg";s:5:"width";s:3:"160";s:6:"height";s:3:"160";s:4:"path";s:40:"2011/06/google-vs-rapportive-160x160.jpg";s:3:"url";s:102:"http://alex.leonard.ie/wp-content/uploads/2011/06/google-vs-rapportive-160x160.jpg";}s:15:"home-post-thumb";a:5:{s:4:"file";s:30:"google-vs-rapportive-75x75.jpg";s:5:"width";s:2:"75";s:6:"height";s:2:"75";s:4:"path";s:38:"2011/06/google-vs-rapportive-75x75.jpg";s:3:"url";s:100:"http://alex.leonard.ie/wp-content/uploads/2011/06/google-vs-rapportive-75x75.jpg";}s:16:"photo-grid-thumb";a:5:{s:4:"file";s:32:"google-vs-rapportive-230x230.jpg";s:5:"width";s:3:"230";s:6:"height";s:3:"230";s:4:"path";s:40:"2011/06/google-vs-rapportive-230x230.jpg";s:3:"url";s:102:"http://alex.leonard.ie/wp-content/uploads/2011/06/google-vs-rapportive-230x230.jpg";}s:19:"wallpaper-1920x1200";s:0:"";s:19:"wallpaper-1920x1080";s:0:"";s:19:"wallpaper-1680x1050";s:0:"";s:18:"wallpaper-1440x900";s:0:"";s:18:"wallpaper-1366x768";s:0:"";s:19:"wallpaper-1280x1024";s:0:"";s:18:"wallpaper-1280x800";s:0:"";}s:10:"image_meta";a:10:{s:8:"aperture";s:1:"0";s:6:"credit";s:12:"Alex Leonard";s:6:"camera";s:0:"";s:7:"caption";s:0:"";s:17:"created_timestamp";s:10:"1309363357";s:9:"copyright";s:0:"";s:12:"focal_length";s:1:"0";s:3:"iso";s:1:"0";s:13:"shutter_speed";s:1:"0";s:5:"title";s:0:"";}} |
    |    4798 |   25410 | _wp_attached_file       | 2011/06/google-vs-rapportive.jpg

    I’m finding it next to impossible to work out what’s going on with this serialised data. They look pretty similar to me, however the one thing I’ve noticed that is in the broken image is mention of “path”. The working image doesn’t mention “path” at all in its serialised data.

    Anyone any thoughts? I don’t think I can just go deleting the path part of the _wp_attachment_metadata, and I’m not even sure how I’d go about programatically doing that.

    Thread Starter alexleonard

    (@alexleonard)

    @swansonphotos sucuri now shows our site as clean. Clearly their system, when seeing an empty root folder which has directory listing disabled (eg returning 403), then returns a malware warning.

    Here’s an example:

    1. No Malware warning: http://sitecheck.sucuri.net/results/http://alex.leonard.ie/ – ok – verified clean

    2. Let’s have a look at my theme’s images folder (an empty folder on our server): http://alex.leonard.ie/wp-content/themes/alex-2012/images/ – this returns a 403 forbidden warning.

    3. Now, let’s get sucuri.net to scan this URL: http://sitecheck.sucuri.net/results/http://alex.leonard.ie/wp-content/themes/alex-2012/images/ – Big red warning – site infected with malware.

    If I upload an index.html file to this directory sucuri.net will now return that this url is clean.

    I would like you to accept that sucuri.net is definitely wrong in this instance. Their error warning is:

    http://sucuri.net/malware/web-site-disabled

    This error happens when your hosting company (Bluehost, Hostmonster, GoDaddy, etc) disabled your site due to security or payment reasons.

    It can also happen if the site went down or is within a maintenance Window. If you get this warning, try to run a real time scan here: http://sitecheck.sucuri.net to see if the problem remains.

    So, because we’ve decided to return 403 forbidden errors when someone tries to browse a directory with no index.html/php file in it (disabled directory listing), sucuri.net is assuming that we’re some generic hosting company that would always allow directory listing in apache.

    Our server is clean. And I’m no closer to finding a result to this issue and I’d understand if no one wanted to touch this thread even though I have a valid and extremely confusing WordPress issue and a site that is definitely not infected with malware.

    Thread Starter alexleonard

    (@alexleonard)

    I do find it funny that our own security measure of disabling directory listing in apache gets us marked as potentially harbouring malware. I’d be far more suspicious of the security of a host that allows directory listing to folders without an index file.

    However I also appreciate that you need to take these things seriously at your end. Cheers!

    Thread Starter alexleonard

    (@alexleonard)

    Hey guys,

    Sorry for the delay in getting back to you. I was out last night.

    The root for the devel subdomain is now ‘clean’

    http://sitecheck.sucuri.net/results/http://devel.pixelapes.com/

    Apparently it’s a potential malware site if we’ve disabled directory listing. To get it changed from malware to not malware I had to create an index.html file

    http://devel.pixelapes.com/index.html

    We run our own server and I take suggestions that we’ve got malware very seriously. I was a little slow yesterday to realise that the reason it was throwing an error was because I didn’t have an index.html file.

    So anyway, I hope you’re happy that it’s all clear now and if there’s any suggestions you have about this issue I’m having, I’d be hugely hugely appreciative of your assistance. It’s really put a downer on my new site launch 🙁

    @ipstenu can I re-instate the links in the original post?

    Thread Starter alexleonard

    (@alexleonard)

    Hi Swanson Photos,

    I have no idea how it thinks that. The folder it has flagged is:
    devel.pixelapes.com/mary-davis/

    This folder contains a load of pdf files and zips with pdf files in them.

    A4_Posters.zip MD-A5-Leaflet-110911-outlined-text.zip MD_A5_Leaflet_290911_Irish_large.zip MD_files_for_printer.zip MD-Panels-080911-outlined-text.pdf
    MD-A5-Leaflet-110911-outlined-text.pdf MD_A5_Leaflet_290911_Irish_large.pdf MD_A5_Leaflet_290911_Irish.pdf MD_Flag.pdf MD_Posters_21x48_FA_080911_Irish_A4.pdf

    I’ve deleted this folder anyway and any other files and zips in the root just in case.

    sucuri.net is still saying the root folder has malware, but perhaps it hasn’t rescanned, but I can only assure you that’s wrong.

    Anyway, I’m only linking to devel.pixelapes.com/alex.leonard.ie which is verified clean:

    http://sitecheck.sucuri.net/results/http://devel.pixelapes.com/alex.leonard.ie/

    I hope that clears everything up. Obviously I take any malware threat as extremely important. This is our own server and is regularly scanned for a huge variety of insecurities. I hope that reassures you.

    Do you think you have any idea what might be wrong?

    Let’s assume your large image width is 800px.
    If you do something like this it should work:

    $largeImage = wp_get_attachment_image_src($post->ID, 'large');
    
    // check if the largeImage width is equal to your setting of 800px
    if ($largeImage[1] == 800) {
      // if it is output large size
      the_post_thumbnail('large');
    } else {
      // if it isn't then show the full size image
      the_post_thumbnail('full');
    }

    I haven’t tested this code, but it should work.

    This was totally baffling me. Thanks for the pointer! I was going around in circles for quite a while. Huzzah for the forums 🙂

Viewing 15 replies - 16 through 30 (of 316 total)