Search

Hello,

I'm quite new to Symphony. A client of us have asked us to migrate their symphony web site to our server. We had to face problems (our PHP is 5.4) on some minor issues (Call-time pass-by-reference ) but now I'm facing something more complex.

It seems that somehow an XLST file is corrupted? http://http://uniep.trynisis.com "XSLTProcessor::transformToXml(): runtime error: file /home/uniep/workspace/utilities/event-calendar.xsl line 191 element param"

When I check the line this is just

 <xsl:param name="current-month" />

And the syntax seems to be OK. Do you have any idea what could cause this?

Best regards, Olivier

two mistakes: web site: http://uniep.trynisis.com

line 191 <xsl:param name="current-month" />

What version of Symphony are you running?

If you log in to Symphony and go to http://uniep.trynisis.com/?debug, do you see the parameter current-month or is it this-month?

@trynisis, the data you have is important if you need help to resolve this bug. The issue is not with that line of code you provided, it's a question of infinite recursion.

Something between your data / template is causing XSLT to loop, and it's hitting a Maximum variable/param limit, hence it stops at the line you indicated. If you can provide the Template in event-calendar.xsl and the data within the debug. (you can copy http://uniep.trynisis.com/?debug=raw) we won't be able to do much to help

Hello thank you so much for your help. here is what I found in ?debug=raw. I thought it was related to DateTimeObj::get, but it works pretty well when I test it : <?xml version="1.0" encoding="UTF-8"?>

  <xsl:variable name="following-month">
        <xsl:choose>
                <xsl:when test="$current-month='12'">1</xsl:when>
                <xsl:otherwise><xsl:value-of select="$current-month + 1" /></xsl:otherwise>
        </xsl:choose>              
  </xsl:variable>

  <xsl:variable name="following-year">
        <xsl:choose>
               <xsl:when test="$following-month='1'"><xsl:value-of select="$current-year + 1" /></xsl:when>
               <xsl:otherwise><xsl:value-of select="$current-year" /></xsl:otherwise>
        </xsl:choose>              
  </xsl:variable>

  <xsl:variable name="start-day-of-month">
        <xsl:call-template name="day-of-the-week">
               <xsl:with-param name="year" select="$current-year" />
               <xsl:with-param name="month" select="$current-month" />
               <xsl:with-param name="day" select="'1'" />
        </xsl:call-template>            
  </xsl:variable>

  <table class="calendar">
       <xsl:if test="not($current-month=$this-month and $current-year=$this-year)">
             <xsl:attribute name="class">calendar c-hidden</xsl:attribute>
       </xsl:if>
       <thead>
             <tr>
                   <th class="prev-month-button">
                          <xsl:if test="$current-month=$this-month and $current-year=$this-year">
                                  <xsl:attribute name="class">prev-month-button c-inactive</xsl:attribute>
                          </xsl:if>
                   <xsl:text>&lt;&lt;</xsl:text>
                   </th>
                   <th colspan="5"><xsl:value-of select="/data/datetime/language[@id=/data/events/language-redirect/current-language/@handle]/months/month[@id=$current-month]" /><xsl:text> </xsl:text><xsl:value-of select="$current-year" /></th>
                   <th class="next-month-button">
                          <xsl:if test="$current-month=$final-month and $current-year=$final-year">
                                  <xsl:attribute name="class">prev-month-button c-inactive</xsl:attribute>
                          </xsl:if>
                   <xsl:text>&gt;&gt;</xsl:text>
                   </th>
             </tr>
             <tr>
                   <th><xsl:value-of select="/data/datetime/language[@id=/data/events/language-redirect/current-language/@handle]/weekdays/day[@id='1']/@abbr" /></th>
                   <th><xsl:value-of select="/data/datetime/language[@id=/data/events/language-redirect/current-language/@handle]/weekdays/day[@id='2']/@abbr" /></th>
                   <th><xsl:value-of select="/data/datetime/language[@id=/data/events/language-redirect/current-language/@handle]/weekdays/day[@id='3']/@abbr" /></th>
                   <th><xsl:value-of select="/data/datetime/language[@id=/data/events/language-redirect/current-language/@handle]/weekdays/day[@id='4']/@abbr" /></th>
                   <th><xsl:value-of select="/data/datetime/language[@id=/data/events/language-redirect/current-language/@handle]/weekdays/day[@id='5']/@abbr" /></th>
                   <th><xsl:value-of select="/data/datetime/language[@id=/data/events/language-redirect/current-language/@handle]/weekdays/day[@id='6']/@abbr" /></th>
                   <th><xsl:value-of select="/data/datetime/language[@id=/data/events/language-redirect/current-language/@handle]/weekdays/day[@id='0']/@abbr" /></th>
             </tr>
       </thead>
       <tbody>
                  <xsl:call-template name="generate-week">
                        <xsl:with-param name="current-month" select="$current-month" />
                        <xsl:with-param name="current-year" select="$current-year" />
                        <xsl:with-param name="path-to-events" select="$path-to-events" />
                        <xsl:with-param name="start-day-of-month" select="$start-day-of-month" />
                  </xsl:call-template>
       </tbody>
       <tfoot>
       </tfoot>
  </table>
  <xsl:choose>
       <xsl:when test="not($current-month=$final-month and $current-year=$final-year)">
            <xsl:call-template name="generate-month">
                  <xsl:with-param name="current-month" select="$following-month" />
                  <xsl:with-param name="current-year" select="$following-year" />
                  <xsl:with-param name="path-to-events" select="$path-to-events" />
                  <xsl:with-param name="final-month" select="$final-month" />
                  <xsl:with-param name="final-year" select="$final-year" />
            </xsl:call-template>
       </xsl:when>
       <xsl:otherwise></xsl:otherwise>
  </xsl:choose>

 <xsl:variable name="days-in-month">
       <xsl:call-template name="days-in-month">
               <xsl:with-param name="month" select="$current-month"/>
               <xsl:with-param name="year" select="$current-year"/>
       </xsl:call-template>
 </xsl:variable>

 <xsl:variable name="start-day-of-next-week">
       <xsl:choose>
            <xsl:when test="$current-week = 1">
                  <xsl:choose>
                        <xsl:when test="$start-day-of-month = 0">
                               <xsl:value-of select="$current-day + 1" />
                        </xsl:when>
                        <xsl:otherwise>
                               <xsl:value-of select="$current-day - $start-day-of-month + 8" />
                        </xsl:otherwise>
                  </xsl:choose>
            </xsl:when>
            <xsl:otherwise>
                  <xsl:value-of select="$current-day + 7" />
            </xsl:otherwise>
       </xsl:choose>
 </xsl:variable>

 <xsl:choose>
       <xsl:when test="$start-day-of-next-week &lt;= $days-in-month">  
               <xsl:call-template name="generate-week">
                        <xsl:with-param name="current-month" select="$current-month"/>
                        <xsl:with-param name="current-year" select="$current-year"/>
                        <xsl:with-param name="current-day" select="$start-day-of-next-week" />
                        <xsl:with-param name="path-to-events" select="$path-to-events" />
                        <xsl:with-param name="current-week" select="$current-week + 1" />
                        <xsl:with-param name="start-day-of-month" select="$start-day-of-month" />
               </xsl:call-template>
       </xsl:when>
       <xsl:otherwise></xsl:otherwise>
 </xsl:choose>

 <xsl:variable name="next-day">
         <xsl:choose>
              <xsl:when test="$day-of-week=6">0</xsl:when>
              <xsl:otherwise><xsl:value-of select="$day-of-week + 1" /></xsl:otherwise>
         </xsl:choose>
 </xsl:variable>

 <xsl:variable name="next-date-day">
     <xsl:choose>
            <xsl:when test="($day-of-week &lt; $start-day-of-month or $start-day-of-month = 0) and $day-of-week &gt; 0 and $current-week = 1">
                 <xsl:value-of select="$current-day" />
            </xsl:when>
            <xsl:otherwise>
                 <xsl:value-of select="$current-day + 1" />
            </xsl:otherwise>
     </xsl:choose>
 </xsl:variable>

 <xsl:variable name="two-digit-day">
      <xsl:choose>
           <xsl:when test="string-length($current-day) = 1">
                <xsl:value-of select="concat('0',$current-day)" />
           </xsl:when>
           <xsl:otherwise>
                <xsl:value-of select="$current-day" />
           </xsl:otherwise>
      </xsl:choose>
 </xsl:variable>

 <xsl:variable name="two-digit-month">
      <xsl:choose>
           <xsl:when test="string-length($current-month) = 1">
                <xsl:value-of select="concat('0',$current-month)" />
           </xsl:when>
           <xsl:otherwise>
                <xsl:value-of select="$current-month" />
           </xsl:otherwise>
      </xsl:choose>    
 </xsl:variable>

 <xsl:variable name="event-date">
      <xsl:value-of select="concat($current-year,'-',$two-digit-month,'-',$two-digit-day)" />
 </xsl:variable>

 <td>
     <xsl:choose>
       <xsl:when test="($day-of-week &lt; $start-day-of-month or $start-day-of-month = 0) and $day-of-week &gt; 0 and $current-week = 1">
             <xsl:attribute name="class">prev-month-item</xsl:attribute>
             <xsl:text>-</xsl:text>
       </xsl:when>
       <xsl:when test="$current-day &gt; $days-in-month">
             <xsl:attribute name="class">next-month-item</xsl:attribute>
             <xsl:text>-</xsl:text>
       </xsl:when>
       <xsl:otherwise>
             <xsl:if test="$path-to-events/entry/date/date[start = $event-date or end = $event-date]">
                     <xsl:attribute name="class">c-event</xsl:attribute>
                     <div class="c-event-dialog"><div class="c-event-dialog-arrow" />
                            <p><strong><a href="/events/entries/{$path-to-events/entry[date/date/start = $event-date or date/date/end = $event-date]/@id}"><xsl:value-of select="$path-to-events/entry[date/date/start = $event-date or date/date/end = $event-date]/heading"/></a></strong></p>
                            <p>Date: <em><xsl:call-template name="format-date"><xsl:with-param name="date" select="$event-date" /></xsl:call-template></em></p>
                            <p>Location: <em><xsl:value-of select="$path-to-events/entry[date/date/start = $event-date or date/date/end = $event-date]/location"/></em></p>
                     </div>
             </xsl:if>
             <xsl:value-of select="$current-day" />
       </xsl:otherwise>
     </xsl:choose>
 </td>
 <xsl:choose>
      <xsl:when test="not($day-of-week = 0)">
           <xsl:call-template name="generate-day">
                       <xsl:with-param name="current-month" select="$current-month" />
                       <xsl:with-param name="current-year" select="$current-year" />
                       <xsl:with-param name="current-day" select="$next-date-day" />
                       <xsl:with-param name="path-to-events" select="$path-to-events" />
                       <xsl:with-param name="current-week" select="$current-week" />
                       <xsl:with-param name="day-of-week" select="$next-day" />
                       <xsl:with-param name="start-day-of-month" select="$start-day-of-month" />
                       <xsl:with-param name="days-in-month" select="$days-in-month" />
           </xsl:call-template>
      </xsl:when>
      <xsl:otherwise>
      </xsl:otherwise>
 </xsl:choose>


30292831

Attachments:
debugraw.txt

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