Bug in News module 2.12.10 (category list can't be filtered)
Bug in News module 2.12.10 (category list can't be filtered)
Hello CMSMS friends,
I think I have found a bug in later versions of the News module (hopefully this is the right part of the forum to post it).
I have two identical sites with PHP/MySQL latest versions.
Site 1:
CMSMS 1.8.1
News 2.10.6
Site 2 (cloned from site one then upgraded to):
CMSMS: 1.11.4
News: 2.12.10
On site 1 the tag below shows me a list of all news categories that are sub categories of the "Hotels" news category
{news action="browsecat" category='Hotels*'}
On site 2 the same tag produces no output
If I change the tag to
{news action="browsecat"}
every single news category is listed (as expected)
I'm not a developer, but my conclusion is that this is a bug in News 2.12.10 (which the module manager claims is the latest version).
many thanks in advance for any help with this issue.
I think I have found a bug in later versions of the News module (hopefully this is the right part of the forum to post it).
I have two identical sites with PHP/MySQL latest versions.
Site 1:
CMSMS 1.8.1
News 2.10.6
Site 2 (cloned from site one then upgraded to):
CMSMS: 1.11.4
News: 2.12.10
On site 1 the tag below shows me a list of all news categories that are sub categories of the "Hotels" news category
{news action="browsecat" category='Hotels*'}
On site 2 the same tag produces no output
If I change the tag to
{news action="browsecat"}
every single news category is listed (as expected)
I'm not a developer, but my conclusion is that this is a bug in News 2.12.10 (which the module manager claims is the latest version).
many thanks in advance for any help with this issue.
-
- Forum Members
- Posts: 183
- Joined: Sun Sep 07, 2008 10:47 am
Re: Bug in News module 2.12.10 (category list can't be filte
Hi there,
I am not a die hard programmer, but an * in your call can't be good, in many programming languages that is used to calculate (multiply). In all my technical innocence I think Smarty3 does not like your * in the category tag. Maybe Smarty 2 did not mind, but my 2 cents is that Smarty3 surely will.
I am quite sure there is no bug in News...
Anne
I am not a die hard programmer, but an * in your call can't be good, in many programming languages that is used to calculate (multiply). In all my technical innocence I think Smarty3 does not like your * in the category tag. Maybe Smarty 2 did not mind, but my 2 cents is that Smarty3 surely will.
I am quite sure there is no bug in News...
Anne
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur..." (Red Adair)
Re: Bug in News module 2.12.10 (category list can't be filte
A * in a module call usually relates to showing the children of so it should be fine.
Do you have pretty urls on or off?
Do you have pretty urls on or off?
Re: Bug in News module 2.12.10 (category list can't be filte
Ok, I just had a play on a test site. I suspect the category parameter is only used for the summary view. If you wish to display just specific categories using the browsecat action I would do some smarty stuff in a template instead.
-
- Power Poster
- Posts: 1049
- Joined: Wed Mar 19, 2008 4:54 pm
Re: Bug in News module 2.12.10 (category list can't be filte
CMSMS 1.8.1 is no longer supported and isn't safe anymore. Upgrade to cms 1.11.5 as quick as possible.
-
- Forum Members
- Posts: 183
- Joined: Sun Sep 07, 2008 10:47 am
Re: Bug in News module 2.12.10 (category list can't be filte
lol, I should stick to marketing 

"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur..." (Red Adair)
Re: Bug in News module 2.12.10 (category list can't be filte
cb2004 wrote:Ok, I just had a play on a test site. I suspect the category parameter is only used for the summary view. If you wish to display just specific categories using the browsecat action I would do some smarty stuff in a template instead.
thanks for your analysis and replies CB
Pretty URL:s are On
I don't see the rationale behind disabling a feature that works perfectly in an older CMS version.
I'd really appreciate if you could point me in the right direction on how to filter the categories using smarty? Should I parse the output and remove anything that doesn't start with "Hotels"?
Re: Bug in News module 2.12.10 (category list can't be filte
If you can do something within a template there is no need to maintain features within the code.
In the category template within the foreach use {$node|print_r} and you can play around with what is returned.
In the category template within the foreach use {$node|print_r} and you can play around with what is returned.
Re: Bug in News module 2.12.10 (category list can't be filte
I hope someone can tell me whether I've run into a dead end here.
Goal: To filter the output of the news module's category list to include only subcaterories of main category "ArtEntertainment"
The sub categories are called:
ArtEntertainmentCat1
ArtEntertainmentCat2
ArtEntertainmentCat3
I call the news module like this from my HTML template:
{news action="browsecat" category='ArtEntertainment*' browsecattemplate='SubCatNew' }
and end up with no output (because the "category" and action="browsecat" parameters are not allowed together anymore).
As advised by cb2004 I'm trying to parse the output in the news category-browser template (to filter out unwanted categories) BUT how can I pass the name of the wanted category "ArtEntertainment" available as a variable in the news module browse category template?
I've tried by calling the news module with a new home made parameter "cat"
{news action="browsecat" cat='ArtEntertainment*' browsecattemplate='SubCatNew' }
and in the news template:
------
{foreach from=$cats item=node}
{if $node.count > 0}
[glow]{if $node.news_category_name|strstr:$param_cat} [/glow]
we have a match <br />
{/if}
------
but my homemade parameter "cat" doesn't seem to be available for use.
Is what I'm trying to achieve possible?
thanks in advance
Goal: To filter the output of the news module's category list to include only subcaterories of main category "ArtEntertainment"
The sub categories are called:
ArtEntertainmentCat1
ArtEntertainmentCat2
ArtEntertainmentCat3
I call the news module like this from my HTML template:
{news action="browsecat" category='ArtEntertainment*' browsecattemplate='SubCatNew' }
and end up with no output (because the "category" and action="browsecat" parameters are not allowed together anymore).
As advised by cb2004 I'm trying to parse the output in the news category-browser template (to filter out unwanted categories) BUT how can I pass the name of the wanted category "ArtEntertainment" available as a variable in the news module browse category template?
I've tried by calling the news module with a new home made parameter "cat"
{news action="browsecat" cat='ArtEntertainment*' browsecattemplate='SubCatNew' }
and in the news template:
------
{foreach from=$cats item=node}
{if $node.count > 0}
[glow]{if $node.news_category_name|strstr:$param_cat} [/glow]
we have a match <br />
{/if}
------
but my homemade parameter "cat" doesn't seem to be available for use.
Is what I'm trying to achieve possible?
thanks in advance
Re: Bug in News module 2.12.10 (category list can't be filte
I quickly looked at the code of news module and then tested it on a website:
cmsms 1.11.7
News 2.12.12
Seems to work like a charm:
Output:
ps. Pretty Urls are on.
cmsms 1.11.7
News 2.12.12
Seems to work like a charm:
Code: Select all
{News action='browsecat' category='testmain*'}
Code: Select all
testmain (0)
testsub1 (0)
testsub2 (0)
Re: Bug in News module 2.12.10 (category list can't be filte
fantastic, it works after upgrading to the latest version!
thanks Velden for testing!
thanks Velden for testing!
Re: Bug in News module 2.12.10 (category list can't be filte
Had the same problem after an upgrade to the latest versions (cmsms and news mod). I re-uploaded the news module per ftp and it worked (the upgrade in the back-office wasn't complete, don't know why because i didn't see errors messages...).