I installed the "Start Page Configuration"-Plugin.
Scenario: 2 Categories: "fruits" and "cars". Fruits is the category shown on the front page.
fruits-category has 2 entries tagged with tag "red"
cars-category has 1 entry tagged with tag "red"
Problems:
-On the frontpage the freetag-sidebar-plugin shows "red (3)" instead of "red (2)".
-When I click the link "red (3)" which calls "index.php?/plugin/tag/red" it shows "No entries to print"
Is there any explanation for this behaviour? I looked through the event_hook of freetag, but could find no explanation. Especially the second problem is rather awkward.
Thanks in advance for any help!
"Freetag"- and "Start Page Configuration"-Problem
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: "Freetag"- and "Start Page Configuration"-Problem
Hi!
Yes, the freetag sidebar plugin display is completely independent from categories. That part comes "by design".
Actually the link red(3) should show you 2 entries from inside the fruits category. This is because the startpage-category plugin fixates the category, and the freetag plugin modifies the internal s9y core query in a way that uses all usual restrictions and adds its tag output. Why in your case nothing is shown, is strange. I assume all works when you disable the startpage plugin?
The freetag plugins includes the "genpage" plugin which then calls the serendipity_fetchEntries() PHP function. Maybe you could check the include/functions_entries.inc.php file, search for the function and temporarily remove the "//" in front of "die($query)". This way you can let yourself display the SQL query that the plugin uses when you call the index.php?/plugin/tag/red link, and when you show it to me, I could easier debug this. ATM I don't have the time to setup a sandbox with those specific surroundings you described...
Regards,
Garvin
Yes, the freetag sidebar plugin display is completely independent from categories. That part comes "by design".
Actually the link red(3) should show you 2 entries from inside the fruits category. This is because the startpage-category plugin fixates the category, and the freetag plugin modifies the internal s9y core query in a way that uses all usual restrictions and adds its tag output. Why in your case nothing is shown, is strange. I assume all works when you disable the startpage plugin?
The freetag plugins includes the "genpage" plugin which then calls the serendipity_fetchEntries() PHP function. Maybe you could check the include/functions_entries.inc.php file, search for the function and temporarily remove the "//" in front of "die($query)". This way you can let yourself display the SQL query that the plugin uses when you call the index.php?/plugin/tag/red link, and when you show it to me, I could easier debug this. ATM I don't have the time to setup a sandbox with those specific surroundings you described...
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: "Freetag"- and "Start Page Configuration"-Problem
Sorry, I was wrong. All 3 entries are in category "cars" which is not shown on the frontpage. So the behavior is formally correct.garvinhicking wrote:Actually the link red(3) should show you 2 entries from inside the fruits category. [...]Why in your case nothing is shown, is strange.
But for the user the behavior is absolutely not correct. He sees "red(3)", clicks on it and gets the message "No entries to print".
So I did a quick fix, so the freetag-plugin works as I expect it to work. I added in the serendipity_event_freetag.php following line in the event_hook-method after "global $serendipity;":
Code: Select all
$serendipity['GET']['category'] = 'all';How do you feel about this suggestion?
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: "Freetag"- and "Start Page Configuration"-Problem
Hi!
Thanks, I've commited a fix so that the category variable now gets unset for these cases. I agree that this behaviour is a bit odd.
Regards,
Garvin
Thanks, I've commited a fix so that the category variable now gets unset for these cases. I agree that this behaviour is a bit odd.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/