why link to a category shows all kinds of albums outside that category why link to a category shows all kinds of albums outside that category
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

why link to a category shows all kinds of albums outside that category

Started by brynn, March 28, 2018, 02:17:48 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

brynn

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  :)

ron4mac

Edit your 'User galleries' category to make sure that the 'Parent category' is set to '* No category *'.

brynn

User Galleries' Parent Category is already set for * No Category *.  Screenshot attached.

brynn

Arrgh, these "no edits allowed" forums make me crazy!!

I just forgot to say "Thanks"

ron4mac


ron4mac

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.

ron4mac

This should correct your issue ...

In the codebase.php file in your toplevelusers plugin, find:
function tlu_plugin_block($var)
{
global $cat_data;

replace with:
function tlu_plugin_block($var)
{
global $cat_data, $cat;

( add , $cat to third line )

brynn

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!

ron4mac

Quote from: brynn on April 03, 2018, 04:52:57 AM
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.

brynn