After updating the module from 6.x-2.x to 6.x-3.x, it doesn't work anymore:

  • "Use JavaScript to open external links in a new window" doesn't have any effect
  • "Add an icon to external and mailto links" makes all links disappear

Any ideas what could cause this? I already tried re-ordering the input formats, but that makes no difference.

Comments

yan’s picture

Now I'm also getting this error message:

DOMDocument::saveHTML() expects exactly 0 parameters, 1 given in /sites/all/modules/elf/elf.module on line 181.
omelhor’s picture

I have the same error :
<<<
warning: DOMDocument::saveHTML() expects exactly 0 parameters, 1 given in C:\wamp\www\sites\all\modules\elf\elf.module on line 181.
>>>

I have installed it via wampserver on my computer

EllECTRONC’s picture

PHP Error:

DOMDocument::loadHTML() [<a href='domdocument.loadhtml'>domdocument.loadhtml</a>]: htmlParseEntityRef: expecting ';' in Entity, line: 1 in file /.../sites/all/modules/elf/elf.module on line 151.

And something wrong with link class, it seems it is glued together with my link class

So I did rollback to 6.x-2.1

yan’s picture

Priority: Normal » Critical
dlnsk’s picture

It's because you need PHP 5.3.6 or higher (see http://www.php.net/manual/en/domdocument.savehtml.php)
I think maintainer should require PHP 5.3.6 in function elf_requirements().

Or maybe the best choice is get rid of the parameter in method saveHTML()...

yan’s picture

Status: Active » Closed (works as designed)

True, server is running PHP 5.2.12. But it's sad that the module suddenly has such high requirements.

EllECTRONC’s picture

Status: Closed (works as designed) » Active

I'm on PHP 5.3.8 with this error

yan’s picture

Version: 6.x-3.0-alpha2 » 7.x-3.0-alpha2

The same happens to me with 7.x-3.0-alpha2:

  • "Use JavaScript to open external links in a new window" doesn't have any effect
  • "Add an icon to external and mailto links" makes all links disappear

And this error message:

Warning: DOMDocument::saveHTML() expects exactly 0 parameters, 1 given in _elf_replace_callback() (line 182 of /sites/all/modules/elf/elf.module).

Running PHP 5.3.8.

yan’s picture

Could a maintainer say something about this issue? At least, it breaks the whole module...

yan’s picture

This is really disappointing... The module is broken, the issue is marked 'critical' and no answer for months. Is this module really "Actively maintained"?

furamag’s picture

StatusFileSize
new944 bytes

"Use JavaScript to open external links in a new window" option doesn't work for me (7.x-3.0-alpha2 and 7.x-3.0-dev).
Why we are using JavaScript to open external links in a new window? I think we should add 'target="_blank"' when we add class for external link.
I created patch for External Links Filter module which add additional option "Open external links in a new window without JavaScript". I'm not sure if this is the right place to add my patch. Let me know if you think I should create new issue for it. This patch created for 7.x-3.0-dev. I'm on PHP 5.2.9-2.

yan’s picture

Why we are using JavaScript to open external links in a new window? I think we should add 'target="_blank"' when we add class for external link.

The problem is that target="_blank" is not valid XHTML strict:
http://www.w3.org/MarkUp/2004/xhtml-faq#target

klaasvw’s picture

Title: Module broken after upgrade to 6.x-3.x » Incompatible with PHP versions below 5.3.6
StatusFileSize
new3 KB

Here's a patch that fixes the issue. The problem is that elf uses DOMDocument::saveHTML with a parameter, which was introduced in PHP 5.3.6 (see http://www.php.net/manual/en/domdocument.savehtml.php). This patch will make elf use drupal's filter module's own wrappers around DOMDocument.

Patch is against HEAD. Also made the title more suitable for the issue.

@furamag Doesn't really sound this is related to this issue. Maybe you could make a separate one?

marty2081’s picture

Patch from #13 works for me against dev branch. @klaasvw: Thanks for the effort!

WorldFallz’s picture

Version: 7.x-3.0-alpha2 » 7.x-3.x-dev
Issue summary: View changes
Status: Active » Fixed

Committed a reworked version of #13 to account for other bug fixes. There are no comparable wrapper functions for d6. If anyone has any ideas for 6.x-3.x I'm open to patches.

And #11 was unrelated and fixed in #1872732: Opening in a new window doesn't work.

Thanks again klaasvw!

WorldFallz’s picture

Version: 7.x-3.x-dev » 6.x-3.x-dev
Status: Fixed » Patch (to be ported)

I just had a thought-- I should be able to hijack the d7 functions and include them directly with the module's code.

WorldFallz’s picture

Status: Patch (to be ported) » Fixed

yep, that worked with little effort. This is now committed to 6.x-3.x as well.

Status: Fixed » Closed (fixed)

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