Page 1 of 1

Adding ListIt2/ListItExtended items to Sitemap w/ SitemapMS

Posted: Wed Feb 20, 2013 9:34 am
by lewishowles
I'm looking to add ListIt2 items to my sitemap using SitemapMadeSimple and figured it would be quite easy - I've got rules in there currently that add CGCalendar events, CGBlog articles and News articles.

I tried something as simple as this:

Code: Select all

{capture assign='junk'}{ListIt2FAQs}{/capture}
{foreach from=$items item='entry'}
	<url>
		<loc>{$entry->url}</loc>
	</url>
{/foreach}
But there seems to be a PHP error being generated and I get a white screen with a couple of the admin menu items in text on it. Hitting back and removing that entry makes it work again.

ListIt2FAQs is, of course, the duplicate in this instance.

I can't think why this would be causing an error unless I'm missing something simple?

In case it helps I'm using

CMSMS 1.11.4
ListIt2 1.3.2
SitemapMadeSimple 1.2.7

Re: Adding ListIt2/ListItExtended items to Sitemap w/ Sitema

Posted: Wed Feb 20, 2013 6:46 pm
by Stikki
I don't quite get you.

That works just fine in content context at least.

So be a bit more specific, and with just white page without any errors it's hard to tell if problem is even ListItExtended's.

-Stikki-

Re: Adding ListIt2/ListItExtended items to Sitemap w/ Sitema

Posted: Thu Feb 21, 2013 11:49 pm
by lewishowles
I'm not sure which module is causing the error - ListItExtended or SitemapMadeSimple and yeah a broken page isn't much help.

Pretty much covered all I know about it - I add that code in, I get a broken page. I take it out, the template submits as normal. But I'll see if I can be really specific about everything.

This SitemapMadeSimple template:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.google.com/schemas/sitemap/0.84"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.84
	http://www.google.com/schemas/sitemap/0.84/sitemap.xsd">
	{foreach from=$output item='page'}
	<url>  
		<loc>{$page->url}</loc>  
		<lastmod>{$page->date|date_format:"%Y-%m-%d"}</lastmod>  
		<priority>{$page->priority}</priority>  
		<changefreq>{$page->frequency}</changefreq></url>
	{/foreach} 
	{capture assign='junk'}{cms_module module='News' detailpage='news' number='1000'}{/capture}
	{foreach from=$items item='entry'}
	<url>
		<loc>{$entry->moreurl}</loc>  
		<lastmod>{$entry->postdate|date_format:"%Y-%m-%d"}</lastmod>
		<priority>{$page->priority}</priority>  
		<changefreq>{$page->frequency}</changefreq>
	</url>
	{/foreach}
	{capture assign='junk'}{ListIt2FAQs}{/capture}
	{foreach from=$items item='entry'}
 	  <url>
 	     <loc>{$entry->url}</loc>
 	  </url>
	{/foreach}
</urlset>
causes this page on submit:

Image

(literally, that's all I get). That page persists even if I try to go back to the main SitemapMadeSimple module page, I have to hit the back button and remove it to get access back to the module.

Taking the ListIt2 entry out and it works OK (from {capture... to {/foreach}).

There's nothing in the error log and turning error reporting on only gives two notices about (presumably a typo) in what seems to be one of the core files.

Code: Select all

Notice: Undefined variable: smsrty in /lib/classes/module_support/modtemplates.inc.php on line 237

Notice: Trying to get property of non-object in /lib/classes/module_support/modtemplates.inc.php on line 237
Again the two modules installed:

Image