feeds_tamper_absolute_url_callback() uses DOM functions to parse HTML. It produces warnings when HTML is not good enough. I recommend the following changes:

--- absolute_url.inc.orig       2013-05-14 11:27:44.000000000 +0400
+++ absolute_url.inc    2013-05-14 11:22:16.000000000 +0400
@@ -29,6 +29,7 @@
     $dom = new DOMDocument();
   }
 
+  libxml_use_internal_errors(true);
   $dom->loadHTML($field);
   $urls = array();
   $tags = array('a' => 'href', 'img' => 'src', 'iframe' => 'src',

or

--- absolute_url.inc.orig       2013-05-14 11:27:44.000000000 +0400
+++ absolute_url.inc    2013-05-14 11:28:17.000000000 +0400
@@ -29,7 +29,7 @@
     $dom = new DOMDocument();
   }
 
-  $dom->loadHTML($field);
+  @$dom->loadHTML($field);
   $urls = array();
   $tags = array('a' => 'href', 'img' => 'src', 'iframe' => 'src',
                 'script' => 'src', 'object' => 'codebase', 'link' => 'href',

Comments

twistor’s picture

maximpodorov’s picture

Status: Fixed » Active

Unfortunately, this commit doesn't fix the problem. I receive such messages in watchdog:
Warning: DOMDocument::loadHTML(): Empty string supplied as input in feeds_tamper_absolute_url_callback() (line 36 in feeds_tamper/plugins/absolute_url.inc)

twistor’s picture

Assigned: Unassigned » twistor
Issue tags: +Needs tests

We need some tests for this.

twistor’s picture

Assigned: twistor » Unassigned
Status: Active » Fixed
Issue tags: -Needs tests

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

anibal’s picture

Issue summary: View changes

Using feeds tamper to import urls of remote files in commerce file feeds, this error stops the import process.

Warning: DOMDocument::loadHTML(): Empty string supplied as input in feeds_tamper_absolute_url_callback() (line 32 of /home/cd-ai/domains/mysite/public_html/sites/all/modules/feeds_tamper/plugins/absolute_url.inc).

The field in the commerce entity is from commerce_file module, and i used Remote File Source (Provide a way to add external files without transferring the file locally.) to add this options to commerce_file.

Any ideas?

I'm stuck importing 15.000 items....

besides this i imported everything from the remote site, images, nodes etc etc. all smooth as silk.

I hope i was clear in my exposition of the error.