Missing Security

Home Forums Legacy Support Support queries Other issues Missing Security

Viewing 6 posts - 16 through 21 (of 21 total)
  • Author
    Posts
  • #182041
    dadoge
    Spectator
    Hello, nothing to do, I keep receiving the missing security message. I installed the Wp Super Cache plugin, I tried the various settings but the result does not change. You can try to clear the cache or tell me which settings to use. If Wp Super Cache is not suitable, can you recommend a plugin or a procedure that solves the problem? Many thanks.
    #182140
    dadoge
    Spectator
    Hello, I discovered a strange behavior, now even with Ajax registration disabled appears Missing Security message (while before it did not appear) but deleting the file wplms-customizer.php no longer appears Missing Security error ... so the problem would be solved , now I work a bit 'to understand if I can apply the redirect to all courses if the user is not enrolled in any course. There is also another detail that should be solved, if the user enters an incorrect password, the message appears: ERROR: The password entered for the office user name is incorrect. Forgot password? with a link on Forgotten password that refers to the wordpress login, can you delete or modify the link? I promise that after this question I will not break the bales anymore   I tried to delete include_once 'classes / customizer_class.php'; in the wplms-customizer.php file and it works correctly, including redirects, so the problem would be solved ... is it necessary: include_once 'classes / customizer_class.php' ;?
    #182388
    Anshuman Sahu
    Keymaster
    well the error was connected with the files and php tag in it . some times when a space is added accidently before or after a php tag " ?> " or "<?php" all ajax calls are appended by a space at the top . You might have added this space in some file in wplms customizer plugin  . Would recommend you to take backup of custom code . then delete customizer plugin from your site . Install and activate this one : https://wplms.io/support/wp-content/uploads/2018/10/wplms-customizer.zip   and add your custom codes in it ,  
    #182469
    dadoge
    Spectator
    OK, I restored /classes/customizer_class.php that I had modified and now everything works, thanks for the help, I would say that you can close the topic! If you can tell me what the problem was so you do not have to disturb if it happens in the future on new installations ... to conclude a small detail, to redirect a certain role on the dashboard no I find the best to do that: $redirect_url = bp_core_get_user_domain($user->ID).'/'.(defined('WPLMS_COURSE_SLUG')?WPLMS_COURSE_SLUG:'course'); $redirect_url = str_replace('course','dashboard',$redirect_url); it's not very elegant, but it works ... how can I write the dashboard link? Thanks again Greetings from Italy
    #182747
    Anshuman Sahu
    Keymaster
    Hi, yes I would love to tell you about the cause of it . the issue when you leave blank spaces or line breaks before the " <?php "  tag or after the " ?> " tag in any plugin or theme file (in your case it was wplms customizer plugin ) then in ajax calls the output returned with that blank spaces and or line breaks . In our code we check the output returned by php adn these blank spaces are added in it and causes trouble (in your case with the security (added with extra spaces) was not able to verify) .     you can use this constant: WPLMS_DASHBOARD_SLUG
    #182768
    dadoge
    Spectator
    Perfect! Thanks for the explanation, for me the topic is closed with great satisfaction ... I publish my wplms-customizer.php for the benefit of those who need it:     include_once 'classes/customizer_class.php'; if(class_exists('WPLMS_Customizer_Plugin_Class')) { // instantiate the plugin class $wplms_customizer = new WPLMS_Customizer_Plugin_Class(); } add_filter('login_redirect','login_redirect_custom',999,3); function login_redirect_custom($redirect_url,$request_url,$user){ global $bp; function my_has_role($user, $role) { $user= get_userdata( $user_id ); $roles = $user->roles; $utente = ''; return in_array($role, (array) $user->roles); } $ruolo = $user->roles; $redirect_url = 'https://www.mydomain/'; if(!user_can($user->ID,'edit_posts')){ if(!empty(bp_course_get_total_course_count_for_user($user->ID))){ $redirect_url = bp_core_get_user_domain($user->ID).'/'.(defined('WPLMS_COURSE_SLUG')?WPLMS_COURSE_SLUG:'course'); }else{ $pages = get_option('bp-pages'); $course_dir = isset($pages['course'])?$pages['course']:0; if(function_exists('icl_object_id')){ $course_dir = icl_object_id($course_dir, 'page', true); } $redirect_url = get_permalink($course_dir); } } else { if((in_array("allievo", $ruolo))) { $redirect_url = bp_core_get_user_domain($user->ID).'/'.(defined('WPLMS_DASHBOARD_SLUG')?WPLMS_DASHBOARD_SLUG:'dashboard'); } if((in_array("docente", $ruolo))) { $redirect_url = bp_core_get_user_domain($user->ID).(defined('WPLMS_COURSE_instructor_SLUG')?WPLMS_COURSE_instructor_SLUG:'course/instructor-courses'); } } return $redirect_url.'?1'; }
Viewing 6 posts - 16 through 21 (of 21 total)
  • The topic ‘Missing Security’ is closed to new replies.