When users update Their profile, they also overwrite fields visible only to administrators
In addition I can not set date fields as readonly: i see that readonly attribute is set on database but the style is not kept on site
Hi Mensa
- This is valid bug, thank you for reporting
- this is valid bug as well :D
cheers!
Hi Mensa,
Here is the patch for fixing this issue :
- open file components/com_community/libraries/fields/date.php
- find this code :
$readonly = $params->get('readonly') && !COwnerHelper::isCommunityAdmin() ? ' disabled=""' : ' readonly=""';
$readonly = ($params->get('readonly') && !COwnerHelper::isCommunityAdmin()) ? ' disabled' : ' readonly';
. ' data-value="' . $value . '" title="' . $title . '" style="cursor:text">';
. ' data-value="' . $value . '" title="' . $title . '"' . $readonly . ' style="cursor:text">';
Another fix
- open this file components/com_community/tables/fieldvalue.php
- find this code :
$fields = implode(",", array_keys($fields));
$db = $this->getDBO();
$db = $this->getDBO();
$query = 'SELECT ' . $db->quoteName('id') . ' FROM ' . $db->quoteName('#__community_fields')
. ' WHERE ' . $db->quoteName('visible') . '=' . $db->Quote('2');
$db->setQuery($query);
$adminOnlyFields = $db->loadColumn();
// merge admin only field list
$fields = implode(",", array_merge(array_keys($fields), $adminOnlyFields));
Hi Dimas
i have already problem with date fields set as readonly.
First of all i can not set it from administrative control panel, this is params setting in jos_community_fields table:
{"readonly":"0","maxrange":"","minrange":"","date_format":"","style":""}
but the style is not kept on site
Hi Mensa,
have you applied the patch above ?
so what is the remain issue? can you explain more, please with screenshoot maybe..
I still have problems to set the date as readonly (particurarly for FIELD_MEMBERSHIPDATE and FIELD_EXPIRYDATE)
before.jpg is what I see when I try to change the settings as shown in setting.jpg.
But after saving the system settings return as after.jpg
Database,png show database setting.
Hi Mensa,
Oh ya that is bug from us, but actaully the data stored to database well.. this issue will be fine in version 4.3.1
thank you!
Hi Mensa,
Please check your private message i gave you the latest package to fix this issue.
thank you!