Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
twistor CreditAttribution: twistor commented7.x http://drupalcode.org/project/feeds_tamper.git/commit/ceaf221
6.x http://drupalcode.org/project/feeds_tamper.git/commit/3a032a6
Comment #2
maximpodorov CreditAttribution: maximpodorov commentedUnfortunately, 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)
Comment #3
twistor CreditAttribution: twistor commentedWe need some tests for this.
Comment #4
twistor CreditAttribution: twistor commented7.x http://drupalcode.org/project/feeds_tamper.git/commit/cd938c6
6.x http://drupalcode.org/project/feeds_tamper.git/commit/3a12b2a
That should do it. Thanks!
Comment #6
anibal CreditAttribution: anibal commentedUsing 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.