Search

HI all,

Has anyone has issues when using Symphony on a server with version 1.1.28 of libxslt?

We've recently migrated a site to a new server with v1.1.28 and it's causing all kinds of errors and issues, namely being more strict about multiple elements with the same ID in the same document (which of course is, strictly speaking, not valid). We're getting errors like this:

ID header-1 already defined

I know it's something we need to fix - we shouldn't have conflicting IDs - but there's a bunch of other issues like elements not be rendered correctly also.

Has anyone else experienced anything like this using v1.1.28 of libxslt?

(If you want to check which version you're on, just use phpinfo() and it should have libxslt Version xxx somewhere in there)

I'm running libxslt 1.1.28 locally and not facing these issues. Is that they only thing that has changed?

Hey Brendan,

We had this issue a while back when the server was updated. We saw the same thing happening and rolled back the updates which fixed the issue.

There's a bunch of differences between the original server and the new one, but I'm pretty confidant it's the same issue again. It's libxslt 1.1.28 compiled against libxml version 2.9.1.

I've actually got a suspicion it's a bad version of libxslt which is bundled with the automatic sever updates for centOS/lightspeed?

No worries I'll try digging a bit further and see what comes up.

Thanks!

A quick update: it looks as if it's libxml 2.9.1 causing the issue, not libxslt.

@brendan, could you verify which version of libxml you libxslt was compiled against? I have a feeling it's not v2.9.1.

Thanks.

On my current machine it's libxml 2.9.0. I'll check my laptop when I'm home.

Can you do a project search for loadHTML(? This StackOverflow thread could be more on the right track.

Thanks, but unfortunately no success.

loadHTML exists only in the Markdown and ETF extensions, but changing all instances to loadXML doesn't fix the issue.

Ultimately the issue w'e're seeing is caused by duplicate ID's on one page, which is caused by a bug in the output.xsl util we're using.

Adding level="any" to the xsl:number element (output.xsl - line 41 in our version - not sure if it's a standard util or not) fixes the issue, because I believe 'level' used to be implicitly defined as 'any', where as now it's been changed to 'single', which only searches a single node level. 'Any' searches the entire doc and needs to be explicitly defined now.

Although this does fix a bug in the output util, it's still not solving the issue of having multiple IDs in a document - which should be valid HTML (not XML).

I guess it might be better to search for the offending loadXML function (in symphony core) and change it to loadHTML ...? But I assume symphony is parsing XHTML, which needs loadXML, i think.

The SO question you linked to deals with an element having an id and name attribute with identical values, where as this is slightly different - although could definitely be related.

I've posted this question myself to SO and have had a few responses so far. I've also contacted the creator of libxml and libxslt and filed a bug report, as I think it is a bug.

Anyway, I'll keep digging. The website is up and running as expected, we're just a bit afraid it'll fall over sometime in the future when duplicate ID's make it onto the same page again. Plus any other site which can't be ported to a server running this version of libxml

Note: I haven't tried it with libxml v2.9.2 (latest) which might fix the issue.

Note: I haven't tried it with libxml v2.9.2 (latest) which might fix the issue.

I've just encountered this issue as well with the updated 2.9.2. This issue still persists.

libxslt Version => 1.1.28
libxslt compiled against libxml Version => 2.9.2

As an FYI, the root of the problem is likely to be in the output.xsl utility (it was included in most R&B projects). Remove this block and things start ticking along again.

<xsl:attribute name="id">
    <xsl:variable name="position">
        <xsl:number count="h1|h2|h3|h4|h5|h6" />
    </xsl:variable>

    <xsl:value-of select="concat($current-page, '-', $handle, '-header-', $position)" />
</xsl:attribute>

I have noticed this problem on a new install of LAMP on OSX El Capitan which ships with:

libxslt Version 1.1.28
libxslt compiled against libxml Version 2.9.2

So I guess others may experience this soon.

My solution was to sort out the duplicate IDs in the page output. Its good practice anyway but not necessarily something you want to do with legacy sites for which there is no budget!

I can confirm the issue. It's a libxslt regression bug. But hey, you should never have duplicated id in your html document anyways. generate-id() can help a lot in those cases

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details