After downloading and enabling this module, I am getting a PHP error message from the install file:

Warning: DOMDocument::loadHTML(): Empty string supplied as input in echo_requirements() (line 22 of /var/www/sites/all/modules/echo/echo.install).

The problem is that echo_themed_page() is not returning anything in your test. I am using PHP 5.3.5 on Ubuntu

Comments

pillarsdotnet’s picture

Dunno what code you're running but the 7.x-1.9 version is actually missing the echo.install file.

Rolling a 7.x-1.10 release shortly.

edvanleeuwen’s picture

Subscribing.

amfriedman’s picture

I double-checked my version and my files. It is 1.9, and the echo.install file does, in fact, come with it.

pillarsdotnet’s picture

weird. Will look into.

kingfisher64’s picture

StatusFileSize
new139.78 KB

I'm getting similar errors

    Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: htmlParseStartTag: invalid element name in Entity, line: 21 in echo_requirements() (line 22 of C:\wamp\www\development\sandbox\sites\all\modules\echo\echo.install).
    Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: Unexpected end tag : style in Entity, line: 25 in echo_requirements() (line 22 of C:\wamp\www\development\sandbox\sites\all\modules\echo\echo.install).
    Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: htmlParseStartTag: invalid element name in Entity, line: 26 in echo_requirements() (line 22 of C:\wamp\www\development\sandbox\sites\all\modules\echo\echo.install).
    Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: Tag header invalid in Entity, line: 154 in echo_requirements() (line 22 of C:\wamp\www\development\sandbox\sites\all\modules\echo\echo.install).
    Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: Tag hgroup invalid in Entity, line: 171 in echo_requirements() (line 22 of C:\wamp\www\development\sandbox\sites\all\modules\echo\echo.install).
    Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: Tag section invalid in Entity, line: 220 in echo_requirements() (line 22 of C:\wamp\www\development\sandbox\sites\all\modules\echo\echo.install).
    Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: Tag aside invalid in Entity, line: 237 in echo_requirements() (line 22 of C:\wamp\www\development\sandbox\sites\all\modules\echo\echo.install).
    Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: Tag aside invalid in Entity, line: 257 in echo_requirements() (line 22 of C:\wamp\www\development\sandbox\sites\all\modules\echo\echo.install).
    Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: Tag footer invalid in Entity, line: 278 in echo_requirements() (line 22 of C:\wamp\www\development\sandbox\sites\all\modules\echo\echo.install).
Yanivs’s picture

Hi,

I think I found the cause of this problem.

In echo.install there is a check for working cache implementation that relies on the "Bartik" theme.

In my installation the "Bartik" theme was disabled when I got the above mentioned error messages.

After enabling the "Bartik" theme the error messages were gone!

Hope this will help somebody.

Y

kingfisher64’s picture

So the dependecy for Bartik theme needs to be removed? or is this part of how the mod should work?

I use Omega and a relevant omega subtheme for each site.

Does this need fixing pillarsdotnet?

Many thanks

pillarsdotnet’s picture

Status: Active » Needs review
StatusFileSize
new879 bytes

Try this patch.

selfirian’s picture

Hi I tried your patch but it doesn't seem to resolve the issue I still have the error messages... as mentioned in #5

peterx’s picture

Status: Needs review » Reviewed & tested by the community

Patch #8 removed the error for us. Could the change be applied for those people with the bartik problem?

For #9, I suggest a search of the variable table for name like 'theme%'. theme_default might be present but empty. The code could be something like:

$theme = variable_get('theme_default', 'bartik');
if (empty($theme)) {
  watchdog('Echo', 'Your theme_default is empty: @t', array('@t' => serialize($theme)));
}
deanflory’s picture

Upon running cron manually and ending up on the Status report page, I get these errors after enabling the Echo 7.x-1.9 module in D7.15:

Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: Attribute xmlns:fb redefined in Entity, line: 12 in echo_requirements() (line 22 of /home/account/public_html/drupal/sites/all/modules/echo/echo.install).
Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: htmlParseEntityRef: expecting ';' in Entity, line: 148 in echo_requirements() (line 22 of /home/account/public_html/drupal/sites/all/modules/echo/echo.install).
Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: htmlParseEntityRef: expecting ';' in Entity, line: 148 in echo_requirements() (line 22 of /home/account/public_html/drupal/sites/all/modules/echo/echo.install).

deanflory’s picture

Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: Attribute xmlns:fb redefined in Entity, line: 12 in echo_requirements() (line 22 of /home/account/public_html/drupal/sites/all/modules/echo/echo.install).
Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: htmlParseEntityRef: expecting ';' in Entity, line: 157 in echo_requirements() (line 22 of /home/account/public_html/drupal/sites/all/modules/echo/echo.install).
Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: htmlParseEntityRef: expecting ';' in Entity, line: 157 in echo_requirements() (line 22 of /home/account/public_html/drupal/sites/all/modules/echo/echo.install).
Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: htmlParseEntityRef: expecting ';' in Entity, line: 172 in echo_requirements() (line 22 of /home/account/public_html/drupal/sites/all/modules/echo/echo.install).
Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: htmlParseEntityRef: expecting ';' in Entity, line: 172 in echo_requirements() (line 22 of /home/account/public_html/drupal/sites/all/modules/echo/echo.install).
Notice: Undefined index: value in theme_status_report() (line 2572 of /home/account/public_html/drupal/modules/system/system.admin.inc).

Uninstalling to see if this isn't causing some other issues.

jeroenmarinus’s picture

I was getting these error messages:

Warning: DOMDocument::loadHTML(): Tag nav invalid in Entity, line: 114 in echo_requirements() (line 22 of /var/www/jeugdwilrijk2.local/sites/all/modules/echo/echo.install).
Warning: DOMDocument::loadHTML(): Tag nav invalid in Entity, line: 125 in echo_requirements() (line 22 of /var/www/jeugdwilrijk2.local/sites/all/modules/echo/echo.install).
Warning: DOMDocument::loadHTML(): Tag section invalid in Entity, line: 134 in echo_requirements() (line 22 of /var/www/jeugdwilrijk2.local/sites/all/modules/echo/echo.install).
Warning: DOMDocument::loadHTML(): Tag section invalid in Entity, line: 135 in echo_requirements() (line 22 of /var/www/jeugdwilrijk2.local/sites/all/modules/echo/echo.install).
Warning: DOMDocument::loadHTML(): Tag header invalid in Entity, line: 137 in echo_requirements() (line 22 of /var/www/jeugdwilrijk2.local/sites/all/modules/echo/echo.install).

Which is the cause of HTML5 tags. DomDocument does not handle them. See http://stackoverflow.com/questions/5033504/php-domdocument-loadhtml-retu...

Robin Millette’s picture

I'm seeing this error:

Warning : DOMDocument::loadHTML(): ID main-content-area already defined in Entity, line: 110 dans echo_requirements() (ligne 22 dans [...]/sites/all/modules/echo/echo.install).

Haven't yet looked further into it. This is with Echo 7.x-1.9.

tripper54’s picture

I was getting the same error in line 22 of echo.install:

Warning: DOMDocument::loadHTML(): Empty string supplied as input in echo_requirements() (line 22 of /var/www/sites/all/modules/echo/echo.install).

In my case, echo_themed_page was returning a 401 unauthorised response, caused by me having a htauth username/password protecting the site.

Turning this off solved the problem.

(actually, I'm now having the HTML5 issues mentioned in #13, but that's another story).

tripper54’s picture

[double post, sorry]

k4b0um’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new616 bytes

I was getting this one :
Warning : DOMDocument::loadHTML() [domdocument.loadhtml]: htmlParseEntityRef: expecting ';' in Entity, line: 193 dans echo_requirements() (ligne 23 dans sites/all/modules/contrib/echo/echo.install).

The warning from loadHTML was cause by invalid syntax of the html document to load ( & used as parameter separator in an url, insatead of '&', generate by media_youtube module).

So, i use libxml_use_internal_errors(true), to disbale libxml errors... but it'snt a valid solution

summit’s picture

Hi,

Could it have something to do with http://stackoverflow.com/questions/3614586/dom-error-id-someanchor-alrea...
If you are loading XML files (that's the case, XHTML is XML), then you should use DOMDocument::loadXML(), not DOMDocument::loadHTML().

In HTML, both name and id introduce an ID. So you are repeating the id "someAnchor", hence the error.

However, the W3C validator allows repeated IDs in the form you show . This may be a bug of libmxl2.

Greetings, Martijn

nancydru’s picture

Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: Namespace prefix xmlns of attribute xsd is not defined in Entity, line: 12 in echo_requirements() (line 22 of /home/www2/drupal-7.16/sites/captservices.edc.org/modules/contrib/echo/echo.install).

Drupal 7.16, PHP 5.3.21, MySql 5.1.58, Echo 7.x-1.9

peterx’s picture

@Nancy, a quick test would be to find a theme containing xsd and test. Xsd is an XML thing. D7 Bartik declares itself as XHTML. LoadHTML might see XHTML and tryto do a loadXML process.

I looked in the source of several sites and did not find xsd in any theme, making it difficult to test with and without xsd. loadHTML should not care about xsd missing but that XHTML specification in Bartik might confuse the DomDocument code. Parhaps you could test with a theme that is not XHTML.

nancydru’s picture

The site's theme is based on Zen 7.x-5.x and changing that is pretty close to impossible. I was trying this module with HTML Mail. It doesn't look like it's going to work out for me.

peterx’s picture

@Nancy, the the test does not require changing Zen. Echo install uses Bartik to test caching. See echo.install line 18: $theme = 'bartik';
Test 1. Is Bartik switched on or off? Test the other way to what you have now.
Test 2. Change the install line to $theme = 'zen'; and test.

nancydru’s picture

Well, I can't get it to fail again. Bartik is enabled, and was when I got the message.

I can't see that this module is doing anything for me. My email is basically unformatted, certainly unthemed.

jens peter’s picture

I have the same problem as in #19.
And it also broke all mails being sent from the site (no content).
I did activate Bartik but it didn't change anything.

It seems the same error have been running for a very long time so should I take this as a sign that it is not going to be solved any time soon?

I can test ideas but for now I will remove the module as the site is live.

quixxel’s picture

Is there any progress in solving these issues?

After install of echo 7.x-1.9 I got the following messages:

Warning: DOMDocument::loadHTML(): htmlParseEntityRef: expecting ';' in Entity, line: 9 in echo_requirements() (Zeile 22 von /sites/all/modules/echo/echo.install).

Warning: DOMDocument::loadHTML(): Tag header invalid in Entity, line: 126 in echo_requirements() (Zeile 22 von /sites/all/modules/echo/echo.install).

Warning: DOMDocument::loadHTML(): Unexpected end tag : div in Entity, line: 155 in echo_requirements() (Zeile 22 von /sites/all/modules/echo/echo.install).

Warning: DOMDocument::loadHTML(): Unexpected end tag : div in Entity, line: 156 in echo_requirements() (Zeile 22 von /sites/all/modules/echo/echo.install).

Warning: DOMDocument::loadHTML(): Unexpected end tag : div in Entity, line: 157 in echo_requirements() (Zeile 22 von /sites/all/modules/echo/echo.install).

Warning: DOMDocument::loadHTML(): Unexpected end tag : div in Entity, line: 159 in echo_requirements() (Zeile 22 von /sites/all/modules/echo/echo.install).

Warning: DOMDocument::loadHTML(): Unexpected end tag : header in Entity, line: 159 in echo_requirements() (Zeile 22 von /sites/all/modules/echo/echo.install).

Warning: DOMDocument::loadHTML(): Unexpected end tag : div in Entity, line: 214 in echo_requirements() (Zeile 22 von /sites/all/modules/echo/echo.install).

Warning: DOMDocument::loadHTML(): Unexpected end tag : div in Entity, line: 214 in echo_requirements() (Zeile 22 von /sites/all/modules/echo/echo.install).

Warning: DOMDocument::loadHTML(): Unexpected end tag : body in Entity, line: 238 in echo_requirements() (Zeile 22 von /sites/all/modules/echo/echo.install).

duckydan’s picture

Issue summary: View changes

In the event one of the steps I took to resolve this works for more than just me, here is what I did:

I was having the

Warning: DOMDocument::loadHTML(): Empty string supplied as input in echo_requirements() (line 22 of /var/www/sites/all/modules/echo/echo.install).

problem. So, I did two things that, in my case, made the issue go away.

One, was I turned on my caching.

Second, turned out there was an issue on this server doing a domain lookup, so I added:

127.0.0.1 mydomain.com

to my hosts file on the server so it would be able to "find itself".

This made the error message (and a ton of errors on my "Status report" page) disappear. Everything is running great now.

Anonymous’s picture

#17 Works for me. Any way its a good addition to look for current theme instead of expecting everyone uses only bartik.

Yorgg’s picture

#17 cleaned up the status report error messages for me.

nico.knaepen’s picture

Code was not compliant with the coding standards regarding commenting. Please add above the code and add full stop at the end of each sentence.

I've added a new patch with the coding standards applied.

britter’s picture

Is there a good argument to not just use "global $theme;"? Instead of "$theme = variable_get('theme_default', 'bartik');"? Patch was very helpful though, thank you!

joelstein’s picture

Status: Needs review » Reviewed & tested by the community

Patch in #29 removed the errors for me. Thanks!

hamrant’s picture

Patch in #29 also help with this error:

Warning: DOMDocument::loadHTML(): ID logo already defined in Entity, line: 122 in echo_requirements() (line 24 of .../sites/all/modules/echo/echo.install).
Chris Charlton’s picture

I'm surprised I just got bit by this 4 year old issue! Patch in #29 fixed this for me. I am now the third community member here to acknowledge [RTBC] #29. Can we move forward on this?

Errors (for posterity)

Warning: DOMDocument::loadHTML(): End tag : expected '>' in Entity, line: 89 in echo_requirements() (line 22 of /drupal/sites/all/modules/contrib/echo/echo.install).
Warning: DOMDocument::loadHTML(): Unexpected end tag : scr in Entity, line: 89 in echo_requirements() (line 22 of /drupal/sites/all/modules/contrib/echo/echo.install).
Warning: DOMDocument::loadHTML(): Tag nav invalid in Entity, line: 154 in echo_requirements() (line 22 of /drupal/sites/all/modules/contrib/echo/echo.install).
Warning: DOMDocument::loadHTML(): Tag section invalid in Entity, line: 165 in echo_requirements() (line 22 of /drupal/sites/all/modules/contrib/echo/echo.install).
Warning: DOMDocument::loadHTML(): htmlParseEntityRef: no name in Entity, line: 172 in echo_requirements() (line 22 of /drupal/sites/all/modules/contrib/echo/echo.install).
Warning: DOMDocument::loadHTML(): Tag section invalid in Entity, line: 206 in echo_requirements() (line 22 of /drupal/sites/all/modules/contrib/echo/echo.install).
Warning: DOMDocument::loadHTML(): htmlParseEntityRef: no name in Entity, line: 213 in echo_requirements() (line 22 of /drupal/sites/all/modules/contrib/echo/echo.install).
Warning: DOMDocument::loadHTML(): ID what-to-do already defined in Entity, line: 219 in echo_requirements() (line 22 of /drupal/sites/all/modules/contrib/echo/echo.install).
Warning: DOMDocument::loadHTML(): Tag section invalid in Entity, line: 247 in echo_requirements() (line 22 of /drupal/sites/all/modules/contrib/echo/echo.install).
deanflory’s picture

Patch in #29 gave me:

patch: **** malformed patch at line 16: $document->loadHTML(echo_themed_page($title, $content, $theme));

nico.knaepen’s picture

@deanflory,

On which version are you trying to apply the patch?

deanflory’s picture

echo 7.x-1.9

nsherzog’s picture

I'm getting the same error with patch #29 as listed in #34

timb’s picture

I solved this problem recently by enabling Bartik theme, but after upgrading to Drupal 7.56 I am now getting errors again.

Warning: DOMDocument::loadHTML(): Tag nobr invalid in Entity, line: 139 in echo_requirements() (line 22 of /srv/bindings/91a4c4c770e7450dbe2d4eba6dffef7b/code/sites/all/modules/echo/echo.install).

Is there any plans to incorporate these patches into a stable release? This issue has been around for more than five years.

  • nico.knaepen authored 2f7e1a0 on 7.x-1.x
    Issue #1558140 by pillarsdotnet, nico.knaepen, k4b0um, kingfisher64:...
pillarsdotnet’s picture

pillarsdotnet’s picture

Assigned: Unassigned » pillarsdotnet
Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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

matas.k’s picture

Not fixed. Refer to #39. How can you ignore people reporting the patch doesn't fix, but you still tag it fixed anyway?

gmaximus’s picture

I just had to apply the patch from #29 to make my errors go away on 1.9?

socialnicheguru’s picture

@vibrasphere I think it might have been applies to the dev version