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
| Comment | File | Size | Author |
|---|---|---|---|
| #29 | 1558140-Fixing_error_message_and_coding_standards.patch | 623 bytes | nico.knaepen |
| #17 | echo-1558140-17.patch | 616 bytes | k4b0um |
| #8 | echo-1558140-theme.patch | 879 bytes | pillarsdotnet |
| #5 | Warning-DOMDocument-loadHTML.png | 139.78 KB | kingfisher64 |
Comments
Comment #1
pillarsdotnet commentedDunno 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.
Comment #2
edvanleeuwenSubscribing.
Comment #3
amfriedman commentedI double-checked my version and my files. It is 1.9, and the echo.install file does, in fact, come with it.
Comment #4
pillarsdotnet commentedweird. Will look into.
Comment #5
kingfisher64 commentedI'm getting similar errors
Comment #6
Yanivs commentedHi,
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
Comment #7
kingfisher64 commentedSo 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
Comment #8
pillarsdotnet commentedTry this patch.
Comment #9
selfirian commentedHi I tried your patch but it doesn't seem to resolve the issue I still have the error messages... as mentioned in #5
Comment #10
peterx commentedPatch #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:
Comment #11
deanflory commentedUpon 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:
Comment #12
deanflory commentedWarning: 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.
Comment #13
jeroenmarinusI was getting these error messages:
Which is the cause of HTML5 tags. DomDocument does not handle them. See http://stackoverflow.com/questions/5033504/php-domdocument-loadhtml-retu...
Comment #14
Robin Millette commentedI'm seeing this error:
Haven't yet looked further into it. This is with Echo 7.x-1.9.
Comment #15
tripper54 commentedI 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).
Comment #16
tripper54 commented[double post, sorry]
Comment #17
k4b0um commentedI 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
Comment #18
summit commentedHi,
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
Comment #19
nancydruDrupal 7.16, PHP 5.3.21, MySql 5.1.58, Echo 7.x-1.9
Comment #20
peterx commented@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.
Comment #21
nancydruThe 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.
Comment #22
peterx commented@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.Comment #23
nancydruWell, 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.
Comment #24
jens peter commentedI 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.
Comment #25
quixxel commentedIs 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).
Comment #26
duckydan commentedIn 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.comto 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.
Comment #27
Anonymous (not verified) commented#17 Works for me. Any way its a good addition to look for current theme instead of expecting everyone uses only bartik.
Comment #28
Yorgg commented#17 cleaned up the status report error messages for me.
Comment #29
nico.knaepen commentedCode 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.
Comment #30
britter commentedIs 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!
Comment #31
joelstein commentedPatch in #29 removed the errors for me. Thanks!
Comment #32
hamrant commentedPatch in #29 also help with this error:
Comment #33
Chris CharltonI'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)
Comment #34
deanflory commentedPatch in #29 gave me:
patch: **** malformed patch at line 16: $document->loadHTML(echo_themed_page($title, $content, $theme));
Comment #35
nico.knaepen commented@deanflory,
On which version are you trying to apply the patch?
Comment #36
deanflory commentedecho 7.x-1.9
Comment #37
nsherzog commentedI'm getting the same error with patch #29 as listed in #34
Comment #38
timb commentedI solved this problem recently by enabling Bartik theme, but after upgrading to Drupal 7.56 I am now getting errors again.
Is there any plans to incorporate these patches into a stable release? This issue has been around for more than five years.
Comment #40
pillarsdotnet commentedCommitted to repo.
http://cgit.drupalcode.org/echo/commit/?id=2f7e1a0
Comment #41
pillarsdotnet commentedComment #43
matas.k commentedNot fixed. Refer to #39. How can you ignore people reporting the patch doesn't fix, but you still tag it fixed anyway?
Comment #44
gmaximus commentedI just had to apply the patch from #29 to make my errors go away on 1.9?
Comment #45
socialnicheguru commented@vibrasphere I think it might have been applies to the dev version