• Resolved Graham

    (@sandgroper)


    Am I doing something wrong, or misunderstanding something?

    When I click on “DELETE ALL RECORDS” I get sent to a page that doesn’t exist.

    With the domain name omitted, the address is:

    /wp-admin/<?php%20echo%20admin_url()%20.%20%27admin.php?page=user-login-history&delete_all_user_login_history=1%27%20?>

    I don’t use a front page, and have none setup.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Graham

    (@sandgroper)

    Further to above, the records are not deleted either. They are deleted if I select them in the bottom table.

    I did set up a page called /user-login-history/ for the front end, and it did show me as logged in, but the admin panel did not redirect me to that page.

    Plugin Author Faiyaz Alam

    (@faiyazalam)

    @sandgroper

    I have fixed the bug of “DELETE ALL RECORDS” and pushed the code in the current version i.e. 1.5
    Please check and let me know if any issue.
    Thanks for reporting the bug.

    Could you please explain your second point?

    If you are unable to download updated code you can see the changes in the following files and merge it.

    user-login-history/trunk/admin/class-user-login-history-admin.php

    function that I modified is: enqueue_styles

    here is the modified code:

    wp_localize_script( $this->name . '-admin-custom.js', 'ulh_admin_custom_object', array( 
    	                'delete_confirm_message' => __('Are your sure?', 'user-login-history'),
                    'admin_url' => admin_url(),
    	                ) );

    user-login-history/trunk/admin/js/custom.js

    Here is the modified code:
    window.location.href = ulh_admin_custom_object.admin_url+'admin.php?page=user-login-history&delete_all_user_login_history=1';

    • This reply was modified 7 years, 4 months ago by Faiyaz Alam.
    Thread Starter Graham

    (@sandgroper)

    @faiyazalam

    Hi,

    Not sure what second point you are referring to. If you mean my second post, I’m saying that deleting the records by selecting them with the checkboxes and doing a bulk delete works okay.

    Don’t know how I’ll go merging code, but I’ll try.

    I was also getting an error log entry in cPanel under wp-admin about a “Wrap Error” involving “allow_url_fopen” in admin/partials/about/plugin-notice.php

    I had to empty the contents of that file to stop it. I’m on a VPS server and turning that on or off in php.ini didn’t fix it.

    Doesn’t take too much for me to get way out of my depth.

    Cheers

    Thread Starter Graham

    (@sandgroper)

    @faiyazalam

    Thanks, the 404 error has been fixed.

    I tried everything I could find on my server and cannot turn “allow_url_fopen” on. Will have to ask my web host what’s up.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Delete All Records causes 404 error’ is closed to new replies.