Jump to content

xmlXPathCompOpEval & XPath errors


phpbossman

Recommended Posts

Hello, I recently moved hosts and upgraded to PHP 7.4.10. Suddenly, one of my sites is having issues with XSL views. The software creator claims this is an issue with XSL in PHP. I am unsure of what to check to troubleshoot this. Would anyone have an opinion on my issue? If not, please let me know if I should be posting somewhere else altogether. Thanks in advance -

 

Quote

xmlXPathCompOpEval: function function not found
XPath error : Unregistered function
xmlXPathCompiledEval: 3 objects left on the stack.
runtime error: file /Sitessection/view.xsl line 32 element value-of
XPath evaluation returned no result

The view.xsl file:

 

Quote

        <xsl:value-of select="php:function( 'SobiPro::AlternateLink', $rssUrl, 'application/atom+xml', $sectionName )"/>
        <xsl:variable name="showCategoriesLabel">
            <xsl:value-of select="php:function( 'SobiPro::Txt', 'CATEGORIES_SHOW' )"/>
        </xsl:variable>

 

Link to comment
Share on other sites

Yes and I agree. It's
 

Quote

        <xsl:value-of select="php:function( 'SobiPro::AlternateLink', $rssUrl, 'application/atom+xml', $sectionName )"/>

 

xmlXPathCompiledEval: 3 objects left on the stack.
runtime error: file /view.xsl line 32 element value-of
XPath evaluation returned no result.

 

Also get this in PHP but I believe irrelevant:

Quote

PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /view.php on line 1436

 

Link to comment
Share on other sites

Here is the full xls.

 

<?xml version="1.0" encoding="UTF-8"?><!--
 @package: SobiPro Template SobiPackages for SobiPro Component!

 @author
 Name: Sigrid Suski & Radek Suski, Sigsiu.NET GmbH
 Email: sobi[at]sigsiu.net
 Url: https://www.Sigsiu.NET

 @copyright Copyright (C) 2006 - 2018 Sigsiu.NET GmbH (https://www.sigsiu.net). All rights reserved.
 @license Released under Sigsiu.NET Template License V1.

 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-->

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:php="http://php.net/xsl" exclude-result-prefixes="php">
	<xsl:output method="xml" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" encoding="UTF-8"/>

	<xsl:include href="../common/navigation.xsl"/>
	<xsl:include href="../common/topmenu.xsl"/>
	<xsl:include href="../common/alphamenu.xsl"/>
	<xsl:include href="../common/entries.xsl"/>
	<xsl:include href="../common/categories.xsl"/>
	<xsl:include href="../common/messages.xsl"/>

	<xsl:template match="/category">
		<xsl:variable name="rssUrlSection">{"sid":"<xsl:value-of select="section/@id"/>","sptpl":"feeds.rss","out":"raw"}
		</xsl:variable>
		<xsl:variable name="sectionName">
			<xsl:value-of select="section"/>
		</xsl:variable>
		<xsl:variable name="showCategoriesLabel">
			<xsl:value-of select="php:function( 'SobiPro::Txt', 'CATEGORIES_SHOW' )"/>
		</xsl:variable>

		<xsl:value-of select="php:function( 'SobiPro::AlternateLink', $rssUrlSection, 'application/atom+xml', $sectionName )"/>
		<xsl:variable name="rssUrl">{"sid":"<xsl:value-of select="id"/>","sptpl":"feeds.rss","out":"raw"}
		</xsl:variable>
		<xsl:variable name="categoryName">
			<xsl:value-of select="name"/>
		</xsl:variable>
		<xsl:value-of select="php:function( 'SobiPro::AlternateLink', $rssUrl, 'application/atom+xml', $categoryName )"/>


		<!-- for proper work a container is needed, we assume that the component area is placed into a container by the template.
		If not, you need to add a container around the SobiPro output here -->
		<div class="spListing category">
			<xsl:call-template name="topMenu">
				<xsl:with-param name="searchbox">true</xsl:with-param>
				<xsl:with-param name="title"></xsl:with-param>
			</xsl:call-template>
			<xsl:apply-templates select="messages"/>

			<xsl:apply-templates select="alphaMenu"/>

			<h1 class="page-header lead">
				<xsl:if test="//config/showicon/@value = 1">
					<xsl:choose>
						<xsl:when test="string-length(icon/@element) > 0">
							<xsl:element name="{icon/@element}">
								<xsl:attribute name="class">
									<xsl:value-of select="icon/@class"/>
								</xsl:attribute>
								<xsl:value-of select="icon/@content"/>
							</xsl:element>
						</xsl:when>
						<xsl:otherwise>
							<xsl:if test="string-length( icon ) > 0">
								<img alt="{name}" src="{icon}"/>
							</xsl:if>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:if>
				<xsl:value-of select="name"/>
			</h1>
			<xsl:if test="string-length(description) > 0">
				<div class="spCategoryDesc" data-role="content">
					<xsl:value-of select="description" disable-output-escaping="yes"/>
				</div>
			</xsl:if>

			<xsl:if test="//config/fieldsposition/@value = 'above'">
				<div class="spCategoryFields" data-role="content">
					<xsl:for-each select="fields/*">
						<xsl:call-template name="showfield">
							<xsl:with-param name="fieldname" select="."/>
							<xsl:with-param name="view" select="'category'"/>
						</xsl:call-template>
					</xsl:for-each>
					<div class="clearfix"></div>
				</div>
			</xsl:if>

			<xsl:if test="//config/hidecategories/@value != 'none'">
				<xsl:if test="count (categories/category) and //config/hidecategories/@value = 'hide'">
					<input id="spCategoryShow" class="btn btn-sigsiu" name="spCategoryShow" value="{$showCategoriesLabel}" type="button"/>
				</xsl:if>
				<xsl:call-template name="categoriesLoop"/>
			</xsl:if>

			<xsl:if test="//config/fieldsposition/@value = 'between'">
				<div class="spCategoryFields" data-role="content">
					<xsl:for-each select="fields/*">
						<xsl:call-template name="showfield">
							<xsl:with-param name="fieldname" select="."/>
							<xsl:with-param name="view" select="'category'"/>
						</xsl:call-template>
					</xsl:for-each>
					<div class="clearfix"></div>
				</div>
			</xsl:if>

			<xsl:call-template name="entriesLoop"/>
			<xsl:apply-templates select="navigation"/>

			<xsl:if test="//config/fieldsposition/@value = 'below'">
				<div class="spCategoryFields" data-role="content">
					<xsl:for-each select="fields/*">
						<xsl:call-template name="showfield">
							<xsl:with-param name="fieldname" select="."/>
							<xsl:with-param name="view" select="'category'"/>
						</xsl:call-template>
					</xsl:for-each>
					<div class="clearfix"></div>
				</div>
			</xsl:if>

			<xsl:call-template name="bottomHook"/>
		</div>
		<input type="hidden" id="hidetext" value="{php:function( 'SobiPro::Txt', 'CATEGORIES_HIDE' )}"/>
	</xsl:template>
</xsl:stylesheet>

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.