WordPress.org

Ready to get started?Download WordPress

Forums

Image Teleporter
Works Though Needs a Small Number of PHP Notices Fixing (2 posts)

5 stars
  1. SEO Dave
    Member
    Posted 6 months ago #

    Testing on localhost (Wampserver) and on the main options page see the following notices:

    Unknown 	has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. on line 3006 in file C:\wamp\www\wordpress38beta\wp-includes\functions.php
    Notice 	Undefined index: action on line 410 in file C:\wamp\www\wordpress38beta\wp-content\plugins\image-teleporter\image-teleporter.php
    Notice 	Undefined index: action on line 440 in file C:\wamp\www\wordpress38beta\wp-content\plugins\image-teleporter\image-teleporter.php
    Notice 	Undefined index: action on line 455 in file C:\wamp\www\wordpress38beta\wp-content\plugins\image-teleporter\image-teleporter.php

    I use this plugin http://wordpress.org/plugins/blackbox-debug-bar/ for the notices.

    BTW it says WordPress 38beta, but it's been updated to the latest version of WordPress (currently 3.8) since I created that test install, so this is all in latest WordPress.

    I edited a post to test some external links, basically added some content with external links and after clicking the update button get the following fatal error:

    Fatal error: Class 'finfo' not found in C:\wamp\www\wordpress38beta\wp-content\plugins\image-teleporter\image-teleporter.php on line 136

    the post was saved, so the new content was added to the post, though the external link wasn't changed to local.

    Activating the PHP extension php_fileinfo removed the fatal error and the processing works, might consider adding a check for that extension, though pretty sure most production servershave that extension active.

    On the batch processing page leaving the settings at their defaults and process 5 posts it's working, do get these notices when posts processed have external images:

    Unknown 	has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. on line 3006 in file C:\wamp\www\wordpress38beta\wp-includes\functions.php
    Notice (51) 	Use of undefined constant i - assumed 'i' on line 99 in file C:\wamp\www\wordpress38beta\wp-content\plugins\image-teleporter\image-teleporter.php
    Notice (51) 	Undefined index: i on line 99 in file C:\wamp\www\wordpress38beta\wp-content\plugins\image-teleporter\image-teleporter.php

    So it's working, but for best plugin practices the notices should be removed.

    Ran the plugin on a live site and it seems to have processed correctly other than three images. Not checked all three yet, one post was linking to a broken image at http://img515.imageshack.us/img515/5352/makeuptipsforthewedding.jpg after processing the src part of the link code was empty. Looks like that's what I'm seeing on all three posts, the img code is there minus the image.

    You might want to look into that, if a server is down when you run the plugin will it delete the temporarily broken link? Ideally I'd want the broken link left as is so I can manually fix it, look for an alternative or if it is temporary down wait for the sites server to be working. I use http://wordpress.org/plugins/broken-link-checker/ for checking for broken links, also easy to use to check where an image is hosted which is how I found the three broken images.

    The live site I tested on is using the Domain Mapping Plugin, didn't cause any problems.

    Nice plugin :-)

    David

  2. InternetMedicineMan
    Member
    Posted 6 months ago #

    Hi David,

    Fixed the warnings and cleaned up the code a little more. finfo should be a standard extension on a production server but I'll look at fixing that as well.

    I need to investigate the missing link issue. It is set up to only replace if there was no error on the image. So I'm curious what happens here. Thanks for point it out so I can look into it further. For now it is recommended you run a broken-link-checker in advance as you suggest.

    Also thanks for the heads up on the blackbox debug bar. Looks like a handy tool.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.