phpbossman Posted November 13, 2020 Share Posted November 13, 2020 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> Quote Link to comment https://forums.phpfreaks.com/topic/311700-xmlxpathcompopeval-xpath-errors/ Share on other sites More sharing options...
requinix Posted November 13, 2020 Share Posted November 13, 2020 "function function not found" suggests XSLT that looks like select="php:function('function', ...)" Are you sure you are looking at the right code? Quote Link to comment https://forums.phpfreaks.com/topic/311700-xmlxpathcompopeval-xpath-errors/#findComment-1582322 Share on other sites More sharing options...
phpbossman Posted November 13, 2020 Author Share Posted November 13, 2020 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 Quote Link to comment https://forums.phpfreaks.com/topic/311700-xmlxpathcompopeval-xpath-errors/#findComment-1582323 Share on other sites More sharing options...
requinix Posted November 13, 2020 Share Posted November 13, 2020 3 minutes ago, phpbossman said: Yes and I agree. You agree that... you're looking at the wrong code? 3 minutes ago, phpbossman said: Also get this in PHP but I believe irrelevant: Not to your original problem, but you should fix it anyways. Quote Link to comment https://forums.phpfreaks.com/topic/311700-xmlxpathcompopeval-xpath-errors/#findComment-1582324 Share on other sites More sharing options...
phpbossman Posted November 13, 2020 Author Share Posted November 13, 2020 I said "yes" to I'm sure I'm looking at the right code. I agree that I would think it should be something different, but those are the lines the error references in the file. Thanks for confirming Quote Link to comment https://forums.phpfreaks.com/topic/311700-xmlxpathcompopeval-xpath-errors/#findComment-1582325 Share on other sites More sharing options...
requinix Posted November 13, 2020 Share Posted November 13, 2020 Does the XSLT include xmlns:php="http://php.net/xsl" or does it use a namespace-alias? Quote Link to comment https://forums.phpfreaks.com/topic/311700-xmlxpathcompopeval-xpath-errors/#findComment-1582327 Share on other sites More sharing options...
phpbossman Posted November 13, 2020 Author Share Posted November 13, 2020 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> Quote Link to comment https://forums.phpfreaks.com/topic/311700-xmlxpathcompopeval-xpath-errors/#findComment-1582332 Share on other sites More sharing options...
requinix Posted November 13, 2020 Share Posted November 13, 2020 I don't know what's going on. But I do know <input type="hidden" id="hidetext" value="{php:function( 'SobiPro::Txt', 'CATEGORIES_HIDE' )}"/> that won't work. Quote Link to comment https://forums.phpfreaks.com/topic/311700-xmlxpathcompopeval-xpath-errors/#findComment-1582334 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.