@missveronicatv following yesterday’s success of adding code and being able to edit fields… now users cannot save their profile update changes. Again… only custom fields are not saving. They can be edited… but they don’t save. Reports from members today and tested on my profile in user mode.
-
This reply was modified 2 years, 7 months ago by
alychef.
-
This reply was modified 2 years, 7 months ago by
alychef.
@missveronicatv thank you for the support link. The issue is with custom fields only… previously (prior to code snippet) for editing and now for saving. UM standard fields function normally. Custom fields do not save.
@alychef
It’s easier today to find the UM bugs when we know the coding mistakes by UM from yesterday.
This is the first quick fix for updating profiles.
Add this code snippet and do a test.
Code snippet removed
-
This reply was modified 2 years, 7 months ago by
missveronica.
@alychef
Replace the quick fix with this code snippet.
add_filter( 'um_can_edit_field', 'um_can_edit_field_bug', 10, 2 );
function um_can_edit_field_bug( $can_edit, $data ) {
$can_edit = true;
if ( true === UM()->fields()->editing && isset( UM()->fields()->set_mode ) && UM()->fields()->set_mode == 'profile' ) {
if ( ! is_user_logged_in() ) {
$can_edit = false;
} else {
if ( ! UM()->roles()->um_user_can( 'can_edit_everyone' ) ) {
if ( isset( $data['editable'] ) && $data['editable'] != 1 ) {
$can_edit = false;
} else {
if ( ! um_is_user_himself() ) {
$can_edit = false;
}
}
}
}
}
return $can_edit;
}
@missveronicatv that worked. Thank you. I’m holding breath every time I think it’s ok. Thankfully you are really switched on with this! I don’t understand why there are no posts about this bug.
@alychef
Are you using the second version of the code snippet?
I will also add this issue to the GitHub report now.
@alychef
From the description of the “SiteGround Optimizer” plugin.
Powerful object caching for your site. Memcached stores frequently executed queries to your databases and then reuses them for better performance. It is available only on SiteGround Environment.
Look at this Memcached feature for your time dependent restore of old database values
when you saved an UM Form field and it was enabled for some hours updating
and then was disabled for updating again.
hola, no puedo editar los formularios de ultimate member, no me abren las pestañas de la opcion editar o agregar —
Hi @alychef
This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.
Please feel free to re-open this thread if any other questions come up and we’d be happy to help. 🙂
Regards