tag:help-archives.hannonhill.com,2010-02-09:/discussions/velocity-formats/13170-campus-calendar-githubCascade CMS: Discussion 2016-10-05T20:46:09Ztag:help-archives.hannonhill.com,2010-02-09:Comment/385083882015-11-20T14:11:06Z2015-11-20T14:11:06ZCampus Calendar GitHub<div><p>Hi Fernando,</p>
<p>I believe you should be able to do the following to remove the
additional category filtering:</p>
<ul>
<li>Remove lines 141-153</li>
<li>On lines 175 and 200, notice the XPath starts with
<code>/system-index-block//system-page[dynamic-metadata[name =
'categories' ${categoriesXpath}] and not(...</code>. Change this to
start with <code>/system-index-block//system-page[not(...</code>.
Basically, we're removing the additional check on the event's
category dynamic metadata field.</li>
</ul>
<p>Please let me know if you have any questions.</p>
<p>Thanks!</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/385083882015-11-20T15:47:43Z2015-11-20T15:47:43ZCampus Calendar GitHub<div><ul>
<li>So I removed the lines between 141 - 153.</li>
<li>I also edited the files in line 175 and 200 and here is how
they look like</li>
</ul>
<p>"#set ($events = $_XPathTool.selectNodes($contentRoot,
"/system-index-block//system-page[not(contains(path, '_cascade'))
and (system-data-structure[(starts > '${startTime}' and ends
< '${endTime}') or recurrence[frequency != '' and frequency !=
'Once' and (ends = '' or (ends != '' and ends >=
'${endTime}'))]])]"))"</p>
<p>"#set ($events = $_XPathTool.selectNodes($contentRoot,
"/system-index-block//system-page[not(contains(path, '_cascade'))
and (system-data-structure[starts > '${currTime}' or
recurrence[frequency != '' and frequency != 'Once' and (ends = ''
or (ends != '' and ends >= '${currTime}'))]])]"))"</p>
<p>After I do all that I get this error in the page that is
rendeing the format</p>
<p>"Nov 20, 2015 9:24 AM</p>
<p>An error occurred: Could not transform with Script format
"_cascade/formats/category and term listing - test":
org.apache.velocity.exception.MethodInvocationException: Invocation
of method 'getDate' in class
com.hannonhill.cascade.velocity.CascadeComparisonDateTool threw
exception java.lang.Exception: Could not parse date:
'$_MathTool.add($nextOccurrence, $_MathTool.mul(86400000,
$numDays))' :For input string: "$_MathTool.add($nextOccurrence,
$_MathTool.mul(86400000, $numDays))" at
velocityTransform-1448033081400[line 284, column 47]</p>
<p>You may choose to retry the operation. If the problem persists,
please contact a system administrator.</p>
<p>The error has been logged to the system console.</p>
<p>Home"</p>
<p>Not sure what is going on, could you take a look at it.</p>
<p>Thanks!</p></div>Fernandotag:help-archives.hannonhill.com,2010-02-09:Comment/385083882015-11-24T17:05:05Z2015-11-24T17:05:05ZCampus Calendar GitHub<div><p>Here is couple of more info might help the case. By looking at
the XML I think it grabs all the events but not sure why its not
rendering</p></div>Fernandotag:help-archives.hannonhill.com,2010-02-09:Comment/385083882015-11-24T21:54:18Z2015-11-24T21:54:18ZCampus Calendar GitHub<div><p>Very strange. Doing some local testing, it appears the Format
breaks as soon as you remove those <code>dynamic-metadata</code>
bits from the event XPath.</p>
<p>Let me keep looking into this to see if I can gather some
additional information.</p>
<p>Thanks!</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/385083882015-12-14T20:40:24Z2015-12-14T20:40:24ZCampus Calendar GitHub<div><p>Hi Fernando,</p>
<p>My apologies for not responding to your discussion sooner. Don't
worry, I have not forgotten!</p>
<p>I was about to pick up where I left off in my testing and wanted
to check in to see if you were able to figure out the issue with
removing the additional dynamic metadata check in the XPath. Let me
know either way.</p>
<p>Thanks!</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/385083882015-12-14T21:06:48Z2015-12-14T21:06:48ZCampus Calendar GitHub<div><p>I haven't, did some testing for a while but hit a dead end.
Working in other projects with the University I needed to wrap up
before the end of the year.</p>
<p>Thanks for getting back with me on it, i am actually getting
back on it today. I will let you know if somehow i found an answer.
Thanks!!</p></div>Fernandotag:help-archives.hannonhill.com,2010-02-09:Comment/385083882015-12-14T21:10:03Z2015-12-14T21:10:03ZCampus Calendar GitHub<div><p>Thank you for following up, Fernando. I'm going to be doing some
more testing today and tomorrow to see if I can gather some
additional information for you. I'll be in touch if I do come up
with something.</p>
<p>Let me know if you have any questions in the meantime.</p>
<p>Thanks!</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/385083882015-12-15T13:16:22Z2015-12-15T13:16:22ZCampus Calendar GitHub<div><p>Hi Fernando,</p>
<p>Very odd, but when I just tested both my Format and <a href="http://help.hannonhill.com/discussions/velocity-formats/13170-campus-calendar-github#comment_38515347">
your's</a> without the dynamic metadata filter, I no longer get the
error and the events list as expected. Not too sure what was
causing the error before.</p>
<p>Let me know if you find anything out while testing.</p>
<p>Thanks!</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/385083882015-12-15T15:01:16Z2015-12-15T15:01:16ZCampus Calendar GitHub<div><p>I went over my test site that I had that format I was working on
I keep getting the same mistake. Are you testing it with my XML
information? if not can I test it with yours?</p>
<p>Thanks for all of the help</p></div>Fernandotag:help-archives.hannonhill.com,2010-02-09:Comment/385083882015-12-15T17:17:43Z2015-12-15T17:17:43ZCampus Calendar GitHub<div><p>Hi Fernando,</p>
<p>I was trying the attached XML with both your Format and mine. I
am attaching the two Formats for reference.</p>
<p>Note: I am also including the
<code>recurring-events-macros</code> that is included just in-case
you don't have it. Just update the path at the top of the
category/term listing Format.</p>
<p>Keep me posted on your findings.</p>
<p>Thanks!</p></div>Ryan Griffith