Frontpage Plugin: 'All' Option Not Deselecting When Another Category is Selected

Find help with FlatPress plugins, report a plugin bug, request or present new plugins.
Post Reply
Hariko
Posts: 8
Joined: Tue Feb 07, 2023 8:23 pm

Frontpage Plugin: 'All' Option Not Deselecting When Another Category is Selected

Post by Hariko » Sat Sep 23, 2023 4:16 pm

Hello everyone,

I'm currently experiencing an issue with the Front Page plugin for FlatPress. The issue is specific to the section where I can select a default category for the front page from the plugin's admin panel. When I select a different category, the 'All' option does not get deselected as I would expect.

Expected Behavior:

The 'All' option should automatically get deselected when I choose any other category.

Actual Behavior:

The 'All' option stays selected even when a different category is picked in the 'Default Category' section.
Interestingly, this issue does not occur in the 'Hidden Categories' section of the same plugin; in that section, selecting a different category does correctly deselect the 'None' option.

I've tried to look into the PHP code and the Smarty template files, but I'm still not sure what's causing this inconsistency. Has anyone else encountered this problem, and if so, is there a known fix or workaround?

Any help would be greatly appreciated!

Best regards,
Hariko

User avatar
fraenkiman
Posts: 263
Joined: Thu Feb 03, 2022 7:25 pm
Location: Berlin, Germany
Contact:

Re: Frontpage Plugin: 'All' Option Not Deselecting When Another Category is Selected

Post by fraenkiman » Thu Sep 28, 2023 9:58 pm

Hello Hariko,

I was able to reproduce your description. Additionally, the Fronpage plugin does not work 100% with the PrettyURL plugin.
There is still a little air up // need for optimization.

To straighten your problem a bit, you would have to edit the template from Frontpage and correct the following lines:

From:

Code: Select all

	{list_categories type="radio" selected="$categories name=def-"}
	...
	{list_categories type="radio" selected="$exclude_categories name=ex-"}

to:

Code: Select all

	{list_categories type="radio" selected="$categories" name="def-"}
	...
	{list_categories type="radio" selected="$exclude_categories" name="ex-"}
Now the radio buttons should be displayed "halfway" logically.
I will update the plugin in the wiki accordingly.

With best regards
Frank
:pencil: You are strong in PHP and Java Script? :point_right: Then help us to improve FlatPress. :point_left:

:exploding_head: Looking for ideas, templates, examples and answers to frequently asked questions?
:bulb: You'll find it here.

My :de: FlatPress-Blog: https://frank-web.dedyn.io

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests