Search

I'm going mad here guys…

I've just dropped a new Symphony install, started setting everything up etc. But have just run into a problem.

My pages aren't pulling in the master utility.

Everything is set up normally and as you'd expect. What's even stranger is that if I intentionally break the code in the master utility the pages will fail with a Symphony warning, but when semantic, the utility is clearly not present. When debugging the page, the master utility shows up in the sidebar, and clicking on it displays the code I'd expect. So any idea why none of it is actually being loaded into the page?

Anyone ever seen anything like this before? I'd show you some code, but it looks exactly how you'd expect it to look…

Symphony 2.3.2 if relevant.

Wow, must be a long day. Apparently I hadn't changed the 'match' to 'data' on the page template (why do I always discover these things within minutes of posting the problem, even if I've spent half an hour trouble shooting it? Stupid brain).

Although I don't ever remember this causing an issue before - I assume that it's required for master utilities to work? Is this new or just something I've never noticed before? I'm not 100% sure why the xpath base should effect the function of a master utility.

I assume that it's required for master utilities to work?

Indeed.

Is this new or just something I've never noticed before?

You didn't notice :)

I'm not 100% sure why the xpath base should effect the function of a master utility.

In master.xsl you have:

<!-- Match the root of the XML -->
<xsl:template match="/">
    ... do master stuff here ...

    <!-- Allow for further processing of any nodes it can find under "/". In Symphony case it is "data" node -->
    <xsl:apply-templates/>
</xsl:template>

In page.xsl you have:

<!-- this is matched because of the "<xsl:apply-templates/>" in master.xsl. -->
<xsl:template match="data">
     ... do page stuff here ...
</xsl:template>

If in page.xsl you have:

<xsl:template match="/">
    ... do page stuff ...
</xsl:template>

you will be over-writing the rule for / found in master.xsl thus not using it.

Thanks Vlad, now that I think about it it makes perfect sense - not sure why I was treating it differently to any other template in my head.

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