forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: brynn on March 28, 2018, 02:17:48 pm

Title: why link to a category shows all kinds of albums outside that category
Post by: brynn on March 28, 2018, 02:17:48 pm
Hi Friends,
My CPG gallery version 1.5.34:  https://inkscapecommunity.com/ic_gallery/index.php

Why is it when I click on the Coloring Pages category, on the front page of my gallery (or click this link:  https://inkscapecommunity.com/ic_gallery/index.php?cat=8), it doesn't just open that category.  It shows a lot of user galleries, plus the the 2 albums in that category, but doesn't show the sub-category (Quilt Patterns) at all.

At first I thought it might be because "Pages" was too common of a word.  But I tried renaming the category to just "Coloring" or "Coloring Designs", but that didn't fix the problem.  Could it be the word "Coloring" that's too common??

If I click on any of the other categories, they correctly open only that category.  I just don't understand why this "Coloring Pages" category is not behaving itself.

Thanks for your help  :)
Title: Re: why link to a category shows all kinds of albums outside that category
Post by: ron4mac on March 28, 2018, 05:44:22 pm
Edit your 'User galleries' category to make sure that the 'Parent category' is set to '* No category *'.
Title: Re: why link to a category shows all kinds of albums outside that category
Post by: brynn on April 01, 2018, 03:50:27 am
User Galleries' Parent Category is already set for * No Category *.  Screenshot attached.
Title: Re: why link to a category shows all kinds of albums outside that category
Post by: brynn on April 01, 2018, 03:52:40 am
Arrgh, these "no edits allowed" forums make me crazy!!

I just forgot to say "Thanks"
Title: Re: why link to a category shows all kinds of albums outside that category
Post by: ron4mac on April 01, 2018, 01:17:08 pm
It's not normal behavior ... so perhaps it has something to do with this:
http://forum.coppermine-gallery.net/index.php/topic,78020.msg377274.html#msg377274
Title: Re: why link to a category shows all kinds of albums outside that category
Post by: ron4mac on April 01, 2018, 02:00:11 pm
I looked at the code for the 'toplevelusers' plugin that you are using. There is at least one bit of problematic code in there. I think the plugin may be causing your current issue. Uninstall it (plugin manager) to find out.
Title: Re: why link to a category shows all kinds of albums outside that category
Post by: ron4mac on April 01, 2018, 05:44:03 pm
This should correct your issue ...

In the codebase.php file in your toplevelusers plugin, find:
Code: [Select]
function tlu_plugin_block($var)
{
global $cat_data;
replace with:
Code: [Select]
function tlu_plugin_block($var)
{
global $cat_data, $cat;
( add , $cat to third line )
Title: Re: why link to a category shows all kinds of albums outside that category
Post by: brynn on April 03, 2018, 04:52:57 am
Wow - I don't know how you scouted out where the problem was, but it looks like you are right on!  How could the problem with the toplevelusers plugin cause the problem only in that particular category?

Well anyway, very nice fix!

Now see the Coloring Pages category:  https://inkscapecommunity.com/ic_gallery/index.php?cat=8

It's perfect!

Thank you SO MUCH!
Title: Re: why link to a category shows all kinds of albums outside that category
Post by: ron4mac on April 03, 2018, 02:51:35 pm
How could the problem with the toplevelusers plugin cause the problem only in that particular category?

It was because the fault in the plugin messed things up when a category had a sub-category.
Title: Re: why link to a category shows all kinds of albums outside that category
Post by: brynn on April 05, 2018, 10:58:30 pm
Oh, ok.

Thanks again!