ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Category archive error with linear style parameter

May 07, 2012 9:29am

Subscribe [3]
  • #1 / May 07, 2012 9:29am

    mojacreative

    50 posts

    Seems to be a bug to me, but I can’t believe nobody else would have stumbled on it so keeping an open mind.

    Using this code will not return any categories but it should:

    {exp:channel:category_archive channel="test" show_empty="no"  style="linear"}
      {categories}
       {category_name}
      {/categories}
     {/exp:channel:category_archive}


    Changing style to nested returns categories as expected.

    Turning on debug gives the following errors:

    A PHP Error was encountered
    Severity: Notice
    Message: Undefined variable: channel_id
    Filename: channel/mod.channel.php
    Line Number: 5566
    
    A PHP Error was encountered
    Severity: Warning
    Message: implode() [function.implode]: Invalid arguments passed
    Filename: channel/mod.channel.php
    Line Number: 5566
    
    A PHP Error was encountered
    Severity: Warning
    Message: Cannot modify header information - headers already sent by (output started at /home/xm360/cmsadmin/codeigniter/system/core/Exceptions.php:170)
    Filename: core/Common.php
    Line Number: 409


    I produced the above with 2.4.0, with an basic template new channel etc.

    Just reproduced this on a different 2.4 install on a different server with the same result.


    Appears to be an exact replica of this bug https://support.ellislab.com/bugs/detail/13485
    Thanks

  • #2 / May 07, 2012 12:42pm

    james Brown

    492 posts

    I just encountered the same bug on an updated EE 2.4.0 site.

  • #3 / May 07, 2012 12:47pm

    mojacreative

    50 posts

    Ahh so I’m not going mad, good to know! By the way, GWcode Categories worked round the problem for me.

  • #4 / May 07, 2012 1:12pm

    james Brown

    492 posts

    Taking out show_empty=“no” also removes the errors.

  • #5 / May 07, 2012 1:19pm

    mojacreative

    50 posts

    Oh yes I missed that from this report, that’s actually how I found the problem in the first place, turning off show_empty and wondering what the hell was going on 😊

  • #6 / May 08, 2012 10:22am

    Shane Eckert

    7174 posts

    Hey mojacreative,

    Looks like you have this sorted out now.

    Nice work James, thanks for the assist.

    Is there anything else I can help with while you are here?

    Cheers,

  • #7 / May 08, 2012 11:09am

    mojacreative

    50 posts

    Hi Shane,

    I think you might be misunderstanding the problem.

    It’s a bug really. Here’s steps to reproduce:

    Create a channel
    Attach categories to that channel
    Post a new entry and assign it to a category.

    Then use this code to return the categories:

    {exp:channel:category_archive channel="test" show_empty="no"  style="linear"}
      {categories}
       {category_name}
      {/categories}
     {/exp:channel:category_archive}

    Now with show empty set no and style set to linear, it will return no categories, it should, we assigned an entry to a category.

    Change show empty to yes and it will return categories, likewise change style to nested and it will return the category with entries assigned.

    The PHP error above is only returned with my test case.

    The bug I quoted above seems to have been left with the submitter saying he solved his problem, but I still believe it to be a bug as I can reproduce it in a couple installations.

    If someone can perhaps verify with my above code then I’m sure that will give a bit more weight to getting this fixed, I know leaving a comment on the bug is not going to get it fixed, and it looks like it’s been out there for a while.

    Thanks
    Nick

     

  • #8 / May 08, 2012 11:21am

    mojacreative

    50 posts

    EE 2.5 wasn’t released when I posted this yesterday. I just did a test, and I believe it’s fixed in EE 2.5. Just doing an upgrade on another install to verify it’s gone.

  • #9 / May 08, 2012 11:38am

    mojacreative

    50 posts

    Yep, verified fixed. It’s bug 17406, didn’t find that before.

    I will say the release process this time around leaves a lot to be desired. The fix was posted to that bug back at the end of January, that’s over 3 months to get what really is a show stopper fix out. A return to maintenance and/or hotfix releases is really needed. Sorry but I wasted way too much time on this yesterday and finding it was a 3 month old bug isn’t great.

    Thanks
    Nick

  • #10 / May 09, 2012 4:49pm

    Shane Eckert

    7174 posts

    Hey mojacreative,

    I hear you on the cycle and I hope we improve that soon.

    Thanks for your feedback, we appreciate it!

    If you need anything else, please just let me know by opening a new thread.

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases