Page 1 of 3

Categories In News Module

Posted: Mon Jul 30, 2012 6:08 pm
by swarfega
Please see: http://thriplow.org.uk/cms/news.thriplow

As you can see there is a list on the right column where a list of news categories should be displayed.

This is broken after upgrading to 1.11.

Here is the contents of the browse category template:
{if $count > 0}
<ul class="list1">
{foreach from=$cats item=node}
{if $node.depth > $node.prevdepth}
{repeat string="<ul>" times=$node.depth-$node.prevdepth}
{elseif $node.depth < $node.prevdepth}
{repeat string="</li></ul>" times=$node.prevdepth-$node.depth}
</li>
{elseif $node.index > 0}</li>
{/if}
<li class="newscategory">
{if $node.count > 0}
<a href="{news_category_url name=$node.news_category_name id=$node.news_category_id}">{$node.news_category_name}</a> ({$node.count}){else}<span>{$node.news_category_name} (0)</span>{/if}
{/foreach}
{repeat string="</li></ul>" times=$node.depth-1}</li>
</ul>
{/if}

Re: Categories In News Module

Posted: Mon Jul 30, 2012 6:33 pm
by Dr.CSS
Check the Default templates to make sure the calls haven't changed, don't think they did but...

Re: Categories In News Module

Posted: Mon Jul 30, 2012 10:33 pm
by swarfega
Ive had a check through and changed some double quotes to singles but nothing radical.

I cant see what it might be.

What further information would you need from me to help sort this out?

Re: Categories In News Module

Posted: Tue Jul 31, 2012 12:27 am
by Dr.CSS
Make sure your tag is in the right case, may be case sensitive where it wasn't before and that your call for categories is correct...

Re: Categories In News Module

Posted: Wed Aug 01, 2012 10:12 pm
by swarfega
Well I've had a look and cant see anything obvious. So here Ill post all the parts that go into the news category system:

The call on the global content block:
{news browsecat='1' category='Thriplow Society,Thriplow Village,Local Issues,Parish Council Matters,Gardening Club,Website,Thriplow Shop,Newditch Plantation Trust,TRIC,Green Man Pub,Daffodil Weekend' browsecattemplate='thriplow3'}
Browse Category Template:
{if $count > 0}
<ul class='list1'>
{foreach from=$cats item=node}
{if $node.depth > $node.prevdepth}
{repeat string='<ul>' times=$node.depth-$node.prevdepth}
{elseif $node.depth < $node.prevdepth}
{repeat string='</li></ul>' times=$node.prevdepth-$node.depth}
</li>
{elseif $node.index > 0}</li>
{/if}
<li class='newscategory'>
{if $node.count > 0}
<a href="{news_category_url name=$node.news_category_name id=$node.news_category_id}">{$node.news_category_name}</a> ({$node.count}){else}<span>{$node.news_category_name} (0)</span>{/if}
{/foreach}
{repeat string='</li></ul>' times=$node.depth-1}</li>
</ul>
{/if}
UTD:
$name = preg_replace(array('/ /', '/[^A-Za-z0-9-\-]/', '/--/'),array('-', '', '-'),$params['name']);
$id = $params['id'];
echo 'category/'.$id.'/'.$name.'.thriplow';
Your help would be appreciated.

Re: Categories In News Module

Posted: Thu Aug 02, 2012 1:54 am
by Dr.CSS
What is the UDT for and where does it come in?...

Re: Categories In News Module

Posted: Thu Aug 02, 2012 11:58 am
by swarfega
That prettified the urls for news categories.

Re: Categories In News Module

Posted: Thu Aug 02, 2012 5:20 pm
by Dr.CSS
I would take everything back to default as much as possible to see if anything shows up then go forward till it breaks, like don't use the UDT, no pretty URLs, etc...

Re: Categories In News Module

Posted: Thu Aug 02, 2012 8:51 pm
by swarfega
ok I have removed the utd and the category template but the news categories are still not showing.

Im using this call:
{news browsecat='1' category='Thriplow Society,Thriplow Village,Local Issues,Parish Council Matters,Gardening Club,Website,Thriplow Shop,Newditch Plantation Trust,TRIC,Green Man Pub,Daffodil Weekend'}
Is that right?

Re: Categories In News Module

Posted: Thu Aug 02, 2012 9:27 pm
by carasmo
Try clearing cache or checking if that page where the news module call is cached (in the second panel of the content page). Just an idea. Hope I don't run across this issue.

Re: Categories In News Module

Posted: Thu Aug 02, 2012 9:41 pm
by swarfega
The news page wont load in the editor and if you look at thriplow.org.uk its not displaying properly :/

Re: Categories In News Module

Posted: Thu Aug 02, 2012 10:01 pm
by carasmo
remove the category call on this page and see if it corrects. There's a smarty error, or at least whenever I have a smarty error, my page removes all css and sometimes it doesn't even say that I'm having an error.

Re: Categories In News Module

Posted: Thu Aug 02, 2012 10:07 pm
by carasmo
Clear cache.

Also, you know the best way to upgrade is to:

Make a subdomain
Make a copy of the database (export) in phpMyAdmin
Make a new database and load the copy
Copy the site (images, etc) into the subdomain directory
Change the config file in the subdomain directory and put in the new database and pw and the path

Upgrade the copy and get that working
Then
Move the old files to a new folder
Move the subdomain content back out to the top level
Change the config back to the top domain

That way your live site is never touched and if you run into a bug, then it can be worked out. Also, I never upgrade a new version without waiting a month and checking the boards for issues. That's why I'm here a lot these days.

Re: Categories In News Module

Posted: Thu Aug 02, 2012 10:10 pm
by carasmo
paste the template for that page where the news module call is being used.

Re: Categories In News Module

Posted: Thu Aug 02, 2012 10:19 pm
by swarfega
I put my stylesheet through a validator and it found an odd character. so the site works now but Im still unable to edit pages on my main site. Sites that use other templates edit fine.