[BUG]: DynamicGet Filter is not saving "Allow Empty" #1244
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What Happened?
i just noticed when working on a site when i try to create a filter on a dynamic get it is not saving the "allow Empty" when it's checked it reverts back to 0.
Steps to reproduce the Bug
create a dynamic get with a filter. try to check allow empty. save.
allow empty should be selected after saving. it is unchecked after save.
I tested this on two different installs.
Which Joomla version are you compiling in?
5.3.3
Which PHP version are you compiling in?
8.3
Which Joomla versions are you targeting?
5
Which PHP version are you targeting?
8.2
Which Web server is JCB running on?
Litespeed
Which Relational Database is JCB running on?
MariaDB 10.11
Which OS is JCB running on?
AlmaLinux 9
Which JCB version are you using?
5.1.1 stable
Where in JCB did this issue occur?
Dynamic Get(admin_view)
On which browsers did you encounter the issue?
Firefox, Safari
Additional Comments
No response
this one is also still present in 5.1.2-alpha1
Image before save:
Image after save:
Image of db after save:
This seems like a messy Joomla thing... since that field is configured to be one if checked see here:
I literally saves via the Registry class conversion of the subform field, which is all Joomla.
Here is the save method of that filter subform:
hmm but are you able to replicate it? or something wrong with my installation?
Nothing in this explains why a
1
becomes a0
To make matters worse it use to work... I mean I have it working in a number of projects.
I see it is breaking on my side as well, the projects where it worked is on older Joomla 5 versions with older PHP. Not that I am sure that is why it broke, but yes I see that it is broken.
yeah i used to use it in other projects too. I checked the post data that is being sent and it is alreadyy at 0 there.
I tested safari and firefox.
i checked php 8.4 and 8.3 (building 8.1 atm on my server so i can test that one)
Found the fix... just remove the default value in the xml, I will add this to the release stack. Seems like a fix upstream, broke this, I just love it when these things happen 👍
ohh so nice to not have to edit it manually in the db every time i edit it haha :D thanks!