• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Chkbox/drdown plugs don't load saved values into details/form after editing when used in juser plug

Makulia

Member
Hello Community!
I am reporting another bug :)
Most of the time I was editing records with inline edit and everything was good.
But when I tried to edit fields with checkbox or dropdown plugins through normal editing mod (not ajaxifyed) I have noticed that after editing, checkbox/dropdown plugins do not load saved values into details or form view.
 
I can't replicate any of the issues (and I think it would be reported by others if it would be a general problem).
Which exact Joomla and Fabrik version? GitHub updates?
Which Joomla template?
Do you have a link?
 
My fault, I should have provided you with more concrete data. This issue only occurs when this element is set as "User group field" in the juser form plugin! "Sync on edit option" is enabled! I have 3 user groups. No matter what I have checked before saving, if I try to edit this record again, only first option in the user group list is appears as checked. Other cases seems to be not affected. In my case, this element stores user group id and title. My specs: Joomla 3.3.2/Fabrik 3.1+latest github update (2014-07-25). I can send you the link and login/pass through Forum PM for the investigation purpose. Thank you very much!
P.S. "Picklist" plugin is also affected by this issue! I have changed the topic title to more appropriate one.
P.P.S. I know that there is the special usergroup plugin, but it cannot be used in my case because it lacks an option to select which of the groups to show!
 
I have read this thread and I confirm, it is the same issue we are talking about. I have just checked usergroup plugin. The same problem with it!
But one important thing that was not mentioned in that thread - if you edit them with inlineedit, then correct values a populated into fabrik list. But if after this action you will go to detail view or form edit, you can still see this issue.
We really need some kind of fix of this issue asap.
 
I've opened a GitHub issue to keep it in focus.
https://github.com/Fabrik/fabrik/issues/1281


I tried to extend this condition(+your typo fix in PlgFabrik), and now it also works with checkbox plugin:
if ($groupElementClass !== 'PlgFabrik_ElementUsergroup' && $groupElementClass !== 'PlgFabrik_ElementCheckbox')
{
$gid = array_shift($gid);
}
It'll be good to merge this changes with juserplugin in repo or you have a better way of resolving this issue?
 
I've merged in the commit that troster submitted which should fix this issue
thanks for reporting it
-Rob
 
I've merged in the commit that troster submitted which should fix this issue
thanks for reporting it
-Rob

Hi, Rob!
This fix only solve problem with usergroup plugin. But if we use dropbox/checkbox/picklist plugin for the same purpose, issue is still exsist.
So, as a wrote earlier, to make it works I have to add additional condition like && $groupElementClass !== 'PlgFabrik_ElementCheckbox' etc to juser plugin code.
Could you, please, fix this issue with this 3 plugins also, because it is important to have predefined group list rather the full system group list!
 
As it is you can use a "single value" element (coming from Joomla1.5 with only one group per user) or the usergroups element, additional "multi value" elements are new features and I'm not sure that they are useful: you need an element which can hold all usergroups because the user will loose any group not included on record save (so even a "single value" element won't work if you are dealing with multiple usergroups).

And
In general a non-admin user should not be allowed to modify usergroups: he can only save usergroups he is belonging to, any other group will be deleted. So he may uncheck one of his existing groups but he can't get it back himself.
And he should not be allowed to edit records belonging to other users because of the same reasons: on save all usergroups he does not belong to would be deleted (even if the usergroup element is not editable).

So make sure a non-admin user can edit only his own record (or at least only records belonging to users with "less" usergroups) if the form has the juser plugin added.
 
I got your point! But let me describe to you my use case to make things a little bit clearer. It also may be helpfull to other fabrik users.

I have the fabrik list filled with standart Joomla user data like name, group, password + my custom user data like photo, job title and so on.
Standard Joomla fields are syncing with Joomla system tables with help of juser plugin.

I have a user, lets call him List Administrator, who administrates this users list but have the limited access to other backend|frontend options.
In our Joomla we have lots of groups and access levels. Some of them must be visible and available only to Super Administrator.

List Administrator is able to change Registred users groups in this list, but must only be able to select from a few predefined groups.
Non admin Registered User, of course, can not change their user groups.

The goal of using checkbox plugin is to provide List Administrator with option to change user group while not necessary be a member of this group (because he mustn't see what regular users can see).
Security is guaranteed by limited group selection options.

Super Administrator record doesn't exist at users list at all. His account is only accessible through Joomla standard user edit component to which List Administrator has no access!
List Administrator record also doesn't exist at users list too, so he can not uncheck his groups by mistake!
 
I think superuser group is not the problem, this is protected by Joomla itself.

I'm no Fabrik developper but this is what I found during my attempt to fix the juser plugin (all with default Joomla Adminstrator and Superadmin settings):
only admins (= Joomla authorized "core.admin") can set usergroups they are not belonging to (but superadmin)
other users can "unset" any group (but superadmin) but can set only groups they are belonging to

So your listadmin must be admin or all groups he should handle must be "authorized" groups (i.e. his groups or parent groups of his groups).

"Security is guaranteed by limited group selection options."
This is no security means; if the user (listadmin) knows "how to" he could just edit the options in the page source and set a group not in the original selection, so the groups must be verified before saving (i.e. by an additional php list plugin).

You can think of modifications/additional options of the juser plugin (e.g. define a usergroup beside of admin which is allowed to set groups...) but for now it is as it is.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top